#include <Thing.h>
Inherits MemoryPoolObject.
Inherited by Drawable, and Object.
Public Member Functions | |
| Thing (const ThingTemplate *thingTemplate) | |
| const ThingTemplate * | getTemplate () const |
| Bool | isKindOf (KindOfType t) const |
| Bool | isKindOfMulti (const KindOfMaskType &mustBeSet, const KindOfMaskType &mustBeClear) const |
| Bool | isAnyKindOf (const KindOfMaskType &anyKindOf) const |
| void | setPosition (const Coord3D *pos) |
| void | setPositionZ (Real z) |
| the nice thing about this is that we don't have to recalc out cached terrain stuff. | |
| void | setOrientation (Real angle) |
| const Coord3D * | getPosition () const |
| Real | getOrientation () const |
| const Coord3D * | getUnitDirectionVector2D () const |
| void | getUnitDirectionVector2D (Coord3D &dir) const |
| void | getUnitDirectionVector3D (Coord3D &dir) const |
| Real | getHeightAboveTerrain () const |
| Real | getHeightAboveTerrainOrWater () const |
| Bool | isAboveTerrain () const |
| Bool | isAboveTerrainOrWater () const |
| Bool | isSignificantlyAboveTerrain () const |
| void | convertBonePosToWorldPos (const Coord3D *bonePos, const Matrix3D *boneTransform, Coord3D *worldPos, Matrix3D *worldTransform) const |
| void | setTransformMatrix (const Matrix3D *mx) |
| set the world transformation matrix | |
| const Matrix3D * | getTransformMatrix () const |
| return the world transformation matrix | |
| void | transformPoint (const Coord3D *in, Coord3D *out) |
| transform this point using the m_transform matrix of this thing | |
Public Member Functions inherited from MemoryPoolObject | |
| void | deleteInstance () |
Protected Member Functions | |
| virtual Real | calculateHeightAboveTerrain (void) const |
| virtual Object * | asObjectMeth () |
| virtual Drawable * | asDrawableMeth () |
| virtual const Object * | asObjectMeth () const |
| virtual const Drawable * | asDrawableMeth () const |
| virtual void | reactToTransformChange (const Matrix3D *oldMtx, const Coord3D *oldPos, Real oldAngle)=0 |
Protected Member Functions inherited from MemoryPoolObject | |
| virtual | ~MemoryPoolObject () |
| void * | operator new (size_t s) |
| void | operator delete (void *p) |
| virtual MemoryPool * | getObjectMemoryPool ()=0 |
Friends | |
| Object * | AsObject (Thing *thing) |
| Drawable * | AsDrawable (Thing *thing) |
| const Object * | AsObject (const Thing *thing) |
| const Drawable * | AsDrawable (const Thing *thing) |
A thing is the common base class for objects and drawables. It will hold common information to both and systems that need to work with both objects and drawables should work with things instead. You can not instantiate things, they are purely virtual
| Thing::Thing | ( | const ThingTemplate * | thingTemplate | ) |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
protectedvirtual |
| const ThingTemplate * Thing::getTemplate | ( | ) | const |
|
inline |
| void Thing::getUnitDirectionVector2D | ( | Coord3D & | dir | ) | const |
| void Thing::getUnitDirectionVector3D | ( | Coord3D & | dir | ) | const |
| Bool Thing::isAnyKindOf | ( | const KindOfMaskType & | anyKindOf | ) | const |
| Bool Thing::isKindOf | ( | KindOfType | t | ) | const |
| Bool Thing::isKindOfMulti | ( | const KindOfMaskType & | mustBeSet, |
| const KindOfMaskType & | mustBeClear ) const |
| Bool Thing::isSignificantlyAboveTerrain | ( | ) | const |
Ground vehicles moving down a slope will get slightly above the terrain. If we treat this as airborne, then they slide down slopes. This checks whether they are high enough that we should let them act like they're flying. jba.
If we treat this as airborne, then they slide down slopes. This checks whether they are high enough that we should let them act like they're flying. jba.
| void Thing::setPositionZ | ( | Real | z | ) |
| void Thing::setTransformMatrix | ( | const Matrix3D * | mx | ) |