CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

iGeneralFactoryState Struct Reference

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

#include <genmesh.h>

Inheritance diagram for iGeneralFactoryState:

iBase List of all members.

Public Methods

virtual void SetMaterialWrapper (iMaterialWrapper *material)=0
 Set material of factory.

virtual iMaterialWrapperGetMaterialWrapper () const=0
 Get material of factory.

virtual void SetVertexCount (int n)=0
 Set the number of vertices to use for this mesh.

virtual int GetVertexCount () const=0
 Get the number of vertices for this mesh.

virtual csVector3GetVertices ()=0
 Get the array of vertices.

virtual csVector2GetTexels ()=0
 Get the array of texels.

virtual csVector3GetNormals ()=0
 Get the array of normals.

virtual void SetTriangleCount (int n)=0
 Set the number of triangles to use for this mesh.

virtual int GetTriangleCount () const=0
 Get the number of triangles for this mesh.

virtual csTriangleGetTriangles ()=0
 Get the array of triangles.

virtual csColorGetColors ()=0
 Get the array of colors.

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 void CalculateNormals ()=0
 Automatically calculate normals based on the current mesh.

virtual void GenerateBox (const csBox3 &box)=0
 Automatically generate a box.

virtual bool AddRenderBuffer (const char *name, csRenderBufferComponentType component_type, int component_size)=0
 @@NR@@ Adds an independantly named stream, sets to VertexCount

virtual bool SetRenderBufferComponent (const char *name, int index, int component, float value)=0
 @@NR@@ Adds a component to stream with name

virtual bool SetRenderBuffer (const char *name, float *value)=0
 @@NR@@ Sets the stream based on the input array


Detailed Description

This interface describes the API for the general mesh factory.

Definition at line 90 of file genmesh.h.


Member Function Documentation

virtual bool iGeneralFactoryState::AddRenderBuffer const char *    name,
csRenderBufferComponentType    component_type,
int    component_size
[pure virtual]
 

@@NR@@ Adds an independantly named stream, sets to VertexCount

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 csColor* 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 iMaterialWrapper* iGeneralFactoryState::GetMaterialWrapper   [pure virtual]
 

Get material of factory.

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   [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   [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 void iGeneralFactoryState::SetMaterialWrapper iMaterialWrapper   material [pure virtual]
 

Set material of factory.

virtual bool iGeneralFactoryState::SetRenderBuffer const char *    name,
float *    value
[pure virtual]
 

@@NR@@ Sets the stream based on the input array

virtual bool iGeneralFactoryState::SetRenderBufferComponent const char *    name,
int    index,
int    component,
float    value
[pure virtual]
 

@@NR@@ Adds a component to stream with name

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.2.18