mirror of
https://gitlab.com/shinovon/re3-symbian.git
synced 2026-05-23 01:57:21 +03:00
Initial commit
This commit is contained in:
commit
77cdaaf97e
827 changed files with 418745 additions and 0 deletions
37
src/core/Placeable.h
Normal file
37
src/core/Placeable.h
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
#pragma once
|
||||
|
||||
class CPlaceable
|
||||
{
|
||||
protected:
|
||||
CMatrix m_matrix;
|
||||
|
||||
public:
|
||||
// disable allocation
|
||||
static void *operator new(size_t) throw();
|
||||
|
||||
CPlaceable(void);
|
||||
virtual ~CPlaceable(void);
|
||||
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(); }
|
||||
CMatrix &GetMatrix(void) { return m_matrix; }
|
||||
void SetMatrix(CMatrix &newMatrix) { m_matrix = newMatrix; }
|
||||
void SetTransform(RwMatrix *m) { m_matrix = CMatrix(m, false); }
|
||||
void SetHeading(float angle);
|
||||
void SetOrientation(float x, float y, float z){
|
||||
CVector pos = m_matrix.GetPosition();
|
||||
m_matrix.SetRotate(x, y, z);
|
||||
m_matrix.Translate(pos);
|
||||
}
|
||||
bool IsWithinArea(float x1, float y1, float x2, float y2);
|
||||
bool IsWithinArea(float x1, float y1, float z1, float x2, float y2, float z2);
|
||||
};
|
||||
|
||||
VALIDATE_SIZE(CPlaceable, 0x4C);
|
||||
Loading…
Add table
Add a link
Reference in a new issue