![]() |
Collision Math Toy
Ian Parberry's "Introduction to Game Physics"
|
The game object. More...
#include <Object.h>
Public Member Functions | |
| CObject (CShape *, const CObjDesc &) | |
| Constructor. | |
| const CAabb2D & | GetAABB () const |
| Get AABB. More... | |
| CShape * | GetShape () const |
| Get pointer to shape. More... | |
| const eMotion | GetMotionType () const |
| Get motion type. More... | |
Private Attributes | |
| eSprite | m_eUnlitSprite |
| Unlit sprite. | |
| eSprite | m_eLitSprite |
| Unlit sprite. | |
| Vector2 | m_vSpriteOffset |
| Sprite offset in local coordinates. | |
| eSound | m_eSound |
| Collision sound. | |
| XMFLOAT4 | m_f4Tint |
| Color overlay. | |
| CShape * | m_pShape |
| Pointer to shape. | |
| bool | m_bRecentHit = false |
| Was hit recently. | |
| float | m_fLastHitTime = 0.0f |
| Time of last hit. | |
| int | m_nScore = 0 |
| Score for collision. | |
Friends | |
| class | CObjectManager |
CObject is the abstract representation of an object. Notice that CObject has no move or draw functions. Moving and drawing is now handled by CShape.
| const CAabb2D & CObject::GetAABB | ( | ) | const |
Reader function for the object's AABB. It gets this by querying the oblect's shape's AABB.
| const eMotion CObject::GetMotionType | ( | ) | const |
Reader function for the object's motion type. It gets this by querying the object's shape's motion type.
| CShape * CObject::GetShape | ( | ) | const |
Reader function for the object's shape type.