beastapi/beastmesh.h File Reference
The api for specifying meshes in beast.
|
ILBStatus | ILBAddColorData (ILBMeshHandle mesh, const ILBLinearRGBA *colorData, int32 vertexCount) |
|
ILBStatus | ILBAddTangentData (ILBMeshHandle mesh, const ILBVec3 *tangentData, const ILBVec3 *bitangentData, int32 vertexCount) |
|
ILBStatus | ILBAddTriangleData (ILBMeshHandle mesh, const int32 *indexData, int32 indexCount) |
|
ILBStatus | ILBAddUVData (ILBMeshHandle mesh, const ILBVec2 *uvData, int32 vertexCount) |
|
ILBStatus | ILBAddVertexData (ILBMeshHandle mesh, const ILBVec3 *positionData, const ILBVec3 *normalData, int32 vertexCount) |
|
ILBStatus | ILBBeginColorLayer (ILBMeshHandle mesh, ILBConstString layerName) |
|
ILBStatus | ILBBeginMaterialGroup (ILBMeshHandle mesh, ILBConstString materialName) |
|
ILBStatus | ILBBeginMesh (ILBManagerHandle beastManager, ILBConstString uniqueName, ILBMeshHandle *targetMesh) |
|
ILBStatus | ILBBeginTangents (ILBMeshHandle mesh) |
|
ILBStatus | ILBBeginUVLayer (ILBMeshHandle mesh, ILBConstString layerName) |
|
ILBStatus | ILBEndColorLayer (ILBMeshHandle mesh) |
|
ILBStatus | ILBEndMaterialGroup (ILBMeshHandle mesh) |
|
ILBStatus | ILBEndMesh (ILBMeshHandle mesh) |
|
ILBStatus | ILBEndTangents (ILBMeshHandle mesh) |
|
ILBStatus | ILBEndUVLayer (ILBMeshHandle mesh) |
|
ILBStatus | ILBFindMesh (ILBManagerHandle beastManager, ILBConstString uniqueName, ILBMeshHandle *target) |
|
Add color data to the active color set.
- Parameters
-
mesh | the mesh to add color data to. |
colorData | a pointer to an array of color data. |
vertexCount | the number of colors in the array |
- Returns
- The result of the operation.
Adds a batch of tangents and bitangents (binormals) to a mesh.
It may be called multiple times, but the total number of added tangents/bitangents may never be more than there are vertices in the mesh.
- Parameters
-
mesh | the mesh to add tangent data on. |
tangentData | an array of tangents to add. |
bitangentData | an array of bitangents to add. |
vertexCount | the number of tangents/bitangents to add. |
- Returns
- The result of the operation.
Add triangles to a material group.
The indices refers to the vertices added with AddVertexData. The triangles should be defined so the objects outside sees it as counter clock wise to make sure the outside is visible if rendering them single sided.
- Parameters
-
mesh | the mesh on which to add the triangles to |
indexData | the indices of the triangles to add |
indexCount | the total index count. Must be a multiply of 3 (i.e each batch must end in a complete triangle) |
- Returns
- The result of the operation.
Adds a batch of UV coordinates to a mesh.
It may be called multiple times, but the total number of add UV's may never be more than there are vertices in the mesh.
- Parameters
-
mesh | the mesh to add UV data on. |
uvData | an array of UV coordinates to add to the UV layer |
vertexCount | the number of UV coordinates in the uvData array. |
- Returns
- The result of the operation.
Adds a chunk of vertex data to a mesh.
This can be called multiple times to keep temporary buffer bounded.
- Parameters
-
mesh | the mesh to add vertices to. |
positionData | a pointer to an array of vertex positions |
normalData | a pointer to an array of vertex normals |
vertexCount | the number of positions/normals specified in this call. Behavior is undefined if positionData or normalsData contains less than vertexCount positions/normals |
- Returns
- The result of the operation.
Creates a new color layer.
- Parameters
-
mesh | the mesh to add the color layer to |
layerName | the name of the layer, must be unique. |
- Returns
- The result of the operation.
Begins a material group.
- Parameters
-
mesh | the mesh to add a material group to |
materialName | name of the default material on this group |
- Returns
- The result of the operation.
Begins creation of a mesh.
- Parameters
-
beastManager | the beast manager this mesh will be associated with |
uniqueName | a name that must be unique within the scene. Used to look it up in the cache. |
targetMesh | a pointer to a Beast mesh object that will receive the created object |
- Returns
- The result of the operation.
Begins adding tangents and bitangents to the mesh.
Use ILBAddTangentData to add tangent and bitangent data.
- Parameters
-
mesh | the mesh to add tangent data to. Must not be finalized yet. |
- Returns
- The result of the operation.
Creates a new UV layer.
Use AddUVData to add UV coordinates.
- Parameters
-
mesh | the mesh to add the UV layer to. Must not be finalized yet. |
layerName | the UV layer name. Must be unique within the mesh |
- Returns
- The result of the operation.
Finalizes a color layer.
The total number of added colors must be the same as the vertex count in the mesh.
- Parameters
-
mesh | the mesh to finalize the color layer on. |
- Returns
- The result of the operation.
End a material group.
- Parameters
-
mesh | the mesh to end the material group on |
- Returns
- The result of the operation.
Finalizes a mesh.
After this call, it's possible to create instances from the mesh.
Will fail if any material group, uvLayer or colorLayer is unfinished
- Parameters
-
- Returns
- The result of the operation.
Ends adding tangent data to the mesh.
Will fail if not the current number of tangents is the same as the number of vertices in the mesh.
- Parameters
-
mesh | the mesh to finalize the tangent data on. |
- Returns
- The result of the operation.
Ends the UV layer currently being created.
Will fail if not the current number of UV's is the same as the number of vertices in the mesh.
- Parameters
-
mesh | the mesh to finalize the UV layer on. |
- Returns
- The result of the operation.
Finds a cached mesh.
- Parameters
-
beastManager | the beast manager to check whether the mesh is available in |
uniqueName | the unique name for mesh. |
target | the mesh handle to store the mesh in |
- Returns
- The result of the operation.
ILB_ST_SUCCESS if the mesh is available ILB_ST_UNKNOWN_OBJECT if the mesh is not in the cache
Go to the source code of this file.