CrystalSpace

Public API Reference

iSprite3DFactoryState Struct Reference
[Mesh plugins]

This interface describes the API for the 3D sprite factory mesh object. More...

#include <imesh/sprite3d.h>

Inheritance diagram for iSprite3DFactoryState:

List of all members.

Public Member Functions

virtual iSpriteActionAddAction ()=0
 Create and add a new action frameset to the sprite.
virtual iSpriteFrameAddFrame ()=0
 Create and add a new frame to the sprite.
virtual iSpriteSocketAddSocket ()=0
 Create and add a new socket to the sprite.
virtual void AddTriangle (int a, int b, int c)=0
 Add a triangle to the normal, texel, and vertex meshes a, b and c are indices to texel vertices.
virtual void AddVertices (int num)=0
 Reserve space for the given number of vertices.
virtual void EnableTweening (bool en)=0
 Enable/disable tweening.
virtual iSpriteActionFindAction (const char *name) const =0
 Find a named action.
virtual iSpriteFrameFindFrame (const char *name) const =0
 Find a named frame.
virtual iSpriteSocketFindSocket (iMeshWrapper *mesh) const =0
 find a socked based on the sprite attached to it.
virtual iSpriteSocketFindSocket (const char *name) const =0
 find a named socket into the sprite.
virtual iSpriteActionGetAction (int No) const =0
 Get action number No.
virtual int GetActionCount () const =0
 Get number of actions in sprite.
virtual iSpriteActionGetFirstAction () const =0
 Get the first action.
virtual iSpriteFrameGetFrame (int f) const =0
 Query the frame number f.
virtual int GetFrameCount () const =0
 Query the number of frames.
virtual int GetLightingQuality () const =0
 Get lighting quality (one of CS_SPR_LIGHTING_*).
virtual int GetLightingQualityConfig () const =0
 Get the lighting quality config.
virtual int GetLodLevelConfig () const =0
 Returns what this template is using for determining the lod quality.
virtual const csVector3GetNormal (int frame, int vertex) const =0
 Get a normal.
virtual csVector3GetNormals (int frame) const =0
 Get normal array.
virtual iSpriteSocketGetSocket (int f) const =0
 Query the socket number f.
virtual int GetSocketCount () const =0
 Query the number of sockets.
virtual const csVector2GetTexel (int frame, int vertex) const =0
 Get a texel.
virtual csVector2GetTexels (int frame) const =0
 Get array of texels.
virtual csTriangle GetTriangle (int x) const =0
 Returns the texel indices for triangle 'x'.
virtual int GetTriangleCount () const =0
 Returns the number of triangles in the sprite.
virtual csTriangleGetTriangles () const =0
 Returns the triangles of the texel_mesh.
virtual const csVector3GetVertex (int frame, int vertex) const =0
 Get a vertex.
virtual int GetVertexCount () const =0
 Return the current number of vertices.
virtual csVector3GetVertices (int frame) const =0
 Get vertex array.
virtual bool IsTweeningEnabled () const =0
 Query state of tweening.
virtual void MergeNormals ()=0
 Smooth out the gouraud shading by merging the precalculated vertex normals along seams in all frames based on which vertices are very close in each frame.
virtual void MergeNormals (int base)=0
 Smooth out the gouraud shading by merging the precalculated vertex normals along seams in all frames based on which vertices are very close in frame 'base'.
virtual void MergeNormals (int base, int frame)=0
 Smooth out the gouraud shading by merging the precalculated vertex normals along seams in frame 'frame' based on which vertices are very close in frame 'base'.
virtual void SetLightingQuality (int qual)=0
 Set lighting quality (one of CS_SPR_LIGHTING_*).
virtual void SetLightingQualityConfig (int qual)=0
 Sets which lighting config variable that all new sprites created from this template will use.
virtual void SetLodLevelConfig (int config_flag)=0
 Sets which lod config variable that all new sprites created from this template will use.
virtual void SetNormal (int frame, int vertex, const csVector3 &Value)=0
 Set a normal.
virtual void SetNormals (csVector3 const *norms, int frame)=0
 Set array of normals.
virtual void SetTexel (int frame, int vertex, const csVector2 &Value)=0
 Set a texel.
virtual void SetTexels (csVector2 const *tex, int frame)=0
 Set array of texels.
