| ## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# iSprite3DState Struct Reference
[Mesh plugins]

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

`#include <imesh/sprite3d.h>`

Inheritance diagram for iSprite3DState:

[legend]
List of all members.

## Public Member Functions
virtual void | EnableTweening (bool en)=0
| Enable/disable tweening.
virtual iSpriteSocket * | FindSocket (const char *name) const =0
| find a named socket into the sprite.
virtual iSpriteSocket * | FindSocket (iMeshWrapper *mesh) const =0
| find a socked based on the sprite attached to it.
virtual iSpriteAction * | GetCurAction () const =0
| Get the current action.
virtual int | GetCurFrame () const =0
| Get the current frame number.
virtual int | GetFrameCount () const =0
| Get the number of frames.
virtual int | GetLightingQuality ()=0
| Returns the lighting quality level used by this sprite.
virtual int | GetLightingQualityConfig () const =0
| Returns what this sprite is using for determining the lighting quality.
virtual int | GetLodLevelConfig () const =0
| Returns what this sprite is using for determining the lighting quality.
virtual uint | GetMixMode () const =0
| Get mix mode.
virtual bool | GetReverseAction () const =0
| Get whether the current action is reversed or not.
virtual bool | IsLighting () const =0
| Get lighting.
virtual bool | IsLodEnabled () const =0
| Returns true if lod is enabled, else false.
virtual bool | IsTweeningEnabled () const =0
| Query state of tweening.
virtual bool | PropagateAction (const char *name)=0
| Propogate set action to all children.
virtual bool | SetAction (int index, bool loop=true, float speed=1)=0
| Select an action by index.
virtual bool | SetAction (const char *name, bool loop=true, float speed=1)=0
| Select an action by name.
virtual void | SetFrame (int f)=0
| Go to a specified frame.
virtual void | SetLighting (bool l)=0
| Set lighting.
virtual void | SetLightingQualityConfig (int config_flag)=0
| Sets which lighting config variable this sprite will use.
virtual void | SetLocalLightingQuality (int lighting_quality)=0
| Sets the local lighting quality for this sprite.
virtual void | SetLodLevelConfig (int config_flag)=0
| Sets which lighting config variable this sprite will use.
virtual void | SetMixMode (uint mode)=0
| Set mix mode.
virtual bool | SetOverrideAction (int index, float speed=1)=0
| This sets an action to run one time, then the sprite reverts to the prior action.
virtual bool | SetOverrideAction (const char *name, float speed=1)=0
| This sets an action to run one time, then the sprite reverts to the prior action.
virtual void | SetReverseAction (bool reverse)=0
| Set whether action should run in reverse or not.
virtual void | SetSingleStepAction (bool singlestep)=0
| Set single-step frame advance flag on actions.
virtual void | UnsetTexture ()=0
| Unset the texture (i.e. use the one from the factory).

## Detailed Description

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

Todo:
  What about convenience functions to set colors for verts?

Definition at line 317 of file sprite3d.h.

## Member Function Documentation

virtual void iSprite3DState::EnableTweening | ( | bool | en | ) | `[pure virtual]`

Enable/disable tweening.

virtual iSpriteSocket* iSprite3DState::FindSocket | ( | const char * | name | ) | const`[pure virtual]`

find a named socket into the sprite.

virtual iSpriteSocket* iSprite3DState::FindSocket | ( | iMeshWrapper * | mesh | ) | const`[pure virtual]`

find a socked based on the sprite attached to it.

virtual iSpriteAction* iSprite3DState::GetCurAction | ( |  | ) | const`[pure virtual]`

Get the current action.

virtual int iSprite3DState::GetCurFrame | ( |  | ) | const`[pure virtual]`

Get the current frame number.

virtual int iSprite3DState::GetFrameCount | ( |  | ) | const`[pure virtual]`

Get the number of frames.

virtual int iSprite3DState::GetLightingQuality | ( |  | ) | `[pure virtual]`

