diff options
Diffstat (limited to 'src/core/Placeable.h')
-rw-r--r-- | src/core/Placeable.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/Placeable.h b/src/core/Placeable.h index 2df26a7c..970c0d48 100644 --- a/src/core/Placeable.h +++ b/src/core/Placeable.h @@ -10,7 +10,13 @@ public: CPlaceable(void); virtual ~CPlaceable(void); - CVector &GetPosition(void) { return m_matrix.GetPosition(); } + const CVector &GetPosition(void) { return m_matrix.GetPosition(); } + void SetPosition(float x, float y, float z) { + m_matrix.GetPosition().x = x; + m_matrix.GetPosition().y = y; + m_matrix.GetPosition().z = z; + } + void SetPosition(const CVector &pos) { m_matrix.GetPosition() = pos; } CVector &GetRight(void) { return m_matrix.GetRight(); } CVector &GetForward(void) { return m_matrix.GetForward(); } CVector &GetUp(void) { return m_matrix.GetUp(); } @@ -25,4 +31,5 @@ public: bool IsWithinArea(float x1, float y1, float x2, float y2); bool IsWithinArea(float x1, float y1, float z1, float x2, float y2, float z2); }; -static_assert(sizeof(CPlaceable) == 0x4C, "CPlaceable: error");
\ No newline at end of file + +VALIDATE_SIZE(CPlaceable, 0x4C); |