Public Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends

sp::scene::Billboard Class Reference

#include <spSceneBillboard.hpp>

Inheritance diagram for sp::scene::Billboard:
sp::scene::MaterialNode sp::scene::RenderNode sp::scene::SceneNode sp::Node sp::BaseObject

List of all members.

Public Member Functions

 Billboard (video::Texture *BaseTexture)
virtual ~Billboard ()
virtual void updateTransformation ()
 Updates the objects transformation and sets the depth distance.
void setBasePosition (const dim::point2df &Position)
dim::point2df getBasePosition () const
void setTexture (video::Texture *BaseTexture)
 Sets the base texture (may be 0).
video::TexturegetTexture () const
void setColor (const video::color &Color)
 Sets the billboard's color.
video::color getColor () const
void setHardwareInstancing (s32 InstanceCount)
 Sets the hardware instances. For more information see the MeshBuffer class.
s32 getHardwareInstancing () const
Billboardcopy () const
virtual void render ()

Static Protected Member Functions

static void createDefaultMeshBuffer ()
static void deleteDefaultMeshBuffer ()

Protected Attributes

dim::point2df BasePosition_
video::color Color_
s32 InstanceCount_

Static Protected Attributes

static video::MeshBufferMeshBuffer_ = 0


class SceneGraph
class SimpleSceneManager
class sp::SoftPixelDevice

Detailed Description

Billboards - also called "Sprites" - are used for special effects like fire, sparks, rain, lense flares etc. A Billboard is always faced to the camera like a 2D image but it uses the 3D space (position with X, Y, Z). A Billboard normally have only one texture but it can also be just a colored quad (two triangles in form of a square). Inform yourself about alpha-blending that you know how to use the blending methods which are mostly used for Billboards but also available for normal 3D models.

Constructor & Destructor Documentation

sp::scene::Billboard::Billboard ( video::Texture BaseTexture  ) 
sp::scene::Billboard::~Billboard (  )  [virtual]

Member Function Documentation

Billboard * sp::scene::Billboard::copy (  )  const

Reimplemented from sp::scene::SceneNode.

void sp::scene::Billboard::createDefaultMeshBuffer (  )  [static, protected]
void sp::scene::Billboard::deleteDefaultMeshBuffer (  )  [static, protected]
dim::point2df sp::scene::Billboard::getBasePosition (  )  const [inline]
video::color sp::scene::Billboard::getColor (  )  const [inline]
s32 sp::scene::Billboard::getHardwareInstancing (  )  const [inline]
video::Texture* sp::scene::Billboard::getTexture (  )  const [inline]
void sp::scene::Billboard::render (  )  [virtual]

Renders the object. In this case rendering does not only mean drawing a 3d mesh. It can also be a light source.

True if the object has been rendered. Otherwise the object has been sorted out by frustum culling.

Implements sp::scene::MaterialNode.

void sp::scene::Billboard::setBasePosition ( const dim::point2df Position  )  [inline]

Sets the billboard's base position.

Position,: Position to which the sprite origin is to be translated.
void sp::scene::Billboard::setColor ( const video::color Color  )  [inline]

Sets the billboard's color.

void sp::scene::Billboard::setHardwareInstancing ( s32  InstanceCount  )  [inline]

Sets the hardware instances. For more information see the MeshBuffer class.

void sp::scene::Billboard::setTexture ( video::Texture BaseTexture  )  [inline]

Sets the base texture (may be 0).

void sp::scene::Billboard::updateTransformation (  )  [virtual]

Updates the objects transformation and sets the depth distance.

TODO! -> use extra rotation float member

Reimplemented from sp::scene::RenderNode.

Friends And Related Function Documentation

friend class SceneGraph [friend]

Reimplemented from sp::scene::MaterialNode.

friend class SimpleSceneManager [friend]
friend class sp::SoftPixelDevice [friend]

Member Data Documentation

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines