![]() |
Collision Math Toy
Game Physics with Bespoke Code
|
The game object. More...
#include <Object.h>


Public Member Functions | |
| CObject (Shapes::CShape *, const CObjDesc &) | |
| Constructor. | |
| const Shapes::CAabb2D & | GetAABB () const |
| Get AABB. | |
| Shapes::CShape * | GetShape () const |
| Get pointer to shape. | |
| const Shapes::eMotion | GetMotionType () const |
| Get motion type. | |
Private Attributes | |
| eSprite | m_eUnlitSprite = eSprite::None |
| Unlit sprite. | |
| eSprite | m_eLitSprite = eSprite::None |
| Unlit sprite. | |
| Vector2 | m_vSpriteOffset |
| Sprite offset in local coordinates. | |
| eSound | m_eSound = eSound(0) |
| Collision sound. | |
| XMFLOAT4 | m_f4Tint = XMFLOAT4(1.0f, 1.0f, 1.0f, 1.0f) |
| Color overlay. | |
| Shapes::CShape * | m_pShape = nullptr |
| Pointer to shape. | |
| bool | m_bRecentHit = false |
| Was hit recently. | |
| float | m_fLastHitTime = 0.0f |
| Time of last hit. | |
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.
| CObject::CObject | ( | Shapes::CShape * | p, |
| const CObjDesc & | d ) |
Constructor.
| p | Pointer to a shape. |
| d | Pointer to an object descriptor. |
| const Shapes::CAabb2D & CObject::GetAABB | ( | ) | const |
Reader function for the object's AABB. It gets this by querying the object's shape's AABB.
| const Shapes::eMotion CObject::GetMotionType | ( | ) | const |
Reader function for the object's motion type. It gets this by querying the object's shape's motion type.
| Shapes::CShape * CObject::GetShape | ( | ) | const |
Reader function for the object's shape.