OSDL::Rendering::Sprite Class Reference

#include <OSDLSprite.h>

Collaboration diagram for OSDL::Rendering::Sprite:

[legend]
List of all members.

Detailed Description

A sprite is a specialized view corresponding to a 2D bitmap-based graphical element.

Definition at line 50 of file OSDLSprite.h.

Public Member Functions

 Sprite (bool ownBoundingBox=true) throw ()
 Constructs a new sprite.
virtual ~Sprite () throw ()
 Virtual destructor.
virtual const std::string toString (Ceylan::VerbosityLevels level=Ceylan::high) const throw ()
 Returns an user-friendly description of the state of this object.

Protected Attributes

bool _ownBoundingBox
 Tells whether this sprite owns the bounding box(es) it refers to.
Engine::BoundingBox2D_box
 Each sprite is linked with a bounding box, which graphically contains it.

Private Member Functions

 Sprite (const Sprite &source) throw ()
 Copy constructor made private to ensure that it will never be called.
Spriteoperator= (const Sprite &source) throw ()
 Assignment operator made private to ensure that it will never be called.


Constructor & Destructor Documentation

Sprite::Sprite ( bool  ownBoundingBox = true  )  throw () [explicit]

Constructs a new sprite.

Parameters:
ownBoundingBox tells whether this sprite owns its bounding box, i.e. generally whether this is a local execution scheme, as opposed to a client/server scheme.

Definition at line 30 of file OSDLSprite.cc.

Sprite::~Sprite (  )  throw () [virtual]

Virtual destructor.

Definition at line 39 of file OSDLSprite.cc.

References _box, and _ownBoundingBox.

OSDL::Rendering::Sprite::Sprite ( const Sprite source  )  throw () [private]

Copy constructor made private to ensure that it will never be called.

The compiler should complain whenever this undefined constructor is called, implicitly or not.


Member Function Documentation

const string Sprite::toString ( Ceylan::VerbosityLevels  level = Ceylan::high  )  const throw () [virtual]

Returns an user-friendly description of the state of this object.

Parameters:
level the requested verbosity level.
Note:
Text output format is determined from overall settings.
See also:
Ceylan::TextDisplayable

Definition at line 48 of file OSDLSprite.cc.

References OSDL::Video::Pixels::toString().

Sprite& OSDL::Rendering::Sprite::operator= ( const Sprite source  )  throw () [private]

Assignment operator made private to ensure that it will never be called.

The compiler should complain whenever this undefined operator is called, implicitly or not.


Member Data Documentation

bool OSDL::Rendering::Sprite::_ownBoundingBox [protected]

Tells whether this sprite owns the bounding box(es) it refers to.

On a local scheme, the bounding box is shared between the view(s) and the model, since it may use both for rendering and collision detection.

On a distributed context (typically, client/server), multiple bounding boxes exist : one on each client, shared between the views, and one on the server, for the model.

Definition at line 109 of file OSDLSprite.h.

Referenced by ~Sprite().

Engine::BoundingBox2D* OSDL::Rendering::Sprite::_box [protected]

Each sprite is linked with a bounding box, which graphically contains it.

Note:
For the moment, each sprite has only one (2D) bounding box.

Definition at line 120 of file OSDLSprite.h.

Referenced by ~Sprite().


The documentation for this class was generated from the following files:
Generated on Fri Mar 30 14:47:30 2007 for OSDL by  doxygen 1.5.1