virtual void SetTriangleCount (int count)=0
 Set the count of triangles.
virtual void SetTriangles (csTriangle const *trigs, int count)=0
 Set array of triangles. The array is copied.
virtual void SetVertex (int frame, int vertex, const csVector3 &Value)=0
 Set a vertex.
virtual void SetVertices (csVector3 const *vert, int frame)=0
 Set array of vertices.

Detailed Description

This interface describes the API for the 3D sprite factory mesh object.

Todo:

global_lighting_quality should be a config option.

global_lod_level should be a config option.

Definition at line 159 of file sprite3d.h.


Member Function Documentation

virtual iSpriteAction* iSprite3DFactoryState::AddAction (  )  [pure virtual]

Create and add a new action frameset to the sprite.

virtual iSpriteFrame* iSprite3DFactoryState::AddFrame (  )  [pure virtual]

Create and add a new frame to the sprite.

virtual iSpriteSocket* iSprite3DFactoryState::AddSocket (  )  [pure virtual]

Create and add a new socket to the sprite.

virtual void iSprite3DFactoryState::AddTriangle ( int  a,
int  b,
int  c 
) [pure virtual]

Add a triangle to the normal, texel, and vertex meshes a, b and c are indices to texel vertices.

virtual void iSprite3DFactoryState::AddVertices ( int  num  )  [pure virtual]

Reserve space for the given number of vertices.

A vertex includes information about its position, normal and texel. This function will not write any information into the reserved space.

Note that this function requires that at least one frame exists in the sprite factory, otherwise this function will fail!

virtual void iSprite3DFactoryState::EnableTweening ( bool  en  )  [pure virtual]

Enable/disable tweening.

virtual iSpriteAction* iSprite3DFactoryState::FindAction ( const char *  name  )  const [pure virtual]

Find a named action.

virtual iSpriteFrame* iSprite3DFactoryState::FindFrame ( const char *  name  )  const [pure virtual]

Find a named frame.

virtual iSpriteSocket* iSprite3DFactoryState::FindSocket ( iMeshWrapper mesh  )  const [pure virtual]

find a socked based on the sprite attached to it.

virtual iSpriteSocket* iSprite3DFactoryState::FindSocket ( const char *  name  )  const [pure virtual]

find a named socket into the sprite.

virtual iSpriteAction* iSprite3DFactoryState::GetAction ( int  No  )  const [pure virtual]

Get action number No.

virtual int iSprite3DFactoryState::GetActionCount (  )  const [pure virtual]

Get number of actions in sprite.

virtual iSpriteAction* iSprite3DFactoryState::GetFirstAction (  )  const [pure virtual]

Get the first action.

virtual iSpriteFrame* iSprite3DFactoryState::GetFrame ( int  f  )  const [pure virtual]

Query the frame number f.

virtual int iSprite3DFactoryState::GetFrameCount (  )  const [pure virtual]

Query the number of frames.

virtual int iSprite3DFactoryState::GetLightingQuality (  )  const [pure virtual]

Get lighting quality (one of CS_SPR_LIGHTING_*).

Deprecated:
Deprecated in 2.0 by change to shader-based lighting.
virtual int iSprite3DFactoryState::GetLightingQualityConfig (  )  const [pure virtual]

Get the lighting quality config.

Deprecated:
Deprecated in 2.0 by change to shader-based lighting.
virtual int iSprite3DFactoryState::GetLodLevelConfig (  )  const [pure virtual]

Returns what this template is using for determining the lod quality.

virtual const csVector3& iSprite3DFactoryState::GetNormal ( int  frame,
int  vertex 
) const [pure virtual]

Get a normal.

virtual csVector3* iSprite3DFactoryState::GetNormals ( int  frame  )  const [pure virtual]

Get normal array.

virtual iSpriteSocket* iSprite3DFactoryState::GetSocket ( int  f  )  const [pure virtual]

Query the socket number f.

virtual int iSprite3DFactoryState::GetSocketCount (  )  const [pure virtual]

Query the number of sockets.

virtual const csVector2& iSprite3DFactoryState::GetTexel ( int  frame,
int  vertex 
) const [pure virtual]

Get a texel.

