#include <worldentity.h>
Inherits CommonEntity.
Inherited by BonusBox, Projectile, and Tank.
Inheritance diagram for WorldEntity:


Public Member Functions | |
| WorldEntity () | |
| virtual | ~WorldEntity ()=0 |
| void | shiftHistory () |
| Shifts interpolation history by one step. | |
| virtual void | createPresentPoint (int time_stamp) |
| Creates from current available data new mPresentPoint. | |
| void | updateHistory (HistoryPoint *new_point) |
| Adds new point to the history and present point. | |
Protected Attributes | |
| GLVector3d | mSpeed |
| Vector of current speed. | |
| double | mWeight |
| Weight of object in kg. | |
| HistoryPoint * | mPresentPoint |
| Point in history, that is now valid. | |
| HistoryPoint * | mHistoryPoints [HISTORY_LENGTH] |
| Here are cached some points of history. | |
Definition at line 17 of file worldentity.h.
|
|
Definition at line 4 of file worldentity.cpp. References HISTORY_LENGTH, mHistoryPoints, and mSpeed. |
|
|
Definition at line 11 of file worldentity.cpp. |
|
|
Creates from current available data new mPresentPoint.
Reimplemented in Tank. Definition at line 26 of file worldentity.cpp. References CommonEntity::mID, HistoryPoint::mID, CommonEntity::mOrientation, HistoryPoint::mOrientation, CommonEntity::mPosition, HistoryPoint::mPosition, mPresentPoint, mSpeed, HistoryPoint::mSpeed, and HistoryPoint::mTimeStamp. |
|
|
Shifts interpolation history by one step.
Definition at line 15 of file worldentity.cpp. References HISTORY_LENGTH, mHistoryPoints, and mPresentPoint. Referenced by updateHistory(). |
|
|
Adds new point to the history and present point. Changes the present history point to the new point and then shifts the history. WARNING! It doesn't delete the present point. This is behaviour that is expected as long as mPresentPoint and mHistoryPoints[0] points to the same objects (this is correct).
Definition at line 38 of file worldentity.cpp. References mPresentPoint, and shiftHistory(). Here is the call graph for this function: ![]() |
|
|
Here are cached some points of history.
Definition at line 54 of file worldentity.h. Referenced by shiftHistory(), and WorldEntity(). |
|
|
Point in history, that is now valid.
Definition at line 53 of file worldentity.h. Referenced by createPresentPoint(), Tank::createPresentPoint(), shiftHistory(), and updateHistory(). |
|
|
Vector of current speed.
Definition at line 48 of file worldentity.h. Referenced by createPresentPoint(), Tank::createPresentPoint(), Projectile::initByID(), and WorldEntity(). |
|
|
Weight of object in kg.
Reimplemented in Tank. Definition at line 50 of file worldentity.h. Referenced by Projectile::initByID(). |
1.4.5