All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

VisualizationBase Class CAT3DFaceGP

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---VisualizationBase.CATGraphicPrimitive
        |
        +---VisualizationBase.CAT3DBoundingGP
          |
          +---CAT3DFaceGP
 

Usage: you must use this class as is. You should never derive it.


public class CAT3DFaceGP

Class to create the graphic primitive of a 3D face.

Role: Class to describe the standard tessellation of a face. A face is made of triangles, triangle strips, and triangle fans. This is one of the most common encountered graphic primitive.
Main Methods:
Drawing and texturing.
Retrieve the tessellation parameters.


Constructor and Destructor Index


o CAT3DFaceGP(float[],int,float[],int,int[],int,int[],int,int[],int[],int,int[],float*,int,char,float*)
Constructs a 3D face graphic primitive from the face vertices coordinates list, and their texture coordinates.
o CAT3DFaceGP(float[],int,float[],int,int[],int,int[],int,int[],int[],int,int[],float*,int,char,float*,float)
Constructs a 3D face graphic primitive from the face vertices coordinates list, and their texture coordinates.
o CAT3DFaceGP(void)
Default constructor.

Method Index


o Draw(CATRender&)
Draws the face.
o Get(int*,float**,int*,float**,int*,int**,int*,int**,int*,int**,int**,int*,int**)
Retrieves the tessellation information from the face.
o GetTextureCoordinates(float**)
o GetTextureCoordinates(float**,int*)
Retrieves the texture coordinates.
o GetUV(int*,float**,int*)
Retrieves the face surfacic mesh parameters.
o GetVertices(int*,float**,int*)
Retrieves face vertices.
o HasNormals(void)
Tests whether the face is owner of its normals informations.
o HasTextures(void)
Tests whether the face is owner of its texture coordinates informations.
o HasVertices(void)
Tests whether the face is owner of its vertices informations.
o SetTextureCoordinates(float*,int,char)
Sets the texture coordinates.
o SetUV(float*)
Sets the UV array.
o SortAndStrip(void)
Performs a multi-dimensionnal sort on vertices and normals, and updates all tessellation parameters.

Constructor and Destructor


o CAT3DFaceGP
public CAT3DFaceGP( const float[] iVertices,
const int iVerticesArraySize,
const float[] iNormals,
const int iNormalsArraySize,
const int[] iTriangleIndices,
const int iNbTriangle,
const int[] iTriangleStripIndices,
const int iNbTriangleStrip,
const int[] iNbVertexPerTriangleStrip,
const int[] iTriangleFanIndices,
const int iNbTriangleFan,
const int[] iNbVertexPerTriangleFan,
const float* iTextureCoord=NULL,
const int iTextureFormat=3,
const char iAllocMode=ALLOCATE_VERTICES | ALLOCATE_NORMALS | ALLOCATE_TEXTURES,
const float* tanBinormal=NULL)
Constructs a 3D face graphic primitive from the face vertices coordinates list, and their texture coordinates. Relying on the allocation mode, parameter data may have to be freed after the face is created. Set, strip and fan information is always duplicated at the face creation. Texture information can be provided at this stage when the texture coordinates have already been computed.
Parameters:
iVertices
Array made of vertices coordinates: XYZXYZXYZ... Its size is equal to three times the face vertices number.
iVerticesArraySize
The size, in floats, of the iVertices array. Equal to three times the vertices number.
iNormals
Array made of normals coordinates. It is organized like iVertices : one vertex has exactly one normal at the same field entry.
iNormalsArraySize
The size, in floats, of the iNormal array. Equal to three times the number of normals.
iTriangleIndices
This array is used to store the single triangles vertices. Each of its field represents a vertex index in the iVertices array. As we find, in the iVertices array, the XYZ coordinates for each vertex, the indices used to designate the vertices are multiples of three. So, the first three indices of the iTriangleIndices array, are the three vertices indices of the face first single triangle.

                 -----------------       
                | iTriangleIndices|
                 -----------------
                |       i00       |   }
                |       i01       |   } triangle 0 defined by index i00, i01 and i02
                |       i02       |   }
                |        .        |
                |        .        |
                |       ij0       |   }
                |       ij1       |   } triangle j defined by index ij0, ij1 and ij2. 
                |       ij2       |   }
                |        .        |
                |        .        |
                 -----------------

   
