Detailed Description
Mesh class.
Definition at line 651 of file fbgeometry.h.
#include <fbgeometry.h>
List of all members.
Public Member Functions |
| FBMesh (const char *pName, HIObject pObject=NULL) |
| Constructor.
|
bool | TriangleListAdd (int pIndexArraySize, int *pIndexArray, int pMaterialId=0) |
| Add Triangle List, Must be called in-between FBGeometry::GeometryBegin() / GeometryEnd() It's user's responsibility to make sure to input valid index values, otherwise afterwards behavior will be undefined.
|
bool | TriangleStripAdd (int pIndexArraySize, int *pIndexArray, int pMaterialId=0) |
| Add Triangle Strip Must be called in-between FBGeometry::GeometryBegin() / GeometryEnd() It's user's responsibility to make sure to input valid index values, otherwise afterwards behavior will be undefined.
|
bool | PolygonListAdd (int pPolygonSize, int pIndexArraySize, int *pIndexArray, int pMaterialId=0) |
| Add Polygon List Must be called in-between FBGeometry::GeometryBegin() / GeometryEnd() It's user's responsibility to make sure to input valid index values, otherwise afterwards behavior will be undefined.
|
int | PolygonBegin (int pMaterialId=0) |
| Begin Polygon definition.
|
bool | PolygonVertexAdd (int pVertex) |
| Add a vertex.
|
int | PolygonEnd () |
| End Polygon definition.
|
int | PolygonVertexCount (int pPolygonIndex) const |
| Get Polygon vertex count.
|
int | PolygonVertexIndex (int pPolygonIndex, int pVertexPolygonIndex) const |
| Get global (for the mesh) index of a vertex from a polygon.
|
int | PolygonCount () const |
| Get number of polygons in mesh.
|
const int * | PolygonVertexArrayGet (int &pArraySize) const |
| Get the array of polygon vertex (i.e.
|
bool | IsTriangleMesh () const |
| Determines if the mesh is composed entirely of triangles.
|
int | PolygonMaterialIdGet (int pIndex=-1) const |
| Get a Material ID for the given Polygon index.
|
void | ComputeVertexNormals (bool pCW=false) |
| Compute Mesh Vertex Normal.
|
void | InverseNormal () |
| Inverse Normal.
|
Constructor & Destructor Documentation
FBMesh |
( |
const char * |
pName, |
|
|
HIObject |
pObject = NULL |
|
) |
| |
Constructor.
- Parameters:
-
pName | Name of Mesh. |
pObject | For internal use only(default=NULL). |
Member Function Documentation
bool TriangleListAdd |
( |
int |
pIndexArraySize, |
|
|
int * |
pIndexArray, |
|
|
int |
pMaterialId = 0 |
|
) |
| |
Add Triangle List, Must be called in-between FBGeometry::GeometryBegin() / GeometryEnd() It's user's responsibility to make sure to input valid index values, otherwise afterwards behavior will be undefined.
- Parameters:
-
pIndexArraySize | Size of pIndexArray, Added triangle count is floor(max(pIndexArraySize, 0) / 3) |
pIndexArray | Index array of triangle list. |
pMaterialId | Index of material for this polygon. Only effective when MaterialMappingMode is kFBGeometryMapping_BY_POLYGON mode. |
- Note:
- The indexes' value in input pIndexArray won't be validated, and the behavior is undefined if out of range.
bool TriangleStripAdd |
( |
int |
pIndexArraySize, |
|
|
int * |
pIndexArray, |
|
|
int |
pMaterialId = 0 |
|
) |
| |
Add Triangle Strip Must be called in-between FBGeometry::GeometryBegin() / GeometryEnd() It's user's responsibility to make sure to input valid index values, otherwise afterwards behavior will be undefined.
- Parameters:
-
pIndexArraySize | Size of pIndexArray, Added triangle count is max(pIndexArraySize - 2, 0) |
pIndexArray | Index array of triangle strip. |
pMaterialId | Index of material for this polygon. Only effective when MaterialMappingMode is kFBGeometryMapping_BY_POLYGON mode. |
- Note:
- The indexes' value in input pIndexArray won't be validated, and the behavior is undefined if out of range.
bool PolygonListAdd |
( |
int |
pPolygonSize, |
|
|
int |
pIndexArraySize, |
|
|
int * |
pIndexArray, |
|
|
int |
pMaterialId = 0 |
|
) |
| |
Add Polygon List Must be called in-between FBGeometry::GeometryBegin() / GeometryEnd() It's user's responsibility to make sure to input valid index values, otherwise afterwards behavior will be undefined.
- Parameters:
-
pPolygonSize | Size of polygon, 3 mean triangle, 4 for quadrilateral, and so on. minimum input value is 3. |
pIndexArraySize | Size of pIndexArray, Added polygon count is floor(max(pIndexArraySize, 0) / pPolygonSize) |
pIndexArray | Index array of triangle strip. |
pMaterialId | Index of material for this polygon. Only effective when MaterialMappingMode is kFBGeometryMapping_BY_POLYGON mode. |
- Note:
- The indexes' value in input pIndexArray won't be validated, and the behavior is undefined if out of range.
int PolygonBegin |
( |
int |
pMaterialId = 0 | ) |
|
Begin Polygon definition.
- Parameters:
-
pMaterialId | Index of material for this polygon. Only effective when MaterialMappingMode is kFBGeometryMapping_BY_POLYGON mode. |
- Returns:
- Number of existing polygons in Mesh
bool PolygonVertexAdd |
( |
int |
pVertex | ) |
|
Add a vertex.
- Parameters:
-
pVertex | Index in mesh of vertex to add to polygon, must be in range of [0, ControlPointCount) |
- Returns:
- true if successful.
End Polygon definition.
Clean up and associate vertices internally.
- Returns:
- Current number of polygons.
- Note:
- MoBu expect each polygon to contain at least 3 vertices, the behavior is undefined if user add less than 3 vertices polygon.
int PolygonVertexCount |
( |
int |
pPolygonIndex | ) |
const |
Get Polygon vertex count.
- Parameters:
-
pPolygonIndex | Index of polygon to get vertex count from. |
- Returns:
- Number of vertices in polygon at
pPolygonIndex
.
int PolygonVertexIndex |
( |
int |
pPolygonIndex, |
|
|
int |
pVertexPolygonIndex |
|
) |
| const |
Get global (for the mesh) index of a vertex from a polygon.
- Parameters:
-
pPolygonIndex | Index of polygon in question. |
pVertexPolygonIndex | Polygon vertex index. |
- Returns:
- Index in mesh of vertex.
int PolygonCount |
( |
| ) |
const |
Get number of polygons in mesh.
- Returns:
- Number of polygons in mesh.
const int* PolygonVertexArrayGet |
( |
int & |
pArraySize | ) |
const |
Get the array of polygon vertex (i.e.
index to control points). This array is a concatenation of the list of polygon vertices of all the polygons. Example: a mesh made of 2 triangles [1,2,3] and [2,3,4] results in [1,2,3,2,3,4]. The first polygon starts at position 0 and the second at position 3.
- Parameters:
-
pArraySize | Polygon vertex array size. |
- Returns:
- Readonly polygon vertex array.
bool IsTriangleMesh |
( |
| ) |
const |
Determines if the mesh is composed entirely of triangles.
- Returns:
- true if all polygons are triangles, false otherwise
int PolygonMaterialIdGet |
( |
int |
pIndex = -1 | ) |
const |
Get a Material ID for the given Polygon index.
- Parameters:
-
pIndex | Polygon's index to get material ID at (default=-1). |
- Returns:
- ID of material of vertex at
pIndex
.
void ComputeVertexNormals |
( |
bool |
pCW = false | ) |
|
Compute Mesh Vertex Normal.
- Parameters:
-
pCW | True for clock wise normal, otherwise for counter-clock wise |
The documentation for this class was generated from the following file: