Constructing Triangulation for a Face

The method

void CalculateGrid( const MbFace &     face,
                    const MbStepData & stepData,
                          bool         edgePoints,
                          MbGrid &     grid,
                          bool         dualSeams = true );

approximates a face with triangular and quadrilateral plates.

The input parameters of the method are:

  • face – face;

  • stepData – data for calculating the approximation step;

  • edgePoints – flag for using spatial points;

  • dualSeams – flag for seam processing.

The output parameter of the method is the triangulation grid.

The method is declared in the tri_face.h file.

The stepData parameter controls the density of the triangulation and contains data for calculating the step when moving along the face surface. The stepData parameter is described in the subsection Triangulation Calculation Control. For different values of stepData.stepType, different triangulation data of grid are filled. If stepData.stepType contains the ist_MipStep mask, the grid.params set is filled. If stepData.stepType contains the ist_CollisionStep or ist_ParamStep mask, the grid.params, grid.points and grid.normals sets are filled. In all other cases, the grid.params and grid.points sets are filled.

Fig. 1 shows a triangulation of a planar face with the ist_SpaceStep mask:

../../../../_images/R.1.5.1.png

Fig. 1

Fig. 2 shows a triangulation of a curved face with the ist_SpaceStep mask.

../../../../_images/R.1.5.2.png

Fig. 2

This method is called when constructing polygonal objects by the CalculateMesh() and AddYourMesh() methods if note.grid == true.