For example, index ij0 enables access to the face j-th single triangle first vertex, which coordinates are X = iVertices[ij0], Y = iVertices[ij0 + 1] and Z = iVertices[ij0 + 2], and which normal has coordinates Nx = iNormals[ij0], Ny = iNormals[ij0 + 1] and Nz = iNormals[ij0 + 2].
iNbTriangle
The number of single triangles in the face.
iTriangleStripIndices
Array used to store the face triangles strips vertices. Each field contains a vertex index, in the iVertices array. As, we find, in the iVertices array, the XYZ coordinates for each vertex, the indices used to designate the vertices are multiples of three.


                   ----------------------
                  | iTriangleStripIndices|
                   ----------------------
                  |          i00         |   }
                  |          i01         |   } first triangle strip defined
                  |           .          |   } by the first n1 indices
                  |           .          |   }
                  |          i0n1        |   }
                  |           .          |
                  |           .          |
                  |           .          |   
                  |          ij0         |   }
                  |          ij1         |   }
                  |           .          |   } triangle strip j
                  |           .          |   } with nj vertices
                  |          ijnj        |   }
                   ----------------------


    
For example, index ij0 allows to access to the face j-th strip first vertex wich coordinates are X = iVertices[ij0], Y = iVertices[ij0 + 1] and Z = iVertices[ij0 + 2], and which normal coordinates are Nx = iNormals[ij0], Ny = iNormals[ij0 + 1] and Nz = iNormals[ij0 + 2].
iNbTriangleStrip
The number of face triangles strips.
iNbVertexPerTriangleStrip
Array containing the number of vertices for each face triangles strip. The size of this array is equal to iNbTriangleStrip. For example, the first strip is made with iNbVertexPerTriangleStrip[0] vertices.
                --------------------------
               |iNbVertexPerTriangleStrip |
                --------------------------
               |             n1           |
               |             .            |
               |             .            |   m = Number of triangle strips(iNbTriangleStrip)
               |             nm           |   nm = number of vertices of the m-th strip. (iNbVertexPerTriangleStrip[m]
                --------------------------    

   
iTriangleFanIndices
Array used to store the face triangles fans vertices. Each field contains a vertex index, in the iVertices array. As, we find, in the iVertices array, the XYZ coordinates for each vertex, the indices used to designate the vertices are multiples of three.


                   ----------------------
                  | iTriangleFanIndices   |
                   ----------------------
                  |          i00         |   }
                  |          i01         |   } first triangle fan defined
                  |           .          |   } by the first n1 indices
                  |           .          |   }
                  |          i0n1        |   }
                  |           .          |
                  |           .          |
                  |           .          |   
                  |          ij0         |   }
                  |          ij1         |   }
                  |           .          |   } triangle fan j
                  |           .          |   } with nj vertices
                  |          ijnj        |   }
                   ----------------------


    
