#include <vtkOrderedTriangulator.h>
Inheritance diagram for vtkOrderedTriangulator:
This class is used to generate unique triangulations of points. The uniqueness of the triangulation is controlled by the id of the inserted points in combination with a Delaunay criterion. The class is designed to be as fast as possible (since the algorithm can be slow) and uses block memory allocations to support rapid triangulation generation. Also, the assumption behind the class is that a maximum of hundreds of points are to be triangulated. If you desire more robust triangulation methods use vtkPolygon::Triangulate(), vtkDelaunay2D, or vtkDelaunay3D.
The triangulation is performed using the parametric coordinates of the inserted points. Therefore the bounds (see InitTriangulation()) should represent the range of the parametric coordinates of the inserted points.
Definition at line 115 of file vtkOrderedTriangulator.h.
void | InitTriangulation (double xmin, double xmax, double ymin, double ymax, double zmin, double zmax, int numPts) |
void | InitTriangulation (double bounds[6], int numPts) |
static vtkOrderedTriangulator * | New () |
Public Types | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | UpdatePointType (vtkIdType internalId, int type) |
double * | GetPointPosition (vtkIdType internalId) |
double * | GetPointLocation (vtkIdType internalId) |
vtkIdType | GetTetras (int classification, vtkUnstructuredGrid *ugrid) |
vtkIdType | AddTetras (int classification, vtkUnstructuredGrid *ugrid) |
vtkIdType | AddTetras (int classification, vtkIdList *ptIds, vtkPoints *pts) |
vtkIdType | AddTriangles (vtkCellArray *connectivity) |
vtkIdType | AddTriangles (vtkIdType id, vtkCellArray *connectivity) |
vtkIdType | InsertPoint (vtkIdType id, double x[3], double p[3], int type) |
vtkIdType | InsertPoint (vtkIdType id, vtkIdType sortid, double x[3], double p[3], int type) |
vtkIdType | InsertPoint (vtkIdType id, vtkIdType sortid, vtkIdType sortid2, double x[3], double p[3], int type) |
void | Triangulate () |
void | TemplateTriangulate (int cellType, int numPts, int numEdges) |
vtkIdType | GetPointId (vtkIdType internalId) |
virtual int | GetNumberOfPoints () |
virtual void | SetUseTemplates (int) |
virtual int | GetUseTemplates () |
virtual void | UseTemplatesOn () |
virtual void | UseTemplatesOff () |
virtual void | SetPreSorted (int) |
virtual int | GetPreSorted () |
virtual void | PreSortedOn () |
virtual void | PreSortedOff () |
virtual void | SetUseTwoSortIds (int) |
virtual int | GetUseTwoSortIds () |
virtual void | UseTwoSortIdsOn () |
virtual void | UseTwoSortIdsOff () |
vtkIdType | AddTetras (int classification, vtkCellArray *connectivity) |
vtkIdType | AddTetras (int classification, vtkPointLocator *locator, vtkCellArray *outConnectivity, vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD) |
void | InitTetraTraversal () |
int | GetNextTetra (int classification, vtkTetra *tet, vtkDataArray *cellScalars, vtkDoubleArray *tetScalars) |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkOrderedTriangulator * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
vtkOrderedTriangulator () | |
~vtkOrderedTriangulator () |
|
Reimplemented from vtkObject. Definition at line 118 of file vtkOrderedTriangulator.h. |
|
|
|
|
|
Reimplemented from vtkObject. |
|
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkObject. |
|
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkObject. |
|
Reimplemented from vtkObject. |
|
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes. Reimplemented from vtkObject. |
|
Construct object. Reimplemented from vtkObject. |
|
Initialize the triangulation process. Provide a bounding box and the maximum number of points to be inserted. Note that since the triangulation is performed using parametric coordinates (see InsertPoint()) the bounds should be represent the range of the parametric coordinates inserted.
|
|
Initialize the triangulation process. Provide a bounding box and the maximum number of points to be inserted. Note that since the triangulation is performed using parametric coordinates (see InsertPoint()) the bounds should be represent the range of the parametric coordinates inserted.
|
|
For each point to be inserted, provide an id, a position x, parametric coordinate p, and whether the point is inside (type=0), outside (type=1), or on the boundary (type=2). You must call InitTriangulation() prior to invoking this method. Make sure that the number of points inserted does not exceed the numPts specified in InitTriangulation(). Also note that the "id" can be any integer and can be greater than numPts. It is used to create tetras (in AddTetras()) with the appropriate connectivity ids. The method returns an internal id that can be used prior to the Triangulate() method to update the type of the point with UpdatePointType(). (Note: the algorithm triangulated with the parametric coordinate p[3] and creates tetras with the global coordinate x[3]. The parametric coordinates and global coordinates may be the same.) |
|
For each point to be inserted, provide an id, a position x, parametric coordinate p, and whether the point is inside (type=0), outside (type=1), or on the boundary (type=2). You must call InitTriangulation() prior to invoking this method. Make sure that the number of points inserted does not exceed the numPts specified in InitTriangulation(). Also note that the "id" can be any integer and can be greater than numPts. It is used to create tetras (in AddTetras()) with the appropriate connectivity ids. The method returns an internal id that can be used prior to the Triangulate() method to update the type of the point with UpdatePointType(). (Note: the algorithm triangulated with the parametric coordinate p[3] and creates tetras with the global coordinate x[3]. The parametric coordinates and global coordinates may be the same.) |
|
For each point to be inserted, provide an id, a position x, parametric coordinate p, and whether the point is inside (type=0), outside (type=1), or on the boundary (type=2). You must call InitTriangulation() prior to invoking this method. Make sure that the number of points inserted does not exceed the numPts specified in InitTriangulation(). Also note that the "id" can be any integer and can be greater than numPts. It is used to create tetras (in AddTetras()) with the appropriate connectivity ids. The method returns an internal id that can be used prior to the Triangulate() method to update the type of the point with UpdatePointType(). (Note: the algorithm triangulated with the parametric coordinate p[3] and creates tetras with the global coordinate x[3]. The parametric coordinates and global coordinates may be the same.) |
|
Perform the triangulation. (Complete all calls to InsertPoint() prior to invoking this method.) A special version is available when templates should be used. |
|
Perform the triangulation. (Complete all calls to InsertPoint() prior to invoking this method.) A special version is available when templates should be used. |
|
Update the point type. This is useful when the merging of nearly coincident points is performed. The id is the internal id returned from InsertPoint(). The method should be invoked prior to the Triangulate method. The type is specified as inside (type=0), outside (type=1), or on the boundary (type=2).
|
|
Return the parametric coordinates of point `internalId'. It assumes that the point has already been inserted. The method should be invoked prior to the Triangulate method.
|
|
Return the global coordinates of point `internalId'. It assumes that the point has already been inserted. The method should be invoked prior to the Triangulate method.
|
|
Return the Id of point `internalId'. This id is the one passed in argument of InsertPoint. It assumes that the point has already been inserted. The method should be invoked prior to the Triangulate method.
|
|
Return the number of inserted points. |
|
If this flag is set, then the ordered triangulator will create and use templates for the triangulation. To use templates, the TemplateTriangulate() method should be called when appropriate. (Note: the TemplateTriangulate() method works for complete (interior) cells without extra points due to intersection, etc.) |
|
If this flag is set, then the ordered triangulator will create and use templates for the triangulation. To use templates, the TemplateTriangulate() method should be called when appropriate. (Note: the TemplateTriangulate() method works for complete (interior) cells without extra points due to intersection, etc.) |
|
If this flag is set, then the ordered triangulator will create and use templates for the triangulation. To use templates, the TemplateTriangulate() method should be called when appropriate. (Note: the TemplateTriangulate() method works for complete (interior) cells without extra points due to intersection, etc.) |
|
If this flag is set, then the ordered triangulator will create and use templates for the triangulation. To use templates, the TemplateTriangulate() method should be called when appropriate. (Note: the TemplateTriangulate() method works for complete (interior) cells without extra points due to intersection, etc.) |
|
Boolean indicates whether the points have been pre-sorted. If pre-sorted is enabled, the points are not sorted on point id. By default, presorted is off. (The point id is defined in InsertPoint().) |
|
Boolean indicates whether the points have been pre-sorted. If pre-sorted is enabled, the points are not sorted on point id. By default, presorted is off. (The point id is defined in InsertPoint().) |
|
Boolean indicates whether the points have been pre-sorted. If pre-sorted is enabled, the points are not sorted on point id. By default, presorted is off. (The point id is defined in InsertPoint().) |
|
Boolean indicates whether the points have been pre-sorted. If pre-sorted is enabled, the points are not sorted on point id. By default, presorted is off. (The point id is defined in InsertPoint().) |
|
Tells the triangulator that a second sort id is provided for each point and should also be considered when sorting. |
|
Tells the triangulator that a second sort id is provided for each point and should also be considered when sorting. |
|
Tells the triangulator that a second sort id is provided for each point and should also be considered when sorting. |
|
Tells the triangulator that a second sort id is provided for each point and should also be considered when sorting. |
|
Initialize and add the tetras and points from the triangulation to the unstructured grid provided. New points are created and the mesh is allocated. (This method differs from AddTetras() in that it inserts points and cells; AddTetras only adds the tetra cells.) The tetrahdera added are of the type specified (0=inside,1=outside,2=all). Inside tetrahedron are those whose points are classified "inside" or on the "boundary." Outside tetrahedron have at least one point classified "outside." The method returns the number of tetrahedrahedron of the type requested. |
|
Add the tetras to the unstructured grid provided. The unstructured grid is assumed to have been initialized (with Allocate()) and points set (with SetPoints()). The tetrahdera added are of the type specified (0=inside,1=outside,2=all). Inside tetrahedron are those whose points are classified "inside" or on the "boundary." Outside tetrahedron have at least one point classified "outside." The method returns the number of tetrahedrahedron of the type requested. |
|
Add the tetrahedra classified (0=inside,1=outside) to the connectivity list provided. Inside tetrahedron are those whose points are all classified "inside." Outside tetrahedron have at least one point classified "outside." The method returns the number of tetrahedron of the type requested. |
|
Assuming that all the inserted points come from a cell `cellId' to triangulate, get the tetrahedra in outConnectivity, the points in locator and copy point data and cell data. Return the number of added tetras.
|
|
Add the tetrahedra classified (0=inside,1=outside) to the list of ids and coordinates provided. These assume that the first four points form a tetrahedron, the next four the next, and so on. |
|
Add the triangle faces classified (2=boundary) to the connectivity list provided. The method returns the number of triangles. |
|
Add the triangle faces classified (2=boundary) and attached to the specified point id to the connectivity list provided. (The id is the same as that specified in InsertPoint().) |
|
Methods to get one tetra at a time. Start with InitTetraTraversal() and then invoke GetNextTetra() until the method returns 0. |
|
Methods to get one tetra at a time. Start with InitTetraTraversal() and then invoke GetNextTetra() until the method returns 0. cellScalars are point-centered scalars on the original cell. tetScalars are point-centered scalars on the tetra: the values will be copied from cellScalars.
|