Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
J3DJoint.h
Go to the documentation of this file.
1#ifndef J3DJOINT_H
2#define J3DJOINT_H
3
6
8class J3DJoint;
9class J3DMaterial;
10class J3DMtxBuffer;
11
16class J3DMtxCalc {
17public:
18 /* 80325D1C */ static void setMtxBuffer(J3DMtxBuffer*);
19
20 /* 8000D948 */ virtual ~J3DMtxCalc() {}
21 /* 80014E90 */ virtual void setAnmTransform(J3DAnmTransform*) {}
22 /* 80014E9C */ virtual J3DAnmTransform* getAnmTransform() { return NULL; }
23 /* 80014E8C */ virtual void setAnmTransform(u8, J3DAnmTransform*) {}
24 /* 80014E94 */ virtual J3DAnmTransform* getAnmTransform(u8) { return NULL; }
25 /* 80014EA4 */ virtual void setWeight(u8, f32) {}
26 /* 80014EA8 */ virtual f32 getWeight(u8) const { return 0.0f; }
27 virtual void init(const Vec& param_0, const Mtx&) = 0;
28 virtual void calc() = 0;
29
30 static J3DMtxBuffer* getMtxBuffer() { return mMtxBuffer; }
31 static J3DJoint* getJoint() { return mJoint; }
32 static void setJoint(J3DJoint* joint) { mJoint = joint; }
33
36}; // Size: 0x4
37
39
44class J3DJoint {
45public:
46 /* 8032F13C */ void appendChild(J3DJoint*);
47 /* 8032F170 */ J3DJoint();
48 /* 8032F254 */ void entryIn();
49 /* 8032F3F8 */ void recursiveCalc();
50
51 J3DMaterial* getMesh() { return mMesh; }
52 u16 getJntNo() const { return mJntNo; }
59 Vec* getMax() { return &mMax; }
60 Vec* getMin() { return &mMin; }
61 void setCallBack(J3DJointCallBack callback) { mCallBack = callback; }
66 J3DJoint* getChild() { return mChild; }
67 u8 getMtxType() { return (mKind & 0xf0) >> 4; }
68 void setMtxType(u8 type) { mKind = (mKind & ~0xf0) | (type << 4); }
69
71
72private:
73 friend struct J3DJointFactory;
74 friend class J3DJointTree;
75
76 /* 0x00 */ void* mCallBackUserData;
78 /* 0x08 */ void* field_0x8;
79 /* 0x0C */ J3DJoint* mChild;
80 /* 0x10 */ J3DJoint* mYounger;
81 /* 0x14 */ u16 mJntNo;
82 /* 0x16 */ u8 mKind;
83 /* 0x17 */ u8 mScaleCompensate;
86 /* 0x3C */ Vec mMin;
87 /* 0x48 */ Vec mMax;
88 /* 0x54 */ J3DMtxCalc* mMtxCalc;
89 /* 0x58 */ J3DMaterial* mMesh;
90}; // Size: 0x5C
91
96class J3DMtxCalcNoAnmBase : public J3DMtxCalc {
97public:
98 /* 8000FA8C */ virtual ~J3DMtxCalcNoAnmBase() {}
99};
100
105template <class A, class B>
107public:
109 virtual ~J3DMtxCalcNoAnm() {}
110 virtual void init(const Vec& param_0, const Mtx& param_1) { B::init(param_0, param_1); }
111 virtual void calc() { A::calcTransform(mJoint->getTransformInfo()); }
112};
113
119 /* 8032ECAC */ static void init(const Vec& param_0, const Mtx& param_1) {
122 }
123};
124
130 /* 8032ECAC */ static void init(const Vec&, const Mtx& param_1);
131};
132
138 /* 8032EC28 */ static void init(const Vec&, const Mtx& param_1);
139};
140
146 /* 8032EE50 */ static void calcTransform(J3DTransformInfo const&);
147};
148
154 /* 8032EFBC */ static void calcTransform(J3DTransformInfo const&);
155};
156
162 /* 8032ED30 */ static void calcTransform(J3DTransformInfo const&);
163};
164
165#endif /* J3DJOINT_H */
int(* J3DJointCallBack)(J3DJoint *, int)
Definition J3DJoint.h:38
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition J3DJointTree.h:39
Definition J3DMtxBuffer.h:12
static initFunc init[]
Definition d_menu_collect.cpp:42
f32 Mtx[3][4]
Definition mtx.h:15
Definition d_a_hozelda.cpp:54
Definition J3DJointFactory.h:26
Definition d_a_hozelda.cpp:239
void setMtxType(u8 type)
Definition J3DJoint.h:68
Vec * getMin()
Definition J3DJoint.h:60
void setCallBack(J3DJointCallBack callback)
Definition J3DJoint.h:61
J3DJoint * getYounger()
Definition J3DJoint.h:54
J3DMaterial * mMesh
Definition J3DJoint.h:89
void * mCallBackUserData
Definition J3DJoint.h:76
void appendChild(J3DJoint *)
Definition J3DJoint.cpp:144
J3DJoint * mYounger
Definition J3DJoint.h:80
J3DJoint * mChild
Definition J3DJoint.h:79
Vec * getMax()
Definition J3DJoint.h:59
void setCurrentMtxCalc(J3DMtxCalc *pMtxCalc)
Definition J3DJoint.h:56
void setMtxCalc(J3DMtxCalc *i_mtxCalc)
Definition J3DJoint.h:63
u8 mScaleCompensate
Definition J3DJoint.h:83
Vec mMax
Definition J3DJoint.h:87
J3DJointCallBack mCallBack
Definition J3DJoint.h:77
J3DMtxCalc * getCurrentMtxCalc()
Definition J3DJoint.h:65
void entryIn()
Definition J3DJoint.cpp:178
u8 mKind
Definition J3DJoint.h:82
void recursiveCalc()
Definition J3DJoint.cpp:215
J3DJointCallBack getCallBack()
Definition J3DJoint.h:62
J3DMaterial * getMesh()
Definition J3DJoint.h:51
J3DTransformInfo & getTransformInfo()
Definition J3DJoint.h:57
u16 mJntNo
Definition J3DJoint.h:81
static J3DMtxCalc * mCurrentMtxCalc
Definition J3DJoint.h:70
u16 getJntNo() const
Definition J3DJoint.h:52
J3DMtxCalc * getMtxCalc()
Definition J3DJoint.h:64
u8 getScaleCompensate() const
Definition J3DJoint.h:53
void setTransformInfo(J3DTransformInfo &i_info)
Definition J3DJoint.h:58
J3DMtxCalc * mMtxCalc
Definition J3DJoint.h:88
u8 getMtxType()
Definition J3DJoint.h:67
J3DJoint()
Definition J3DJoint.cpp:157
J3DTransformInfo mTransformInfo
Definition J3DJoint.h:84
void setYounger(J3DJoint *pYounger)
Definition J3DJoint.h:55
Vec mMin
Definition J3DJoint.h:86
J3DJoint * getChild()
Definition J3DJoint.h:66
void * field_0x8
Definition J3DJoint.h:78
f32 mBoundingSphereRadius
Definition J3DJoint.h:85
Definition d_a_hozelda.cpp:93
Definition J3DJoint.h:161
static void calcTransform(J3DTransformInfo const &)
Definition J3DJoint.cpp:44
Definition d_a_hozelda.cpp:213
static void calcTransform(J3DTransformInfo const &)
Definition J3DJoint.h:145
static void calcTransform(J3DTransformInfo const &)
Definition J3DJoint.cpp:69
Definition J3DJoint.h:137
Definition d_a_hozelda.cpp:209
Definition J3DJoint.h:118
static void init(const Vec &param_0, const Mtx &param_1)
Definition J3DJoint.h:119
Definition d_a_hozelda.cpp:196
virtual ~J3DMtxCalcNoAnmBase()
Definition J3DJoint.h:98
Definition d_a_hozelda.cpp:201
virtual void init(const Vec &param_0, const Mtx &param_1)
Definition J3DJoint.h:110
J3DMtxCalcNoAnm()
Definition J3DJoint.h:108
virtual ~J3DMtxCalcNoAnm()
Definition J3DJoint.h:109
virtual void calc()
Definition J3DJoint.h:111
Definition d_a_hozelda.cpp:217
virtual void setWeight(u8, f32)
Definition J3DJoint.h:25
static J3DJoint * getJoint()
Definition J3DJoint.h:31
static u8 mJoint[4]
Definition d_a_hozelda.cpp:226
virtual ~J3DMtxCalc()
Definition J3DJoint.h:20
virtual f32 getWeight(u8) const
Definition J3DJoint.h:26
virtual J3DAnmTransform * getAnmTransform()
Definition J3DJoint.h:22
static void setJoint(J3DJoint *joint)
Definition J3DJoint.h:32
virtual J3DAnmTransform * getAnmTransform(u8)
Definition J3DJoint.h:24
static J3DMtxBuffer * getMtxBuffer()
Definition J3DJoint.h:30
static J3DMtxBuffer * mMtxBuffer
Definition J3DJoint.h:34
static J3DJoint * mJoint
Definition J3DJoint.h:35
virtual void setAnmTransform(u8, J3DAnmTransform *)
Definition J3DJoint.h:23
virtual void init(const Vec &param_0, const Mtx &)=0
virtual void setAnmTransform(J3DAnmTransform *)
Definition J3DJoint.h:21
virtual void calc()=0
static void setMtxBuffer(J3DMtxBuffer *)
Definition J3DJointTree.cpp:132
static Vec mCurrentS
Definition J3DSys.h:150
static u8 mCurrentMtx[48]
Definition d_a_hozelda.cpp:193
Definition d_a_hozelda.cpp:169
Definition d_a_hozelda.cpp:18
float f32
Definition types.h:22
unsigned short u16
Definition types.h:9
unsigned char u8
Definition types.h:8