For example, index ij0 allows to access to the face j-th fan first vertex wich coordinates are X = iVertices[ij0], Y = iVertices[ij0 + 1] and Z = iVertices[ij0 + 2], and which normal coordinates are Nx = iNormals[ij0], Ny = iNormals[ij0 + 1] and Nz = iNormals[ij0 + 2]. Each ij0, j in [0, jn], represents the j-th fan center.
iNbTriangleFan
The number of face triangles fans.
iNbVertexPerTriangleFan
Array containing the number of vertices for each face triangles fan. The size of this array is equal to iNbTriangleFan. For example, the first fan is made with iNbVertexPerTriangleStrip[0] vertices.
                --------------------------
               | iNbVertexPerTriangleFan  |
                --------------------------
               |             n1           |
               |             .            |
               |             .            |   m = Number of triangle fans(iNbTriangleFan)
               |             nm           |   nm = number of vertices of the m-th fan. (iNbVertexPerTriangleFan[m]
                --------------------------    

   
iTextureCoord
Array of texture coordinates. Each vertex has an associated position in the texture map. The number of texture coordinates groups is always equal to the number of vertices. Because vertex and normal information is being sorted at the face creation, texture coordinates are to be generated with the tessellation parameters that are retrieved after the face creation (ie with properly translated indices). Nevertheless, a mapping operator can be applied at anytime, when the face is the owner of it's vertex data. If computed before the face creation, texture coordinates can be given at the face construction method. In this case, coordinates order is rearranged in parallel with vertices coordinates.
iTextureFormat
iTextureFormat is the number of fields associated to one vertex in the iTextureCoord array. It is also the number of texture coordinates associated to each vertex. Indeed, each vertex has associated coordinates in the texture map. The number of coordinates depends on the map dimension: the texture map may be in 1D, 2D or 3D.
Legal values:
1
The texture map is a one dimension map. Each vertex has a single associated texture coordinate
2
The texture map is a two-dimension map. Each vertex has two associated texture coordinates
3
The texture map is a three-dimension map. Each vertex has three associated texture coordinates
iAllocMode
The CAT3DFaceGP, and it's planar inherited object, the CAT3DPlanarFaceGP have allocation flags ruling their memory comsumption for vertices and normals: The default value is ALLOCATE_VERTICES | ALLOCATE_NORMALS.
Legal values:
ALLOCATE_VERTICES
Vertex array is the property of the face and is to be deleted with it.
GET_VERTICES
Vertex array is not duplicated at the face creation, but is to be deleted during the object deletion.
ALLOCATE_NORMALS
Normal array is the property of the face and is to be deleted with it. Planar faces always allocate their normals.
GET_NORMALS
Normal array is not duplicated at the face creation although, as for vertices, it will be destroyed in the same time the object is deleted.
ALLOCATE_TEXTURES
Texture coordinates array is the property of the face and is to be deleted with it. This mode is suitable for computing new texture coordinates
GET_TEXTURES
Texture coordinates array is not duplicated at the face creation although, as for vertices, it will be destroyed in the same time the object is deleted. In this mode, the texture format is 3.
o CAT3DFaceGP
public CAT3DFaceGP( const float[] iVertices,
const int iVerticesArraySize,
const float[] iNormals,
const int iNormalsArraySize,
const int[] iTriangleIndices,
const int iNbTriangle,
const int[] iTriangleStripIndices,
const int iNbTriangleStrip,
const int[] iNbVertexPerTriangleStrip,
const int[] iTriangleFanIndices,
const int iNbTriangleFan,
const int[] iNbVertexPerTriangleFan,
const float* iTextureCoord,
const int iTextureFormat,
const char iAllocMode,
const float* tanBinormal,
const float iToleranceScale)
Constructs a 3D face graphic primitive from the face vertices coordinates list, and their texture coordinates. Relying on the allocation mode, parameter data may have to be freed after the face is created. Set, strip and fan information is always duplicated at the face creation. Texture information can be provided at this stage when the texture coordinates have already been computed.
Parameters:
iVertices
Array made of vertices coordinates: XYZXYZXYZ... Its size is equal to three times the face vertices number.
iVerticesArraySize
The size, in floats, of the iVertices array. Equal to three times the vertices number.
iNormals
Array made of normals coordinates. It is organized like iVertices : one vertex has exactly one normal at the same field entry.
iNormalsArraySize
The size, in floats, of the iNormal array. Equal to three times the number of normals.
iTriangleIndices
This array is used to store the single triangles vertices. Each of its field represents a vertex index in the iVertices array. As we find, in the iVertices array, the XYZ coordinates for each vertex, the indices used to designate the vertices are multiples of three. So, the first three indices of the iTriangleIndices array, are the three vertices indices of the face first single triangle.

                 -----------------       
                | iTriangleIndices|
                 -----------------
                |       i00       |   }
                |       i01       |   } triangle 0 defined by index i00, i01 and i02
                |       i02       |   }
                |        .        |
                |        .        |
                |       ij0       |   }
                |       ij1       |   } triangle j defined by index ij0, ij1 and ij2. 
                |       ij2       |   }
                |        .        |
                |        .        |
                 -----------------

   
For example, index ij0 enables access to the face j-th single triangle first vertex, which coordinates are X = iVertices[ij0], Y = iVertices[ij0 + 1] and Z = iVertices[ij0 + 2], and which normal has coordinates Nx = iNormals[ij0], Ny = iNormals[ij0 + 1] and Nz = iNormals[ij0 + 2].
iNbTriangle
The number of single triangles in the face.
iTriangleStripIndices
Array used to store the face triangles strips vertices. Each field contains a vertex index, in the iVertices array. As, we find, in the iVertices array, the XYZ coordinates for each vertex, the indices used to designate the vertices are multiples of three.


                   ----------------------
                  | iTriangleStripIndices|
                   ----------------------
                  |          i00         |   }
                  |          i01         |   } first triangle strip defined
                  |           .          |   } by the first n1 indices
                  |           .          |   }
                  |          i0n1        |   }
                  |           .          |
                  |           .          |
                  |           .          |   
                  |          ij0         |   }
                  |          ij1         |   }
                  |           .          |   } triangle strip j
                  |           .          |   } with nj vertices
                  |          ijnj        |   }
                   ----------------------


    
