summaryrefslogtreecommitdiffstats
path: root/src/core/Placeable.h
diff options
context:
space:
mode:
authorFire_Head <Fire-Head@users.noreply.github.com>2019-07-11 02:48:36 +0200
committerGitHub <noreply@github.com>2019-07-11 02:48:36 +0200
commitaa449b6fe162d8960351c5fe164a9120b8572652 (patch)
treefa82496d356ac2b77ffa1ab00684b0150907f009 /src/core/Placeable.h
parentfixfixfix (diff)
parentMerge pull request #129 from erorcun/erorcun (diff)
downloadre3-aa449b6fe162d8960351c5fe164a9120b8572652.tar
re3-aa449b6fe162d8960351c5fe164a9120b8572652.tar.gz
re3-aa449b6fe162d8960351c5fe164a9120b8572652.tar.bz2
re3-aa449b6fe162d8960351c5fe164a9120b8572652.tar.lz
re3-aa449b6fe162d8960351c5fe164a9120b8572652.tar.xz
re3-aa449b6fe162d8960351c5fe164a9120b8572652.tar.zst
re3-aa449b6fe162d8960351c5fe164a9120b8572652.zip
Diffstat (limited to '')
-rw-r--r--src/core/Placeable.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/core/Placeable.h b/src/core/Placeable.h
index 868ca9e7..648b315c 100644
--- a/src/core/Placeable.h
+++ b/src/core/Placeable.h
@@ -10,17 +10,19 @@ public:
CPlaceable(void);
virtual ~CPlaceable(void);
- CVector &GetPosition(void) { return *m_matrix.GetPosition(); }
- CVector &GetRight(void) { return *m_matrix.GetRight(); }
- CVector &GetForward(void) { return *m_matrix.GetForward(); }
- CVector &GetUp(void) { return *m_matrix.GetUp(); }
+ CVector &GetPosition(void) { return m_matrix.GetPosition(); }
+ 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 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);
-
- CPlaceable *ctor(void) { return ::new (this) CPlaceable(); }
- void dtor(void) { this->CPlaceable::~CPlaceable(); }
};
static_assert(sizeof(CPlaceable) == 0x4C, "CPlaceable: error");