You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nmWTAI-Platform/3rd/VTK7.1/source/VTK-7.1.1/Common/DataModel/vtkAbstractCellLinks.cxx

58 lines
1.6 KiB
C++

/*=========================================================================
Program: Visualization Toolkit
Module: vtkAbstractCellLinks.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "vtkAbstractCellLinks.h"
#include "vtkObjectFactory.h"
#include "vtkCellArray.h"
//----------------------------------------------------------------------------
vtkAbstractCellLinks::vtkAbstractCellLinks()
{
}
//----------------------------------------------------------------------------
vtkAbstractCellLinks::~vtkAbstractCellLinks()
{
}
//----------------------------------------------------------------------------
int vtkAbstractCellLinks::
GetIdType(vtkIdType maxPtId, vtkIdType maxCellId, vtkCellArray *ca)
{
vtkIdType numEntries = ca->GetNumberOfConnectivityEntries();
vtkIdType max = maxPtId;
max = (maxCellId > max ? maxCellId : max);
max = (numEntries > max ? numEntries : max);
if ( max >= VTK_INT_MAX )
{
return VTK_ID_TYPE;
}
else if ( max >= VTK_SHORT_MAX )
{
return VTK_INT;
}
else
{
return VTK_SHORT;
}
}
//----------------------------------------------------------------------------
void vtkAbstractCellLinks::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os,indent);
}