virtual csVector2* iSprite3DFactoryState::GetTexels ( int  frame  )  const [pure virtual]

Get array of texels.

virtual csTriangle iSprite3DFactoryState::GetTriangle ( int  x  )  const [pure virtual]

Returns the texel indices for triangle 'x'.

virtual int iSprite3DFactoryState::GetTriangleCount (  )  const [pure virtual]

Returns the number of triangles in the sprite.

virtual csTriangle* iSprite3DFactoryState::GetTriangles (  )  const [pure virtual]

Returns the triangles of the texel_mesh.

virtual const csVector3& iSprite3DFactoryState::GetVertex ( int  frame,
int  vertex 
) const [pure virtual]

Get a vertex.

virtual int iSprite3DFactoryState::GetVertexCount (  )  const [pure virtual]

Return the current number of vertices.

virtual csVector3* iSprite3DFactoryState::GetVertices ( int  frame  )  const [pure virtual]

Get vertex array.

virtual bool iSprite3DFactoryState::IsTweeningEnabled (  )  const [pure virtual]

Query state of tweening.

virtual void iSprite3DFactoryState::MergeNormals (  )  [pure virtual]

Smooth out the gouraud shading by merging the precalculated vertex normals along seams in all frames based on which vertices are very close in each frame.

virtual void iSprite3DFactoryState::MergeNormals ( int  base  )  [pure virtual]

Smooth out the gouraud shading by merging the precalculated vertex normals along seams in all frames based on which vertices are very close in frame 'base'.

virtual void iSprite3DFactoryState::MergeNormals ( int  base,
int  frame 
) [pure virtual]

Smooth out the gouraud shading by merging the precalculated vertex normals along seams in frame 'frame' based on which vertices are very close in frame 'base'.

virtual void iSprite3DFactoryState::SetLightingQuality ( int  qual  )  [pure virtual]

Set lighting quality (one of CS_SPR_LIGHTING_*).

Deprecated:
Deprecated in 2.0 by change to shader-based lighting.
virtual void iSprite3DFactoryState::SetLightingQualityConfig ( int  qual  )  [pure virtual]

Sets which lighting config variable that all new sprites created from this template will use.

The options are:

  • CS_SPR_LIGHT_GLOBAL (default)
  • CS_SPR_LIGHT_TEMPLATE
  • CS_SPR_LIGHT_LOCAL
    Deprecated:
    Deprecated in 2.0 by change to shader-based lighting.
virtual void iSprite3DFactoryState::SetLodLevelConfig ( int  config_flag  )  [pure virtual]

Sets which lod config variable that all new sprites created from this template will use.

The options are:

  • CS_SPR_LOD_GLOBAL (default)
  • CS_SPR_LOD_TEMPLATE
  • CS_SPR_LOD_LOCAL
virtual void iSprite3DFactoryState::SetNormal ( int  frame,
int  vertex,
const csVector3 Value 
) [pure virtual]

Set a normal.

virtual void iSprite3DFactoryState::SetNormals ( csVector3 const *  norms,
int  frame 
) [pure virtual]

Set array of normals.

The array is copied. It must contain as many normals as the vertex count of this sprite.

virtual void iSprite3DFactoryState::SetTexel ( int  frame,
int  vertex,
const csVector2 Value 
) [pure virtual]

Set a texel.

virtual void iSprite3DFactoryState::SetTexels ( csVector2 const *  tex,
int  frame 
) [pure virtual]

Set array of texels.

The array is copied. It must contain as many texels as the vertex count of this sprite.

virtual void iSprite3DFactoryState::SetTriangleCount ( int  count  )  [pure virtual]

Set the count of triangles.

virtual void iSprite3DFactoryState::SetTriangles ( csTriangle const *  trigs,
int  count 
) [pure virtual]

Set array of triangles. The array is copied.

virtual void iSprite3DFactoryState::SetVertex ( int  frame,
int  vertex,
const csVector3 Value 
) [pure virtual]

Set a vertex.

virtual void iSprite3DFactoryState::SetVertices ( csVector3 const *  vert,
int  frame 
) [pure virtual]

Set array of vertices.

The array is copied. It must contain as many vertices as the vertex count of this sprite.


The documentation for this struct was generated from the following file:

Generated for Crystal Space 2.0 by doxygen 1.6.1