#include <movingobject.hpp>
Inheritance diagram for MovingObject:

This class adds a sense of direction, destination and size.
Definition at line 35 of file movingobject.hpp.
Public Member Functions | |
| MovingObject (int type, int id) | |
| Proxy constructor. | |
| Point const & | getDestination () const |
| Gets the destination coordinates of the object. | |
| void | setDestination (const Point &dst) |
| Sets the destination coordinates of the object. | |
| Point | getOldPosition () const |
| Gets the old coordinates of the object. | |
| void | setDirection (int direction) |
| Sets object direction. | |
| unsigned char | getDirection () const |
| Gets object direction. | |
| void | setSpeed (unsigned s) |
| Sets object speed. | |
| void | setSize (unsigned s) |
| Sets object bounding circle radius. | |
| unsigned | getSize () |
| Gets object bounding circle radius. | |
| virtual void | move () |
| Moves the object toward its destination. | |
| int | getPublicID () const |
| Get public ID. | |
| void | setPublicID (int id) |
| Set public ID. | |
Protected Attributes | |
| unsigned char | mDirection |
| Facing direction. | |
| unsigned short | mActionTime |
| Delay until next action. | |
| unsigned | mSize |
| Radius of bounding circle. | |
Private Attributes | |
| unsigned short | mPublicID |
| Object ID sent to clients (unique with respect to the map). | |
| Point | mDst |
| Target coordinates. | |
| Point | mOld |
| Old coordinates. | |
| unsigned short | mSpeed |
| Speed. | |
| std::list< PATH_NODE > | mPath |
|
||||||||||||
|
Proxy constructor.
Definition at line 41 of file movingobject.hpp. |
|
|
Gets the destination coordinates of the object.
Definition at line 51 of file movingobject.hpp. |
|
|
Gets object direction.
Definition at line 79 of file movingobject.hpp. |
|
|
Gets the old coordinates of the object.
Definition at line 67 of file movingobject.hpp. |
|
|
Get public ID.
Definition at line 110 of file movingobject.hpp. |
|
|
Gets object bounding circle radius.
Definition at line 97 of file movingobject.hpp. |
|
|
Moves the object toward its destination.
Reimplemented in Being. Definition at line 27 of file movingobject.cpp. |
|
|
Sets the destination coordinates of the object.
Definition at line 57 of file movingobject.hpp. |
|
|
Sets object direction.
Definition at line 73 of file movingobject.hpp. |
|
|
Set public ID. The object shall not have any public ID yet. Definition at line 116 of file movingobject.hpp. |
|
|
Sets object bounding circle radius.
Definition at line 91 of file movingobject.hpp. |
|
|
Sets object speed.
Definition at line 85 of file movingobject.hpp. |
|
|
Delay until next action.
Definition at line 130 of file movingobject.hpp. |
|
|
Facing direction.
Definition at line 129 of file movingobject.hpp. |
|
|
Target coordinates.
Definition at line 123 of file movingobject.hpp. |
|
|
Old coordinates.
Definition at line 124 of file movingobject.hpp. |
|
|
Definition at line 126 of file movingobject.hpp. |
|
|
Object ID sent to clients (unique with respect to the map).
Definition at line 121 of file movingobject.hpp. |
|
|
Radius of bounding circle.
Definition at line 131 of file movingobject.hpp. |
|
|
Speed.
Definition at line 125 of file movingobject.hpp. |
1.3.9.1