CrystalSpace

Public API Reference

iGeneralMeshCommonState Struct Reference
[Mesh pluginsMesh plugins]

The common interface between genmesh meshes and factories. More...

#include <imesh/genmesh.h>

Inheritance diagram for iGeneralMeshCommonState:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual bool AddRenderBuffer (const char *name, iRenderBuffer *buffer)=0
 Adds an independently named render buffer.
virtual void AddSubMesh (unsigned int *triangles, int tricount, iMaterialWrapper *material, uint mixmode)=0
 Add a submesh to this object.
virtual void AddSubMesh (unsigned int *triangles, int tricount, iMaterialWrapper *material)=0
 Add a submesh to this object.
virtual void ClearSubMeshes ()=0
 Remove all submeshes added to this object.
virtual const csColorGetColor () const =0
 Get the color.
virtual iMaterialWrapperGetMaterialWrapper () const =0
 Get material of mesh.
virtual uint GetMixMode () const =0
 Get mix mode.
virtual bool IsLighting () const =0
 Is lighting enabled.
virtual bool IsManualColors () const =0
 Are manual colors enabled?
virtual bool IsShadowCasting () const =0
 Is shadow casting enabled?
virtual bool IsShadowReceiving () const =0
 Is shadow receiving enabled?
virtual bool RemoveRenderBuffer (const char *name)=0
 Removes an independently named render buffer.
virtual void SetColor (const csColor &col)=0
 Set the color to use. Will be added to the lighting values.
virtual void SetLighting (bool l)=0
 Set lighting.
virtual void SetManualColors (bool m)=0
 Set manual colors.
virtual void SetMaterialWrapper (iMaterialWrapper *material)=0
 Set material of mesh.
virtual void SetMixMode (uint mode)=0
 Set mix mode.
virtual void SetShadowCasting (bool m)=0
 Set shadowing.
virtual void SetShadowReceiving (bool m)=0
 Set shadow receiving on.

Detailed Description

The common interface between genmesh meshes and factories.

This interface is usually not used alone. Generally one uses iGeneralMeshState or iGeneralFactoryState.

Definition at line 53 of file genmesh.h.


Member Function Documentation

virtual bool iGeneralMeshCommonState::AddRenderBuffer const char *  name,
iRenderBuffer buffer
[pure virtual]
 

Adds an independently named render buffer.

virtual void iGeneralMeshCommonState::AddSubMesh unsigned int *  triangles,
int  tricount,
iMaterialWrapper material,
uint  mixmode
[pure virtual]
 

Add a submesh to this object.

A submesh is a subset of the mesh triangles rendered with a certain material. When a mesh has one or more submeshes, only submeshes are drawn and not original geometry. That means submeshes should cover all original triangles to avoid holes in the mesh. triangles is an array of indices into the factory triangle list tricount is the number of triangles in "triangles" material is a material to assign to the mesh Note! Submeshes added to an instance of a genmesh will override the submeshes from the factory (i.e. the submeshes of the factory will be completely ignored as soon as the instance has submeshes). This version overrides the parent mixmode.

virtual void iGeneralMeshCommonState::AddSubMesh unsigned int *  triangles,
int  tricount,
iMaterialWrapper material
[pure virtual]
 

Add a submesh to this object.

A submesh is a subset of the mesh triangles rendered with a certain material. When a mesh has one or more submeshes, only submeshes are drawn and not original geometry. That means submeshes should cover all original triangles to avoid holes in the mesh. triangles is an array of indices into the factory triangle list tricount is the number of triangles in "triangles" material is a material to assign to the mesh Note! Submeshes added to an instance of a genmesh will override the submeshes from the factory (i.e. the submeshes of the factory will be completely ignored as soon as the instance has submeshes).

virtual void iGeneralMeshCommonState::ClearSubMeshes  )  [pure virtual]
 

Remove all submeshes added to this object.

virtual const csColor& iGeneralMeshCommonState::GetColor  )  const [pure virtual]
 

Get the color.

virtual iMaterialWrapper* iGeneralMeshCommonState::GetMaterialWrapper  )  const [pure virtual]
 

Get material of mesh.

virtual uint iGeneralMeshCommonState::GetMixMode  )  const [pure virtual]
 

Get mix mode.

virtual bool iGeneralMeshCommonState::IsLighting  )  const [pure virtual]
 

Is lighting enabled.

virtual bool iGeneralMeshCommonState::IsManualColors  )  const [pure virtual]
 

Are manual colors enabled?

virtual bool iGeneralMeshCommonState::IsShadowCasting  )  const [pure virtual]
 

Is shadow casting enabled?

virtual bool iGeneralMeshCommonState::IsShadowReceiving  )  const [pure virtual]
 

Is shadow receiving enabled?

virtual bool iGeneralMeshCommonState::RemoveRenderBuffer const char *  name  )  [pure virtual]
 

Removes an independently named render buffer.

virtual void iGeneralMeshCommonState::SetColor const csColor col  )  [pure virtual]
 

Set the color to use. Will be added to the lighting values.

virtual void iGeneralMeshCommonState::SetLighting bool  l  )  [pure virtual]
 

Set lighting.

virtual void iGeneralMeshCommonState::SetManualColors bool  m  )  [pure virtual]
 

Set manual colors.

If this is set then lighting will be ignored and so will the color set with SetColor(). In this case you can manipulate the color array manually by calling GetColors().

virtual void iGeneralMeshCommonState::SetMaterialWrapper iMaterialWrapper material  )  [pure virtual]
 

Set material of mesh.

virtual void iGeneralMeshCommonState::SetMixMode uint  mode  )  [pure virtual]
 

Set mix mode.

virtual void iGeneralMeshCommonState::SetShadowCasting bool  m  )  [pure virtual]
 

Set shadowing.

By default genmesh objects will cast shadows (during the static lighting phase). You can disable this here.

virtual void iGeneralMeshCommonState::SetShadowReceiving bool  m  )  [pure virtual]
 

Set shadow receiving on.

By default this is disabled in which case the genmesh object will receive all lighting information dynamically but without shadows. If this is enabled then the lighting system resembles more the lighting system with things which static and pseudo-dynamic lighting. In this case there will be shadows on the genmesh instance.


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