Inheritance diagram for CEntity:

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.
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. | |
1.2.17