CrystalSpace

Public API Reference

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

iGeneralFactoryState Struct Reference

This interface describes the API for the general mesh factory. More...

#include <imesh/genmesh.h>

Inheritance diagram for iGeneralFactoryState:

iGeneralMeshCommonState iBase List of all members.

Public Member Functions

virtual void CalculateNormals ()=0
 Automatically calculate normals based on the current mesh.
virtual void GenerateBox (const csBox3 &box)=0
 Automatically generate a box.
virtual void GenerateSphere (const csSphere &sphere, int rim_vertices)=0
 Automatically generate a sphere.
virtual iGenMeshAnimationControlFactoryGetAnimationControlFactory () const =0
 Get the current animation control factory for this factory.
virtual csColor4GetColors ()=0
 Get the array of colors.
virtual csVector3GetNormals ()=0
 Get the array of normals.
virtual csVector2GetTexels ()=0
 Get the array of texels.
virtual int GetTriangleCount () const =0
 Get the number of triangles for this mesh.
virtual csTriangleGetTriangles ()=0
 Get the array of triangles.
virtual int GetVertexCount () const =0
 Get the number of vertices for this mesh.
virtual csVector3GetVertices ()=0
 Get the array of vertices.
virtual void Invalidate ()=0
 After making a significant change to the vertices or triangles you probably want to let this object recalculate the bounding boxes and such.
virtual bool IsAutoNormals () const =0
 Returns whether normals were autogenerated or manual.
virtual bool IsBack2Front () const =0
 Get the value of the back2front flag.
virtual void SetAnimationControlFactory (iGenMeshAnimationControlFactory *anim_ctrl)=0
 Set the animation control factory to use for this factory.
virtual void SetBack2Front (bool b2f)=0
 Enable back to front rendering for the triangles of this genmesh.
virtual void SetTriangleCount (int n)=0
 Set the number of triangles to use for this mesh.
virtual void SetVertexCount (int n)=0
 Set the number of vertices to use for this mesh.

Detailed Description

This interface describes the API for the general mesh factory.

iGeneralFactoryState inherits from iGeneralMeshState. All methods from iGeneralMeshState 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:

Main ways to get pointers to this interface: Main users of this interface:

Definition at line 199 of file genmesh.h.


Member Function Documentation

virtual void iGeneralFactoryState::CalculateNormals  )  [pure virtual]
 

Automatically calculate normals based on the current mesh.

virtual void iGeneralFactoryState::GenerateBox const csBox3 box  )  [pure virtual]
 

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.

virtual void iGeneralFactoryState::GenerateSphere const csSphere sphere,
int  rim_vertices
[pure virtual]
 

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.

virtual iGenMeshAnimationControlFactory* iGeneralFactoryState::GetAnimationControlFactory  )  const [pure virtual]
 

Get the current animation control factory for this factory.

virtual csColor4* iGeneralFactoryState::GetColors  )  [pure virtual]
 

Get the array of colors.

It is legal to modify the colors in this array. The number of colors in this array will be equal to the number of vertices set. Note that modifying the colors will not do a lot if manual colors is not enabled (SetManualColors).

virtual csVector3* iGeneralFactoryState::GetNormals  )  [pure virtual]
 

Get the array of normals.

It is legal to modify the normals in this array. The number of normals in this array will be equal to the number of vertices set. Note that modifying the normals is only useful when manual colors are not enabled and lighting is enabled because the normals are used for lighting.

virtual csVector2* iGeneralFactoryState::GetTexels  )  [pure virtual]
 

Get the array of texels.

It is legal to modify the texels in this array. The number of texels in this array will be equal to the number of vertices set.

virtual int iGeneralFactoryState::GetTriangleCount  )  const [pure virtual]
 

Get the number of triangles for this mesh.

virtual csTriangle* iGeneralFactoryState::GetTriangles  )  [pure virtual]
 

Get the array of triangles.

It is legal to modify the triangles in this array. The number of triangles in this array will be equal to the number of triangles set.

virtual int iGeneralFactoryState::GetVertexCount  )  const [pure virtual]
 

Get the number of vertices for this mesh.

virtual csVector3* iGeneralFactoryState::GetVertices  )  [pure virtual]
 

Get the array of vertices.

It is legal to modify the vertices in this array. The number of vertices in this array will be equal to the number of vertices set.

virtual void iGeneralFactoryState::Invalidate  )  [pure virtual]
 

After making a significant change to the vertices or triangles you probably want to let this object recalculate the bounding boxes and such.

This function will invalidate the internal data structures so that they are recomputed.

virtual bool iGeneralFactoryState::IsAutoNormals  )  const [pure virtual]
 

Returns whether normals were autogenerated or manual.

virtual bool iGeneralFactoryState::IsBack2Front  )  const [pure virtual]
 

Get the value of the back2front flag.

virtual void iGeneralFactoryState::SetAnimationControlFactory iGenMeshAnimationControlFactory anim_ctrl  )  [pure virtual]
 

Set the animation control factory to use for this factory.

See iGenMeshAnimationControlFactory for more information.

virtual void iGeneralFactoryState::SetBack2Front bool  b2f  )  [pure virtual]
 

Enable back to front rendering for the triangles of this genmesh.

This is useful if this factory represents a transparent genmesh or the material that is being used is itself transparent.

virtual void iGeneralFactoryState::SetTriangleCount int  n  )  [pure virtual]
 

Set the number of triangles to use for this mesh.

virtual void iGeneralFactoryState::SetVertexCount int  n  )  [pure virtual]
 

Set the number of vertices to use for this mesh.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.4.4