v2.37
|
|
Represents a triangle grid. More...
Public Member Functions | |
HRESULT | GetNormal ([in] int index, [out, retval] FloatVector3D *pVector) |
Returns the normal vector by the given index. | |
HRESULT | GetNormalComponents ([in] int index, [out] float *pX, [out] float *pY, [out] float *pZ) |
Returns the normal vector components by the given index. | |
HRESULT | GetTextureCoordinate ([in] int index, [out, retval] FloatPoint2D *pPoint) |
Returns the texture coordinates by the given index. | |
HRESULT | GetTextureCoordinateComponents ([in] int index, [out] float *pX, [out] float *pY) |
Returns the texture coordinates components by the given index. | |
HRESULT | GetTriangle ([in] int index, [out, retval] Triangle *pTriangle) |
Returns the triangle by the given index. | |
HRESULT | GetTriangleComponents ([in] int index, [out] unsigned int *pTriangleV0, [out] unsigned int *pTriangleV1, [out] unsigned int *pTriangleV2) |
Returns the triangle components by the given index. | |
HRESULT | GetVertex ([in] int index, [out, retval] FloatPoint3D *pPoint) |
Returns the vertex by the given index. | |
HRESULT | GetVertexComponents ([in] int index, [out] float *pX, [out] float *pY, [out] float *pZ) |
Returns the vertex components by the given index. | |
Properties | |
VARIANT_BOOL | DoubleSided [get] |
Queries if the grid is double-sided. | |
int | GridType [get] |
The grid type. | |
int | NormalCount [get] |
The number of normals in the grid. | |
int | TextureCoordinateCount [get] |
The number of texture coordinates in the grid. | |
int | TriangleCount [get] |
The number of triangles in the grid. | |
int | VertexCount [get] |
The number of vertices in the grid. | |
Represents a triangle grid.
A grid is a subset of a mesh corresponding to a particular face of an exported object. This interface provides access to grid vertices and their normals and texture coordinates.
Most often, vertex, normal and texture coordinate vector counts are equal. It means that any vertex has a corresponding normal vector and a texture coordinate vector. But in some cases it is possible that a vertex has no normal vector and/or texture coordinate. (One such case when it might happen is when objects are imported into Renga from another CAD.) Therefore you should not assume the numbers of vertices, normal vectors and texture coordinates to be equal. For example:
HRESULT GetNormal | ( | [in] int | index, |
[out, retval] FloatVector3D * | pVector ) |
Returns the normal vector by the given index.
[in] | index | Index. |
[out] | pVector | The requested normal vector. |
HRESULT GetNormalComponents | ( | [in] int | index, |
[out] float * | pX, | ||
[out] float * | pY, | ||
[out] float * | pZ ) |
Returns the normal vector components by the given index.
[in] | index | Index. |
[out] | pX | The x component of the requested normal vector. |
[out] | pY | The y component of the requested normal vector. |
[out] | pZ | The z component of the requested normal vector. |
HRESULT GetTextureCoordinate | ( | [in] int | index, |
[out, retval] FloatPoint2D * | pPoint ) |
Returns the texture coordinates by the given index.
[in] | index | Index. |
[out] | pPoint | The requested texture coordinate. |
HRESULT GetTextureCoordinateComponents | ( | [in] int | index, |
[out] float * | pX, | ||
[out] float * | pY ) |
Returns the texture coordinates components by the given index.
[in] | index | Index. |
[out] | pX | The x component of the requested texture coordinate point. |
[out] | pY | The y component of the requested texture coordinate point. |
HRESULT GetTriangle | ( | [in] int | index, |
[out, retval] Triangle * | pTriangle ) |
Returns the triangle by the given index.
[in] | index | Index. |
[out] | pTriangle | The requested triangle. |
HRESULT GetTriangleComponents | ( | [in] int | index, |
[out] unsigned int * | pTriangleV0, | ||
[out] unsigned int * | pTriangleV1, | ||
[out] unsigned int * | pTriangleV2 ) |
Returns the triangle components by the given index.
[in] | index | Index. |
[out] | pTriangleV0 | The first vertex index of the requested triangle. |
[out] | pTriangleV1 | The second vertex index of the requested triangle. |
[out] | pTriangleV2 | The third vertex index of the requested triangle. |
HRESULT GetVertex | ( | [in] int | index, |
[out, retval] FloatPoint3D * | pPoint ) |
Returns the vertex by the given index.
[in] | index | Vertex index in the collection. |
[out] | pPoint | The requested point with coordinates of the vertex. |
HRESULT GetVertexComponents | ( | [in] int | index, |
[out] float * | pX, | ||
[out] float * | pY, | ||
[out] float * | pZ ) |
Returns the vertex components by the given index.
[in] | index | Vertex index in the collection. |
[out] | pX | The x component of the requested point with coordinates of the vertex. |
[out] | pY | The y component of the requested point with coordinates of the vertex. |
[out] | pZ | The z component of the requested point with coordinates of the vertex. |
|
get |
Queries if the grid is double-sided.
Orientation of the grid sides (i.e. which side is the inner one, and which is the outer) is the same as the orientation of the ExportedObject3D face it represents.
|
get |
The grid type.
|
get |
The number of normals in the grid.
|
get |
The number of texture coordinates in the grid.
|
get |
The number of triangles in the grid.
|
get |
The number of vertices in the grid.