Returns the lighting quality level used by this sprite.

See SPR_LIGHTING_* macros defined in this header for the different types of lighting.

virtual int iSprite3DState::GetLightingQualityConfig | ( |  | ) | const`[pure virtual]`

Returns what this sprite is using for determining the lighting quality.

virtual int iSprite3DState::GetLodLevelConfig | ( |  | ) | const`[pure virtual]`

Returns what this sprite is using for determining the lighting quality.

virtual uint iSprite3DState::GetMixMode | ( |  | ) | const`[pure virtual]`

Get mix mode.

virtual bool iSprite3DState::GetReverseAction | ( |  | ) | const`[pure virtual]`

Get whether the current action is reversed or not.

virtual bool iSprite3DState::IsLighting | ( |  | ) | const`[pure virtual]`

Get lighting.

virtual bool iSprite3DState::IsLodEnabled | ( |  | ) | const`[pure virtual]`

Returns true if lod is enabled, else false.

virtual bool iSprite3DState::IsTweeningEnabled | ( |  | ) | const`[pure virtual]`

Query state of tweening.

virtual bool iSprite3DState::PropagateAction | ( | const char * | name | ) | `[pure virtual]`

Propogate set action to all children.

virtual bool iSprite3DState::SetAction | ( | int | index,
|  | bool | loop = `true`,
|  | float | speed = `1` |
| ) |  |  | `[pure virtual]`

Select an action by index.

If 'loop'==false the animation will not loop.

virtual bool iSprite3DState::SetAction | ( | const char * | name,
|  | bool | loop = `true`,
|  | float | speed = `1` |
| ) |  |  | `[pure virtual]`

Select an action by name.

If 'loop'==false the animation will not loop.

virtual void iSprite3DState::SetFrame | ( | int | f | ) | `[pure virtual]`

Go to a specified frame.

virtual void iSprite3DState::SetLighting | ( | bool | l | ) | `[pure virtual]`

Set lighting.

virtual void iSprite3DState::SetLightingQualityConfig | ( | int | config_flag | ) | `[pure virtual]`

Sets which lighting config variable this sprite will use.

The options are:

- CS_SPR_LIGHT_GLOBAL (default)
- CS_SPR_LIGHT_TEMPLATE
- CS_SPR_LIGHT_LOCAL

virtual void iSprite3DState::SetLocalLightingQuality | ( | int | lighting_quality | ) | `[pure virtual]`

Sets the local lighting quality for this sprite.

NOTE: you must use SetLightingQualityConfig (CS_SPR_LIGHT_LOCAL) for the sprite to use this.

virtual void iSprite3DState::SetLodLevelConfig | ( | int | config_flag | ) | `[pure virtual]`

Sets which lighting config variable this sprite will use.

The options are:

- CS_SPR_LOD_GLOBAL (default)
- CS_SPR_LOD_TEMPLATE
- CS_SPR_LOD_LOCAL

virtual void iSprite3DState::SetMixMode | ( | uint | mode | ) | `[pure virtual]`

Set mix mode.

virtual bool iSprite3DState::SetOverrideAction | ( | int | index,
|  | float | speed = `1` |
| ) |  |  | `[pure virtual]`

This sets an action to run one time, then the sprite reverts to the prior action.

virtual bool iSprite3DState::SetOverrideAction | ( | const char * | name,
|  | float | speed = `1` |
| ) |  |  | `[pure virtual]`

This sets an action to run one time, then the sprite reverts to the prior action.

virtual void iSprite3DState::SetReverseAction | ( | bool | reverse | ) | `[pure virtual]`

Set whether action should run in reverse or not.

virtual void iSprite3DState::SetSingleStepAction | ( | bool | singlestep | ) | `[pure virtual]`

Set single-step frame advance flag on actions.

virtual void iSprite3DState::UnsetTexture | ( |  | ) | `[pure virtual]`

Unset the texture (i.e. use the one from the factory).

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

- imesh/sprite3d.h