For example, index ij0 allows to access to the face j-th strip first vertex wich coordinates are X = iVertices[ij0], Y = iVertices[ij0 + 1] and Z = iVertices[ij0 + 2], and which normal coordinates are Nx = iNormals[ij0], Ny = iNormals[ij0 + 1] and Nz = iNormals[ij0 + 2].
iNbTriangleStrip
The number of face triangles strips.
iNbVertexPerTriangleStrip
Array containing the number of vertices for each face triangles strip. The size of this array is equal to iNbTriangleStrip. For example, the first strip is made with iNbVertexPerTriangleStrip[0] vertices.
                --------------------------
               |iNbVertexPerTriangleStrip |
                --------------------------
               |             n1           |
               |             .            |
               |             .            |   m = Number of triangle strips(iNbTriangleStrip)
               |             nm           |   nm = number of vertices of the m-th strip. (iNbVertexPerTriangleStrip[m]
                --------------------------    

   
iTriangleFanIndices
Array used to store the face triangles fans vertices. Each field contains a vertex index, in the iVertices array. As, we find, in the iVertices array, the XYZ coordinates for each vertex, the indices used to designate the vertices are multiples of three.


                   ----------------------
                  | iTriangleFanIndices   |
                   ----------------------
                  |          i00         |   }
                  |          i01         |   } first triangle fan defined
                  |           .          |   } by the first n1 indices
                  |           .          |   }
                  |          i0n1        |   }
                  |           .          |
                  |           .          |
                  |           .          |   
                  |          ij0         |   }
                  |          ij1         |   }
                  |           .          |   } triangle fan j
                  |           .          |   } with nj vertices
                  |          ijnj        |   }
                   ----------------------


    
