iInstancingFactoryState Struct Reference
[Mesh plugins]
This interface describes the API for the instancing mesh factory.
More...
#include <imesh/instmesh.h>
Inheritance diagram for iInstancingFactoryState:

Public Member Functions | |
virtual void | AddTriangle (const csTriangle &tri)=0 |
Add a triangle. | |
virtual void | AddVertex (const csVector3 &v, const csVector2 &uv, const csVector3 &normal, const csColor4 &color)=0 |
Add a vertex. | |
virtual void | CalculateNormals (bool compress=true)=0 |
Automatically calculate normals based on the current mesh. | |
virtual void | Compress ()=0 |
Compress the vertex table. | |
virtual void | GenerateBox (const csBox3 &box)=0 |
Automatically generate a box. | |
virtual void | GenerateSphere (const csEllipsoid &sphere, int rim_vertices, bool cyl_mapping=false, bool toponly=false, bool reversed=false)=0 |
Automatically generate a sphere. | |
virtual const csColor4 * | GetColors ()=0 |
Get the array of colors. | |
virtual const csVector3 * | GetNormals ()=0 |
Get the array of normals. | |
virtual const csVector2 * | GetTexels ()=0 |
Get the array of texels. | |
virtual size_t | GetTriangleCount () const =0 |
Get the number of triangles for this mesh. | |
virtual const csTriangle * | GetTriangles ()=0 |
Get the array of triangles. | |
virtual size_t | GetVertexCount () const =0 |
Get the number of vertices for this mesh. | |
virtual const csVector3 * | GetVertices ()=0 |
Get the array of vertices. | |
virtual bool | IsAutoNormals () const =0 |
Returns whether normals were autogenerated or manual. |
Detailed Description
This interface describes the API for the instancing mesh factory.iInstancingFactoryState inherits from iInstancingMeshCommonState. All methods from iInstancingMeshCommonState as set on the factory will serve as defaults for mesh objects that are created from this factory AFTER the default value is set. So changing such a value on the factory will have no effect on meshes already created. The material wrapper is an exception to this rule. Setting that on the factory will have an effect immediatelly on all mesh objects created from that factory except for those mesh objects that have their own material set.
Main creators of instances implementing this interface:
- Instmesh mesh object plugin (crystalspace.mesh.object.instmesh)
- iMeshObjectType::NewFactory()
Main ways to get pointers to this interface:
Main users of this interface:
- Instmesh Factory Loader plugin (crystalspace.mesh.loader.factory.instmesh)
Definition at line 168 of file instmesh.h.
Member Function Documentation
|
Add a triangle.
|
|
Add a vertex.
|
|
Automatically calculate normals based on the current mesh. /param compress if true (default) then calculate the normals based on compressed vertices. |
|
Compress the vertex table. This should be called after setting up the geometry. |
|
Automatically generate a box. This will set the number of vertices to eight and generate vertices, texels, and triangles. The colors and normals are not initialized here. |
|
Automatically generate a sphere. This will set the apropriate number of vertices and generate vertices, texels, normals, and triangles. The colors are not initialized here.
|
|
Get the array of colors.
|
|
Get the array of normals.
|
|
Get the array of texels.
|
|
Get the number of triangles for this mesh.
|
|
Get the array of triangles.
|
|
Get the number of vertices for this mesh.
|
|
Get the array of vertices.
|
|
Returns whether normals were autogenerated or manual.
|
The documentation for this struct was generated from the following file:
- imesh/instmesh.h
Generated for Crystal Space by doxygen 1.4.6