mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-12-10 10:27:40 +00:00
@@ -9,20 +9,34 @@ class CVector2f;
|
||||
|
||||
class CGuiObject {
|
||||
public:
|
||||
CGuiObject();
|
||||
virtual ~CGuiObject();
|
||||
virtual void Update(float dt);
|
||||
virtual void Draw(const CGuiWidgetDrawParms& parms);
|
||||
virtual bool TestCursorHit(const CMatrix4f& vp, const CVector2f& point) const { return false; }
|
||||
virtual void Draw(const CGuiWidgetDrawParms& parms) const;
|
||||
virtual void Initialize() = 0;
|
||||
void MoveInWorld(const CVector3f& offset);
|
||||
CVector3f GetWorldPosition() const;
|
||||
CVector3f GetLocalPosition() const;
|
||||
void SetLocalPosition(const CVector3f& pos);
|
||||
void SetLocalTransform(const CTransform4f& xf);
|
||||
|
||||
void RecalculateTransforms();
|
||||
const CVector3f& GetLocalPosition() const;
|
||||
void RotateReset();
|
||||
|
||||
void SetLocalTransform(const CTransform4f& xf) {
|
||||
x4_localXF = xf;
|
||||
RecalculateTransforms();
|
||||
CVector3f RotateO2P(const CVector3f& vec) const;
|
||||
CVector3f RotateW2O(const CVector3f& offset) const {
|
||||
CVector3f ret = x34_worldXF.TransposeRotate(offset);
|
||||
return ret;
|
||||
}
|
||||
CVector3f RotateTranslateW2O(const CVector3f& vec) const;
|
||||
void MultiplyO2P(const CTransform4f& xf);
|
||||
void RecalculateTransforms();
|
||||
|
||||
void AddChildObject(CGuiObject* child, bool a, bool b);
|
||||
|
||||
void SetParent(CGuiObject* obj) {
|
||||
x64_parent = obj;
|
||||
}
|
||||
|
||||
private:
|
||||
CTransform4f x4_localXF;
|
||||
CTransform4f x34_worldXF;
|
||||
|
||||
Reference in New Issue
Block a user