For example, index ij0 allows to access to the face j-th fan first vertex wich coordinates are X = iVertices[ij0], Y = iVertices[ij0 + 1] and Z = iVertices[ij0 + 2], and which normal coordinates are Nx = iNormals[ij0], Ny = iNormals[ij0 + 1] and Nz = iNormals[ij0 + 2]. Each ij0, j in [0, jn], represents the j-th fan center.
iNbTriangleFan
The number of face triangles fans.
iNbVertexPerTriangleFan
Array containing the number of vertices for each face triangles fan. The size of this array is equal to iNbTriangleFan. For example, the first fan is made with iNbVertexPerTriangleStrip[0] vertices.
                --------------------------
               | iNbVertexPerTriangleFan  |
                --------------------------
               |             n1           |
               |             .            |
               |             .            |   m = Number of triangle fans(iNbTriangleFan)
               |             nm           |   nm = number of vertices of the m-th fan. (iNbVertexPerTriangleFan[m]
                --------------------------    

   
iTextureCoord
Array of texture coordinates. Each vertex has an associated position in the texture map. The number of texture coordinates groups is always equal to the number of vertices. Because vertex and normal information is being sorted at the face creation, texture coordinates are to be generated with the tessellation parameters that are retrieved after the face creation (ie with properly translated indices). Nevertheless, a mapping operator can be applied at anytime, when the face is the owner of it's vertex data. If computed before the face creation, texture coordinates can be given at the face construction method. In this case, coordinates order is rearranged in parallel with vertices coordinates.
iTextureFormat
iTextureFormat is the number of fields associated to one vertex in the iTextureCoord array. It is also the number of texture coordinates associated to each vertex. Indeed, each vertex has associated coordinates in the texture map. The number of coordinates depends on the map dimension: the texture map may be in 1D, 2D or 3D.
Legal values:
1
The texture map is a one dimension map. Each vertex has a single associated texture coordinate
2
The texture map is a two-dimension map. Each vertex has two associated texture coordinates
3
The texture map is a three-dimension map. Each vertex has three associated texture coordinates
iAllocMode
The CAT3DFaceGP, and it's planar inherited object, the CAT3DPlanarFaceGP have allocation flags ruling their memory comsumption for vertices and normals: The default value is ALLOCATE_VERTICES | ALLOCATE_NORMALS.
Legal values:
ALLOCATE_VERTICES
Vertex array is the property of the face and is to be deleted with it.
GET_VERTICES
Vertex array is not duplicated at the face creation, but is to be deleted during the object deletion.
ALLOCATE_NORMALS
Normal array is the property of the face and is to be deleted with it. Planar faces always allocate their normals.
GET_NORMALS
Normal array is not duplicated at the face creation although, as for vertices, it will be destroyed in the same time the object is deleted.
ALLOCATE_TEXTURES
Texture coordinates array is the property of the face and is to be deleted with it. This mode is suitable for computing new texture coordinates
GET_TEXTURES
Texture coordinates array is not duplicated at the face creation although, as for vertices, it will be destroyed in the same time the object is deleted. In this mode, the texture format is 3.
o CAT3DFaceGP
public CAT3DFaceGP(void )
Default constructor.

Methods


o Draw
public virtual void Draw(CATRender& iRender)
Draws the face.
Parameters:
iRender
The render through which the face is drawn.
o Get
public void Get(int* oAllocate,
float** oVertices,
int* oVerticesArraySize,
float** oNormals,
int* oNormalsArraySize,
int** oTriangleIndices,
int* oNbTriangle,
int** oTriangleStripIndices,
int* oNbTriangleStrip,
int** oNbVertexPerTriangleStrip,
int** oTriangleFanIndices,
int* oNbTriangleFan,
int** oNbVertexPerTriangleFan)
Retrieves the tessellation information from the face.
Role: As this method is designed to return values on its parameters, it has to be called like this :
 int allocate;
 float * vertices;
 ...
 Get(&allocate, &vertices, ...);
 

Parameters:
oAllocate
Flag specifiying whether retrieved data is copied or not.
Legal values:
1
retrieved data is copied.
0
retrieves references on data.
oAllocate flag is always returned equal to 0: Get() only retrieves references on stored data.
oVertices
Retrieves an array made of face vertices coordinates: XYZXYZXYZ... Its size is equal to three times the face vertices number.
oVerticesArraySize
Retrieves the size, in floats, of the oVertices array. Equal to three times the vertices number. If information on vertices is shared with another element, returned size for this parameter is equal to 0.
oNormals
Retrieves an array made of normals coordinates. It is organized as oVertices : one vertex has exactly one normal at the same field entry.
oNormalsArraySize
Retrieves The size, in floats, of the oNormal array. Equal to three times the number of normals. If information on normals is shared with another element, returned size for this parameter is equal to 0.
oTriangleIndices
Retrieves the array used to store the single triangles vertices. Each of its field represents a vertex index, in the oVertices array. As, we find, in the *oVertices array, the XYZ coordinates for each vertex, the indices used to designate the vertices are multiples of three. So, the first three indices of the *oTriangleIndices array, are the indices of the face first single triangle three vertices.

                 -----------------       
                |*oTriangleIndices |
                 -----------------
                |       i00       |   }
                |       i01       |   } triangle 0 defined by index i00, i01 and i02
                |       i02       |   }
                |        .        |
                |        .        |
                |       ij0       |   }
                |       ij1       |   } triangle j defined by index ij0, ij1 and ij2. 
                |       ij2       |   }
                |        .        |
                |        .        |
                 -----------------

   
For example, index ij0 enables access to the face j-th single triangle first vertex, which coordinates are X = *oVertices[ij0], Y = *oVertices[ij0+1] and Z = *oVertices[ij0+2], and which normal has coordinates Nx = *oNormals[ij0], Ny = *oNormals[ij0+1] and Nz = *oNormals[ij0+2].
oNbTriangle
Retrieves the number of single triangles in the face.
oTriangleStripIndices
Retrieves the array used to store the face triangles strips vertices. Each field contains a vertex index, belonging to one of the strips, in the oVertices array. As, we find, in the oVertices array, the XYZ coordinates for each vertex, the indices used to designate the vertices are multiples of three.


                   ----------------------
                  | oTriangleStripIndices |
                   ----------------------
                  |          i00         |   }
                  |          i01         |   } first triangle strip defined
                  |           .          |   } by the first n1 indices
                  |           .          |   }
                  |          i0n1        |   }
                  |           .          |
                  |           .          |
                  |           .          |   
                  |          ij0         |   }
                  |          ij1         |   }
                  |           .          |   } triangle strip j
                  |           .          |   } with nj vertices
                  |          ijnj        |   }
                   ----------------------


    
