#include <eng_sprite.hh>
Public Types | |
| typedef vector < shptr< Texture > > | Textures |
Public Member Functions | |
| Sprite (const WorldVertex &pos, const fp width, const string textureName, const RGBA color) | |
| Sprite (const WorldVertex &pos, const fp width, Textures textures, const RGBA color) | |
| Sprite (const WorldVertex &pos, const fp width, SharedPtr< Texture > texture, const RGBA color) | |
| ~Sprite () | |
| bool | IfTranslucent (void) |
| void | SetTextureFunc (const Texture::eFunc textureFunc) |
| const string | GetName (void) |
| bool | Reproducible (void) |
| void | Draw (void) |
Protected Attributes | |
| fp | mWidth |
| width in World Space | |
| Textures | mTextures |
| container of Textures | |
| Texture::eFunc | mTextureFunc |
| default is REPLACE | |
| RGBA | mColor |
| applicability depends on texture setting | |
Private Types | |
| typedef Object | Parent |
Private Member Functions | |
| SharedPtr0< Volume > | ComputeSpriteVolume (const WorldVertex &pos, const fp width) |
| void | ComputeEyeVertexs (EyeVertex ev[4]) |
See Commodore 64 programmer's manual for register definitions.
A Sprite is a set of quads that are oriented perpedicular to the viewplane. After orienting, effectively, Sprites become 2D. For an illusion, as the viewpoint is rolled, Sprites are counter-rolled. The Sprite's up vector stays synchronized with the Eye's up vector (in World Space). Quads are named "slices". Blended slices can create the illusion of a cloud that has volume. Slices are positioned in intervals on Z axis in Eye Space.
See implementation.html.
typedef Object eng::Sprite::Parent [private] |
| typedef vector<shptr<Texture> > eng::Sprite::Textures |
| eng::Sprite::Sprite | ( | const WorldVertex & | pos, | |
| const fp | width, | |||
| const string | textureName, | |||
| const RGBA | color | |||
| ) |
| eng::Sprite::Sprite | ( | const WorldVertex & | pos, | |
| const fp | width, | |||
| Textures | textures, | |||
| const RGBA | color | |||
| ) |
| eng::Sprite::Sprite | ( | const WorldVertex & | pos, | |
| const fp | width, | |||
| SharedPtr< Texture > | texture, | |||
| const RGBA | color | |||
| ) |
| eng::Sprite::~Sprite | ( | ) |
| bool eng::Sprite::IfTranslucent | ( | void | ) | [inline, virtual] |
Reimplemented from eng::Object.
| void eng::Sprite::SetTextureFunc | ( | const Texture::eFunc | textureFunc | ) |
Sets a texture's function (replace,decal,etc). Allows Sprite to share the same texture but have different texture functions.
| const string eng::Sprite::GetName | ( | void | ) | [inline, virtual] |
Implements eng::Object.
| bool eng::Sprite::Reproducible | ( | void | ) | [inline, virtual] |
Implements eng::Object.
| void eng::Sprite::Draw | ( | void | ) | [virtual] |
Draw. See Commodore 64 programmer's manual for register definitions.
Reimplemented from eng::Object.
| SharedPtr0<Volume> eng::Sprite::ComputeSpriteVolume | ( | const WorldVertex & | pos, | |
| const fp | width | |||
| ) | [private] |
| void eng::Sprite::ComputeEyeVertexs | ( | EyeVertex | ev[4] | ) | [private] |
fp eng::Sprite::mWidth [protected] |
width in World Space
Textures eng::Sprite::mTextures [protected] |
container of Textures
Texture::eFunc eng::Sprite::mTextureFunc [protected] |
default is REPLACE
RGBA eng::Sprite::mColor [protected] |
applicability depends on texture setting
Palomino 3D Engine documents generated by doxygen 1.5.3 on Fri Nov 23 11:26:25 2007