Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

CEntity Class Reference

Inheritance diagram for CEntity:

CMyEntity List of all members.

Detailed Description

Base class for game entities.

Contains basic entity information (position, picture, etc.). All game entity classes should be child classes of this class.

Entity contains: position, old position, size, color and picture.

Position and old position are used by renderer to interpolate (because rendering and game updates happen at different frequencies). So in entity update code, first set old position to current position; and then change the position as you like.

See also:
CPicture, CPictureBundle.


Public Methods

D3DXVECTOR3 const & getPosition () const
 Returns read-only position.

D3DXVECTOR3 & getPosition ()
 Returns position.

D3DXVECTOR3 const & getOldPosition () const
 Returns read-only old position.

D3DXVECTOR3 & getOldPosition ()
 Returns old position.

float getSize () const
 Returns size.

void setSize (float size)
 Sets size.

D3DCOLOR getColor () const
 Returns color.

void setColor (D3DCOLOR color)
 Sets color.

CPicture const & getPicture () const
 Returns read-only picture.

void setPicture (CPicture const &picture)
 Sets picture.


Generated on Thu Dec 5 17:27:58 2002 for LT Game Jam Session by doxygen1.2.17