For example, index ij0 allows to access to the face j-th strip first vertex wich coordinates are X = *oVertices[ij0], Y = *oVertices[ij0 + 1] and Z = *oVertices[ij0 + 2], and which normal coordinates are Nx = *oNormals[ij0], Ny = *oNormals[ij0 + 1] and Nz = *oNormals[ij0 + 2].
oNbTriangleStrip
Retrieves the number of face triangles strips.
oNbVertexPerTriangleStrip
Retrieves an array containing the number of vertices for each face triangles strip. The size of this array is equal to *oNbTriangleStrip. For example, the first strip is made with *oNbVertexPerTriangleStrip[0] vertices.
                --------------------------
               |*oNbVertexPerTriangleStrip|
                --------------------------
               |             n1           |
               |             .            |
               |             .            |   m = Number of triangle strips(*oNbTriangleStrip)
               |             nm           |   nm = number of vertices of the m-th strip. (*oNbVertexPerTriangleStrip[m]
                --------------------------    

   
oTriangleFanIndices
Retrieves the array used to store the face triangles fans vertices. Each field contains a vertex index, belonging to one of the fans, in the oVertices array. As, we find, in the oVertices array, the XYZ coordinates for each vertex, the indices used to designate the vertices are multiples of three.


                   ----------------------
                  | *oTriangleFanIndices  |
                   ----------------------
                  |          i00         |   }
                  |          i01         |   } first triangle fan defined
                  |           .          |   } by the first n1 indices
                  |           .          |   }
                  |          i0n1        |   }
                  |           .          |
                  |           .          |
                  |           .          |   
                  |          ij0         |   }
                  |          ij1         |   }
                  |           .          |   } triangle fan j
                  |           .          |   } with nj vertices
                  |          ijnj        |   }
                   ----------------------


    
For example, index ij0 allows to access to the face j-th fan first vertex wich coordinates are X = *oVertices[ij0], Y = *oVertices[ij0 + 1] and Z = *oVertices[ij0 + 2], and which normal coordinates are Nx = *oNormals[ij0], Ny = *oNormals[ij0 + 1] and Nz = *oNormals[ij0 + 2]. Each ij0, j in [0, jn], represents the j-th fan center.
oNbTriangleFan
Retrieves the number of face triangles fans.
oNbVertexPerTriangleFan
Retrieves the array containing the number of vertices for each face triangles fan. The size of this array is equal to *oNbTriangleFan. For example, the first fan is made with *oNbVertexPerTriangleStrip[0] vertices.
                --------------------------
               | *oNbVertexPerTriangleFan |
                --------------------------
               |             n1           |
               |             .            |
               |             .            |   m = Number of triangle fans(*oNbTriangleFan)
               |             nm           |   nm = number of vertices of the m-th fan. (*oNbVertexPerTriangleFan[m]
                --------------------------    

   
o GetTextureCoordinates
public virtual void GetTextureCoordinates(float** oTextureCoord)
Deprecated:
V5R14. In favor of GetTextureCoordinates (float ** oTextureCoord, int * oDimension). Retrieves the texture coordinates. This method must be used like this:
 float * textureCoord;
 GetTextureCoord(&textureCoord);
 
Parameters:
oTextureCoord
Retrieves the array of texture coordinates. Each vertex has an associated position in the texture map. The number of texture coordinates groups is always equal to the number of vertices.
o GetTextureCoordinates
public virtual void GetTextureCoordinates(float** oTextureCoord,
int* oDimension)
Retrieves the texture coordinates. This method must be used like this:
 float * textureCoord;
 GetTextureCoord(&textureCoord);
 
Parameters:
oTextureCoord
Retrieves the array of texture coordinates. Each vertex has an associated position in the texture map. The number of texture coordinates groups is always equal to the number of vertices.
oDimension
Retrieve the number of coordinates per vertex.
o GetUV
public virtual void GetUV(int* oAllocate,
float** oUV,
int* oUVArraySize)
Retrieves the face surfacic mesh parameters.
Parameters:
oAllocate
Flag specifiying whether retrieved data is copied or not.
Legal values:
1
retrieved data is copied.
0
retrieves references on data.
oAllocate flag is always returned equal to 0: GetUV() only retrieves references on stored data.
oUV
Retrieves the UV array. Each vertex has an associated UV couple.
oUVArraySize
Retrieves the size of the UV array. Equals 0 if the mesh is shared with another element or if the array is NULL, two times the number of vertices elsewhere.
o GetVertices
public virtual void GetVertices(int* oAllocate,
float** oVertices,
int* oVerticesArraySize)
Retrieves face vertices.
Role: As this method is designed to return values on its parameters, it must be called like this :
 int allocate;
 float * vertices;
 ...
 GetVertices(&allocate, &vertices, ...);
 

Parameters:
oAllocate
Flag specifiying whether retrieved data is copied or not.
Legal values:
1
retrieved data is copied.
0
retrieves references on data.
oAllocate flag is always returned equal to 0: GetVertices only retrieves references on stored data.
oVertices
Retrieves an array made of face vertices coordinates: XYZXYZXYZ... Its size is equal to three times the face vertices number.
oVerticesArraySize
Retrieves the size, in floats, of the oVertices array. Equal to three times the vertices number. If information on vertices is shared with another element, returned size for this parameter is equal to 0.
o HasNormals
public inline int HasNormals(void )
Tests whether the face is owner of its normals informations.
Returns:

Legal values:
1
The face is owner of its normals informations
0
The face is not owner of its normals informations
o HasTextures
public int HasTextures(void )
Tests whether the face is owner of its texture coordinates informations.
Returns:

Legal values:
1
The face is owner of its texture coordinates informations
0
The face is not owner of its texture coordinates informations
o HasVertices
public inline int HasVertices(void )
Tests whether the face is owner of its vertices informations.
Returns:

Legal values:
1
The face is owner of its vertices informations
0
The face is not owner of its vertices informations
o SetTextureCoordinates
public virtual void SetTextureCoordinates(float* iTextureCoord,
int iTextureFormat,
char iAllocMode=ALLOCATE_TEXTURES)
Sets the texture coordinates. If the face shares its vertices, it also shares its texture coordinates.
Parameters:
iTextureCoord
Array of texture coordinates. Each vertex has an associated position in the texture map. The number of texture coordinates groups is always equal to the number of vertices. Because vertex and normal information is being sorted at the face creation, texture coordinates are to be generated with the tessellation parameters that are retrieved after the face creation (ie with properly translated indices). Nevertheless, a mapping operator can be applied at anytime, when the face is the owner of it's vertex data. If computed before the face creation, texture coordinates can be given at the face construction method. In this case, coordinates order is rearranged in parallel with vertices coordinates.
iTextureFormat
iTextureFormat is the number of fields associated to one vertex in the iTextureCoord array. It is also the number of texture coordinates associated to each vertex. Indeed, each vertex has associated coordinates in the texture map. The number of coordinates depends on the map dimension: the texture map may be in 1D, 2D or 3D.
Legal values:
1
The texture map is a one dimension map. Each vertex has a single associated texture coordinate
2
The texture map is a two-dimension map. Each vertex has two associated texture coordinates
3
The texture map is a three-dimension map. Each vertex has three associated texture coordinates
If data is shared, the format for the given texture coordinates must be three.
o SetUV
public virtual void SetUV(float* iUV)
Sets the UV array.
Parameters:
iUV
Array of UV parameters. Its size is equal to 2/3 the vertices array size. The management of this array follows the vertices array management concerning the allocation mode.
o SortAndStrip
public virtual void SortAndStrip(void )
Performs a multi-dimensionnal sort on vertices and normals, and updates all tessellation parameters. Vertices may be spatially sorted using the SortAndStrip method. Meshing information is kept up to date.
Sort is:
          P1 < P2 ==> P1.x < P2.x ||
                      P1.x = P2.x && P1.y < P2.y ||
                      P1.x = P2.x && P1.y = P2.y && P1.z <= P2.z
 

This object is included in the file: CAT3DFaceGP.h
If needed, your Imakefile.mk should include the module: CATViz

Copyright © 2003, Dassault Systèmes. All rights reserved.