Document the second param to joint callback functions

This commit is contained in:
LagoLunatic
2025-02-28 18:04:05 -05:00
parent fdfb69f055
commit 5571ec74e4
29 changed files with 104 additions and 97 deletions
+13 -4
View File
@@ -1,11 +1,19 @@
#ifndef J3DNODE_H
#define J3DNODE_H
#include "dolphin/mtx/mtx.h"
#include "dolphin/types.h"
class J3DNode;
class J3DModelData;
typedef int (*J3DNodeCallBack)(J3DNode*, int);
// The second argument to a J3DNodeCallBack determines the timing that the callback was called at.
// In: Called after the current joint has been calced, but before its children and younger siblings have been calced.
// Out: Called after the current joint and its children have been calced, but before its younger siblings have been calced.
enum {
J3DNodeCBCalcTiming_In = 0,
J3DNodeCBCalcTiming_Out = 1,
};
class J3DNode {
public:
@@ -19,11 +27,12 @@ public:
J3DNode();
void appendChild(J3DNode*);
J3DNodeCallBack getCallBack() { return mCallBack; }
void setCallBack(J3DNodeCallBack callback) { mCallBack = callback; }
J3DNode* getChild() { return mChild; }
// "Younger" sibling. The next node after this one that was appended to the same parent.
J3DNode* getYounger() { return mYounger; }
void setYounger(J3DNode* pYounger) { mYounger = pYounger; }
void setCallBack(J3DNodeCallBack callback) { mCallBack = callback; }
J3DNodeCallBack getCallBack() { return mCallBack; }
J3DNode* getChild() { return mChild; }
/* 0x04 */ void* mCallBackUserData;
/* 0x08 */ J3DNodeCallBack mCallBack;