VisualizationFoundation 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(void)
- Default constructor.
- 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(float[],int,float[],int,int[],int,int[],int,int[],int[],int,int[],float*,int,char,float*,float,float*)
- Constructs a 3D face graphic primitive from the face vertices coordinates list,
and their texture coordinates.
Method Index
- o
Draw(CATRender&)
- Draws the face.
- o
Get(int*,float**,int*,float**,int*,int**,int*,int**,int*,int**,int**,int*,int**)
-
- o
GetReadOnly(int*,float const**,int*,float const**,int*,int const**,int*,int const**,int*,int const**,int const**,int*,int const**)
- Retrieves the tessellation information from the face.
- o
GetReadOnly(int*,float const**,int*,float const**,int*,int const**,int*,int const**,int*,int const**,int const**,int*,int const**,void**)
-
- o
GetTextureCoordinates(float**)
-
- o
GetTextureCoordinates(float**,int*)
-
- o
GetTextureCoordinatesReadOnly(float const**)
-
- o
GetTextureCoordinatesReadOnly(float const**,int*)
- Retrieves the texture coordinates.
- o
GetUV(int*,float**,int*)
-
- o
GetUVReadOnly(int*,float const**,int*)
- Retrieves the face surfacic mesh parameters.
- o
GetVertices(int*,float**,int*)
-
- o
GetVerticesReadOnly(int*,float const**,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)
-
- o
SetUV(float*)
-
- o
SortAndStrip(void)
- Performs a multi-dimensionnal sort on vertices and normals, and updates
all tessellation parameters.
Constructor and Destructor
o CAT3DFaceGP
-
Default constructor.
o CAT3DFaceGP
public CAT3DFaceGP( | const | iVertices, |
| const | iVerticesArraySize, |
| const | iNormals, |
| const | iNormalsArraySize, |
| const | iTriangleIndices, |
| const | iNbTriangle, |
| const | iTriangleStripIndices, |
| const | iNbTriangleStrip, |
| const | iNbVertexPerTriangleStrip, |
| const | iTriangleFanIndices, |
| const | iNbTriangleFan, |
| const | iNbVertexPerTriangleFan, |
| const | iTextureCoord | =NULL, |
| const | iTextureFormat | =3, |
| const | iAllocMode | =ALLOCATE_VERTICES | ALLOCATE_NORMALS | ALLOCATE_TEXTURES, |
| const | tanBinormal | =NULL, |
| const | iUV | =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.
CAUTION: The CAT3DFaceGP is an immutable object. GET_***** alloc mode only avoid an expensive copy
Modifying the iVertices pointer used with GET_VERTICES, the iNormals pointer used with GET_NORMALS,
or the iTextureCoord pointer with GET_TEXTURES won't update the CAT3DFaceGP's data.
You need to create a new GP, or recycle the old one with CAT3DFaceGPEditHelper, even if you used GET_****** alloc mode.
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 | iVertices, |
| const | iVerticesArraySize, |
| const | iNormals, |
| const | iNormalsArraySize, |
| const | iTriangleIndices, |
| const | iNbTriangle, |
| const | iTriangleStripIndices, |
| const | iNbTriangleStrip, |
| const | iNbVertexPerTriangleStrip, |
| const | iTriangleFanIndices, |
| const | iNbTriangleFan, |
| const | iNbVertexPerTriangleFan, |
| const | iTextureCoord, |
| const | iTextureFormat, |
| const | iAllocMode, |
| const | tanBinormal, |
| const | iToleranceScale, |
| const | iUV | = 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.
CAUTION: The CAT3DFaceGP is an immutable object. GET_***** alloc mode only avoid an expensive copy
Modifying the iVertices pointer used with GET_VERTICES, the iNormals pointer used with GET_NORMALS,
or the iTextureCoord pointer with GET_TEXTURES won't update the CAT3DFaceGP's data.
You need to create a new GP, or recycle the old one with CAT3DFaceGPEditHelper, even if you used GET_****** alloc mode.
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.
Methods
o Draw
public virtual Draw( | | iRender) |
-
Draws the face.
- Parameters:
-
- iRender
- The render through which the face is drawn.
o Get
public Get( | | oAllocate, |
| | oVertices, |
| | oVerticesArraySize, |
| | oNormals, |
| | oNormalsArraySize, |
| | oTriangleIndices, |
| | oNbTriangle, |
| | oTriangleStripIndices, |
| | oNbTriangleStrip, |
| | oNbVertexPerTriangleStrip, |
| | oTriangleFanIndices, |
| | oNbTriangleFan, |
| | oNbVertexPerTriangleFan) |
-
- Deprecated:
- R216
See GetReadOnly for read access and CAT3DFaceGPEditHelper for write access
o GetReadOnly
public GetReadOnly( | | oAllocate, |
| | oVertices, |
| | oVerticesArraySize, |
| | oNormals, |
| | oNormalsArraySize, |
| | oTriangleIndices, |
| | oNbTriangle, |
| | oTriangleStripIndices, |
| | oNbTriangleStrip, |
| | oNbVertexPerTriangleStrip, |
| | oTriangleFanIndices, |
| | oNbTriangleFan, |
| | 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 const* vertices;
...
GetReadOnly(&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 GetReadOnly
public GetReadOnly( | | oAllocate, |
| | oVertices, |
| | oVerticesArraySize, |
| | oNormals, |
| | oNormalsArraySize, |
| | oTriangleIndices, |
| | oNbTriangle, |
| | oTriangleStripIndices, |
| | oNbTriangleStrip, |
| | oNbVertexPerTriangleStrip, |
| | oTriangleFanIndices, |
| | oNbTriangleFan, |
| | oNbVertexPerTriangleFan, |
| | oRenderData) |
-
o GetTextureCoordinates
public virtual GetTextureCoordinates( | | oTextureCoord) |
-
- Deprecated:
- V5R14
o GetTextureCoordinates
public virtual GetTextureCoordinates( | | oTextureCoord, |
| | oDimension) |
-
- Deprecated:
- R216
see GetTextureCoordinatesReadOnly for read access and CAT3DFaceGPEditHelper for write access
o GetTextureCoordinatesReadOnly
public virtual GetTextureCoordinatesReadOnly( | | 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 GetTextureCoordinatesReadOnly
public virtual GetTextureCoordinatesReadOnly( | | oTextureCoord, |
| | 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 GetUV( | | oAllocate, |
| | oUV, |
| | oUVArraySize) |
-
- Deprecated:
- R216
see GetUVReadOnly for read access and CAT3DFaceGPEditHelper for write access
o GetUVReadOnly
public virtual GetUVReadOnly( | | oAllocate, |
| | oUV, |
| | 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 GetVertices( | | oAllocate, |
| | oVertices, |
| | oVerticesArraySize) |
-
- Deprecated:
- R216
See GetVerticesReadOnly for read access and CAT3DFaceGPEditHelper for write access
o GetVerticesReadOnly
public virtual GetVerticesReadOnly( | | oAllocate, |
| | oVertices, |
| | 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 const* vertices;
...
GetVerticesReadOnly(&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
-
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
-
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
-
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 SetTextureCoordinates( | | iTextureCoord, |
| | iTextureFormat, |
| | iAllocMode | =ALLOCATE_TEXTURES) |
-
- Deprecated:
- R216
Use CAT3DFaceGPEditHelper to edit the face.
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 SetUV( | | iUV) |
-
- Deprecated:
- R216
Use CAT3DFaceGPEditHelper to edit the face.
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 SortAndStrip( | | ) |
-
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: CATVisFoundation
Copyright © 1999-2015, Dassault Systèmes. All rights reserved.