Mesh class.
Public Member Functions | |
__init__ (str pName, object pObject=None) | |
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) |
Get Polygon vertex count. | |
int | PolygonVertexIndex (int pPolygonIndex, int pVertexPolygonIndex) |
Get global (for the mesh) index of a vertex from a polygon. | |
int | PolygonCount () |
Get number of polygons in mesh. | |
int | PolygonVertexArrayGet (int pArraySize) |
Get the array of polygon vertex (i.e. | |
bool | IsTriangleMesh () |
Determines if the mesh is composed entirely of triangles. | |
int | PolygonMaterialIdGet (int pIndex=-1) |
Get a Material ID for the given Polygon index. | |
ComputeVertexNormals (bool pCW=False) | |
Compute Mesh Vertex Normal. | |
InverseNormal () | |
Inverse Normal. |
Constructor.
pName | Name of Mesh. |
pObject | For internal use only(default=NULL). |
Reimplemented from FBGeometry.
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.
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. |
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.
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. |
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.
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. |
Begin Polygon definition.
pMaterialId | Index of material for this polygon. Only effective when MaterialMappingMode is kFBGeometryMapping_BY_POLYGON mode. |
Add a vertex.
pVertex | Index in mesh of vertex to add to polygon, must be in range of [0, ControlPointCount) |
int PolygonEnd | ( | ) |
End Polygon definition.
Clean up and associate vertices internally.
Get Polygon vertex count.
pPolygonIndex | Index of polygon to get vertex count from. |
pPolygonIndex
. Get global (for the mesh) index of a vertex from a polygon.
pPolygonIndex | Index of polygon in question. |
pVertexPolygonIndex | Polygon vertex index. |
int PolygonCount | ( | ) |
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.
pArraySize | Polygon vertex array size. |
bool IsTriangleMesh | ( | ) |
Determines if the mesh is composed entirely of triangles.
Get a Material ID for the given Polygon index.
pIndex | Polygon's index to get material ID at (default=-1). |
pIndex
. ComputeVertexNormals | ( | bool | pCW = False | ) |
Compute Mesh Vertex Normal.
pCW | True for clock wise normal, otherwise for counter-clock wise |
InverseNormal | ( | ) |
Inverse Normal.