NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
|
Definition at line 16 of file g3d_scnmdl.h.
Classes | |
class | CopiedMatAccess |
class | CopiedVisAccess |
Public Types | |
enum | ScnMdlOption { OPTID_NONE = (0x30000 | (0)) , OPTID_VISBUFFER_REFRESH_NEEDED = (0x30000 | (1)) } |
enum | BufferOption { BUFFER_RESTEXOBJ = (1 << 0) , BUFFER_RESTLUTOBJ = (1 << 1) , BUFFER_RESTEXSRT = (1 << 2) , BUFFER_RESCHAN = (1 << 3) , BUFFER_RESGENMODE = (1 << 4) , BUFFER_RESMATMISC = (1 << 5) , BUFFER_RESANMVIS = (1 << 6) , BUFFER_RESMATPIX = (1 << 7) , BUFFER_RESTEVCOLOR = (1 << 8) , BUFFER_RESMATINDMTXSCALE = (1 << 9) , BUFFER_RESMATTEXCOORDGEN = (1 << 10) , BUFFER_RESTEV = (1 << 11) , BUFFER_RESVTXPOS = (1 << 12) , BUFFER_RESVTXNRM = (1 << 13) , BUFFER_RESVTXCLR = (1 << 14) , ANM_VIS = BUFFER_RESANMVIS , ANM_TEXPAT = BUFFER_RESTEXOBJ | BUFFER_RESTLUTOBJ , ANM_TEXSRT = BUFFER_RESTEXSRT | BUFFER_RESMATINDMTXSCALE , ANM_MATCLR = BUFFER_RESCHAN | BUFFER_RESTEVCOLOR , ANM_SHP = BUFFER_RESVTXPOS | BUFFER_RESVTXNRM | BUFFER_RESVTXCLR } |
![]() | |
enum | AnmObjType { ANMOBJTYPE_CHR , ANMOBJTYPE_VIS , ANMOBJTYPE_MATCLR , ANMOBJTYPE_TEXPAT , ANMOBJTYPE_TEXSRT , ANMOBJTYPE_SHP , ANMOBJTYPE_NOT_SPECIFIED , ANMOBJTYPE_VTX = ANMOBJTYPE_SHP } |
enum | ByteCodeType { BYTE_CODE_CALC , BYTE_CODE_MIX , BYTE_CODE_DRAW_OPA , BYTE_CODE_DRAW_XLU } |
enum | ScnMdlSimpleOption { OPTID_NONE = (0x20000 | (0)) , OPTID_IGNORE_ANMCHR_TRANS = (0x20000 | (1)) } |
![]() | |
enum | ScaleProperty { NOT_SCALED , UNIFORM_SCALED , NONUNIFORM_SCALED } |
enum | ScnLeafOption { OPTID_NONE = (0x10000 | (0)) , OPTID_DISABLE_DRAW_ALL = (0x10000 | (1)) } |
![]() | |
enum | ForEachResult { FOREACHRESULT_OK , FOREACHRESULT_CONTINUE , FOREACHRESULT_RETURN , FOREACHRESULT_GOBACK } |
enum | ScnObjMtxType { MTX_LOCAL , MTX_WORLD , MTX_VIEW , MTX_TYPE_MAX } |
enum | ScnObjBoundingVolumeType { BOUNDINGVOLUME_AABB_LOCAL , BOUNDINGVOLUME_AABB_WORLD , BOUNDINGVOLUME_MAX } |
enum | ScnObjOption { OPTID_NONE = (0x00000 | (0)) , OPTID_DISABLE_GATHER_SCNOBJ = (0x00000 | (1)) , OPTID_DISABLE_CALC_WORLD = (0x00000 | (2)) , OPTID_DISABLE_CALC_MAT = (0x00000 | (3)) , OPTID_DISABLE_CALC_VTX = (0x00000 | (4)) , OPTID_DISABLE_CALC_VIEW = (0x00000 | (5)) , OPTID_DISABLE_DRAW_OPA = (0x00000 | (6)) , OPTID_DISABLE_DRAW_XLU = (0x00000 | (7)) , OPTID_DISABLE_UPDATEFRAME = (0x00000 | (8)) , OPTID_ENABLE_CULLING = (0x00000 | (9)) } |
enum | Timing { CALLBACK_TIMING_A = (1 << 0) , CALLBACK_TIMING_B = (1 << 1) , CALLBACK_TIMING_C = (1 << 2) , CALLBACK_TIMING_ALL = (CALLBACK_TIMING_A | CALLBACK_TIMING_B | CALLBACK_TIMING_C) } |
enum | ExecOp { EXECOP_CALC_WORLD = (1 << 0) , EXECOP_CALC_MAT = (1 << 1) , EXECOP_CALC_VIEW = (1 << 2) , EXECOP_DRAW_OPA = (1 << 4) , EXECOP_DRAW_XLU = (1 << 5) } |
typedef ForEachResult(* | ForEachFunc) (ScnObj *pParent, void *pInfo) |
![]() | |
enum | G3dProcTask { G3DPROC_NONE = 0x00000 , G3DPROC_CALC_WORLD = 0x00001 , G3DPROC_CALC_MAT = 0x00002 , G3DPROC_CALC_VTX = 0x00003 , G3DPROC_CALC_VIEW = 0x00004 , G3DPROC_GATHER_SCNOBJ = 0x00005 , G3DPROC_DRAW_OPA = 0x00006 , G3DPROC_DRAW_XLU = 0x00007 , G3DPROC_UPDATEFRAME = 0x00008 , __G3DPROC_OPTIONAL_END , G3DPROC_CHILD_DETACHED = 0x10001 , G3DPROC_ATTACH_PARENT = 0x10002 , G3DPROC_DETACH_PARENT = 0x10003 , G3DPROC_ZSORT = 0x10004 } |
Public Member Functions | |
ScnMdl (MEMAllocator *pAllocator, ResMdl mdl, math::MTX34 *pWorldMtxArray, ulong *pWorldMtxAttribArray, math::MTX34 *pViewPosMtxArray, math::MTX33 *pViewNrmMtxArray, math::MTX34 *pViewTexMtxArray, int numView, int numViewMtx, DrawResMdlReplacement *pReplacement, ulong *pMatBufferDirtyFlag) | |
virtual void | G3dProc (ulong task, ulong param, void *pInfo) |
virtual bool | SetScnObjOption (ulong option, ulong value) |
virtual bool | GetScnObjOption (ulong option, ulong *pValue) const |
virtual bool | SetAnmObj (AnmObj *pObj, AnmObjType type) |
virtual bool | RemoveAnmObj (AnmObj *pObj) |
virtual AnmObj * | RemoveAnmObj (AnmObjType type) |
virtual AnmObj * | GetAnmObj (AnmObjType type) |
virtual const AnmObj * | GetAnmObj (AnmObjType type) const |
void | InitBuffer () |
void | CleanMatBuffer (ulong idx, ulong option) |
void | CleanVisBuffer () |
AnmObjShp * | GetAnmObjShp () |
DrawResMdlReplacement & | GetDrawResMdlReplacement () |
![]() | |
ScnMdlSimple (MEMAllocator *pAllocator, ResMdl mdl, math::MTX34 *pWorldMtxArray, ulong *pWorldMtxAttribArray, math::MTX34 *pViewPosMtxArray, math::MTX33 *pViewNrmMtxArray, math::MTX34 *pViewTexMtxArray, int numView, int numViewMtx) | |
bool | GetScnMtxPos (math::MTX34 *pMtx, ScnObjMtxType type, size_t idx) const |
void | UpdateFrame () |
void | EnableScnMdlCallbackTiming (Timing timing) |
void | DisableScnMdlCallbackTiming (Timing timing) |
math::MTX34 * | GetViewPosMtxArray () |
const math::MTX34 * | GetViewPosMtxArray () const |
math::MTX33 * | GetViewNrmMtxArray () |
const math::MTX33 * | GetViewNrmMtxArray () const |
math::MTX34 * | GetViewTexMtxArray () |
const math::MTX34 * | GetViewTexMtxArray () const |
const u8 * | GetByteCode (ByteCodeType type) const |
ResMdl | GetResMdl () |
const ResMdl | GetResMdl () const |
math::MTX34 * | GetWldMtxArray () |
ulong * | GetWldMtxAttribArray () |
ulong | GetNumViewMtx () const |
const u8 * | GetByteCodeCalc () |
const u8 * | GetByteCodeMix () |
const u8 * | GetByteCodeDrawOpa () |
const u8 * | GetByteCodeDrawXlu () |
ResMdlDrawMode | GetDrawMode () const |
void | SetScnMdlCallback (ICalcWorldCallback *pCallback) |
ICalcWorldCallback * | GetScnMdlCallback () |
u8 | GetScnMdlCallbackTiming () const |
void | SetScnMdlCallbackNodeID (ulong id) |
ulong | GetScnMdlCallbackNodeID () const |
AnmObjChr * | GetAnmObjChr () |
AnmObjVis * | GetAnmObjVis () |
AnmObjMatClr * | GetAnmObjMatClr () |
AnmObjTexPat * | GetAnmObjTexPat () |
AnmObjTexSrt * | GetAnmObjTexSrt () |
![]() | |
ScnLeaf (MEMAllocator *pAllocator) | |
virtual ForEachResult | ForEach (ForEachFunc pFunc, void *pInfo, bool postOrder) |
virtual void | CalcWorldMtx (const math::MTX34 *pParent, ulong *pParam) |
ScaleProperty | GetScaleProperty () const |
void | SetScale (float x, float y, float z) |
void | SetScale (const math::VEC3 &scale) |
![]() | |
ScnObj (MEMAllocator *pAllocator) | |
virtual f32 | GetValueForSortOpa () const |
virtual f32 | GetValueForSortXlu () const |
void | CalcViewMtx (const math::MTX34 *pCamera) |
bool | SetMtx (ScnObjMtxType type, const math::MTX34 *pMtx) |
bool | GetMtx (ScnObjMtxType type, math::MTX34 *pMtx) const |
const math::MTX34 * | GetMtxPtr (ScnObjMtxType type) const |
void | SetPriorityDrawOpa (int prio) |
int | GetPriorityDrawOpa () const |
void | SetPriorityDrawXlu (int prio) |
int | GetPriorityDrawXlu () const |
void | EnableScnObjCallbackTiming (Timing timing) |
void | EnableScnObjCallbackExecOp (ExecOp op) |
bool | SetBoundingVolume (ScnObjBoundingVolumeType type, const math::AABB *pAABB) |
bool | GetBoundingVolume (ScnObjBoundingVolumeType type, math::AABB *pAABB) const |
bool | SetBoundingVolume (const math::AABB *pAABB) |
![]() | |
virtual bool | IsDerivedFrom (TypeObj other) const |
virtual const TypeObj | GetTypeObj () const |
virtual const char * | GetTypeName () const |
G3dObj (MEMAllocator *pAllocator, G3dObj *pParent) | |
G3dObj * | GetParent () const |
void | SetParent (G3dObj *pParent) |
void | DetachFromParent () |
void | Destroy () |
Static Public Member Functions | |
static ScnMdl * | Construct (MEMAllocator *pAllocator, size_t *pSize, ResMdl mdl, size_t bufferOption, int numView) |
![]() | |
static ScnMdlSimple * | Construct (MEMAllocator *pAllocator, size_t *pSize, ResMdl mdl, int numView) |
![]() | |
static const G3dObj::TypeObj | GetTypeObjStatic () |
static void * | Alloc (MEMAllocator *pAllocator, ulong size) |
static void | Dealloc (MEMAllocator *pAllocator, void *pBlock) |
static void * | operator new (size_t, void *pBlock) |
static void | operator delete (void *) |
template<typename TTo> | |
static TTo * | DynamicCast (G3dObj *pObj) |
Protected Member Functions | |
void | ScnMdl_G3DPROC_CALC_WORLD (ulong param, const math::MTX34 *pParent) |
void | ScnMdl_G3DPROC_CALC_MAT (ulong param, void *pInfo) |
void | ScnMdl_G3DPROC_CALC_VTX (ulong param, void *pInfo) |
void | ScnMdl_G3DPROC_DRAW_OPA (ulong param, void *pInfo) |
void | ScnMdl_G3DPROC_DRAW_XLU (ulong param, void *pInfo) |
![]() | |
void | ScnMdlSmpl_CalcPosture (ulong param, const math::MTX34 *pParent) |
void | ScnMdlSmpl_G3DPROC_GATHER_SCNOBJ (ulong param, IScnObjGather *pCollection) |
void | ScnMdlSmpl_G3DPROC_CALC_WORLD (ulong param, const math::MTX34 *pParent) |
void | ScnMdlSmpl_G3DPROC_CALC_MAT (ulong param, void *pInfo) |
void | ScnMdlSmpl_G3DPROC_CALC_VIEW (ulong param, const math::MTX34 *pCamera) |
void | ScnMdlSmpl_G3DPROC_DRAW_OPA (ulong param, void *pInfo) |
void | ScnMdlSmpl_G3DPROC_DRAW_XLU (ulong param, void *pInfo) |
void | ScnMdlSmpl_G3DPROC_UPDATEFRAME (ulong, void *) |
![]() | |
void | DefG3dProcScnLeaf (ulong task, ulong param, void *pInfo) |
![]() | |
void | SetScnObjFlag (ScnObjFlag flag, ulong on) |
ulong | TestScnObjFlag (ScnObjFlag flag) const |
bool | IsG3dProcDisabled (ulong task) const |
void | CheckCallback_CALC_VIEW (Timing timing, ulong param, void *pInfo) |
void | CheckCallback_CALC_MAT (Timing timing, ulong param, void *pInfo) |
void | CheckCallback_CALC_WORLD (Timing timing, ulong param, void *pInfo) |
void | CheckCallback_DRAW_OPA (Timing timing, ulong param, void *pInfo) |
void | CheckCallback_DRAW_XLU (Timing timing, ulong param, void *pInfo) |
Private Types | |
enum | VisBufferFlag { VISBUFFER_DIRTY = (1 << 0) , VISBUFFER_NOT_REFRESH_NEEDED = (1 << 1) } |
Private Member Functions | |
bool | IsVisBufferDirty () const |
bool | IsVisBufferRefreshNeeded () const |
void | VisBufferDirty () |
bool | IsMatBufferDirty (ulong idx, ulong option) const |
void | MatBufferDirty (ulong idx, ulong option) |
NW4R_G3D_RTTI_DECL_DERIVED (ScnMdl, ScnMdlSimple) | |
Private Attributes | |
AnmObjShp * | mpAnmObjShp |
ulong | mFlagVisBuffer |
ulong * | mpMatBufferDirtyFlag |
DrawResMdlReplacement | mReplacement |
Additional Inherited Members | |
![]() | |
enum | ScnMdlSmplFlag { SCNMDLSMPLFLAG_LC_DMA = (1 << 0) } |
![]() | |
enum | ScnObjFlag { SCNOBJFLAG_DISABLE_CALC_WORLD = (1 << 0) , SCNOBJFLAG_DISABLE_CALC_MAT = (1 << 1) , SCNOBJFLAG_DISABLE_CALC_VTX = (1 << 2) , SCNOBJFLAG_DISABLE_CALC_VIEW = (1 << 3) , SCNOBJFLAG_DISABLE_GATHER_SCNOBJ = (1 << 4) , SCNOBJFLAG_DISABLE_DRAW_OPA = (1 << 5) , SCNOBJFLAG_DISABLE_DRAW_XLU = (1 << 6) , SCNOBJFLAG_DISABLE_UPDATEFRAME = (1 << 7) , SCNOBJFLAG_IGNORE_ANMCHR_TRANS = (1 << 8) , SCNOBJFLAG_ENABLE_CULLING = (1 << 28) , SCNOBJFLAG_NOT_GATHER_DRAW_OPA = (1 << 29) , SCNOBJFLAG_NOT_GATHER_DRAW_XLU = (1 << 30) , SCNOBJFLAG_MTX_LOCAL_IDENTITY = (1 << 31) , SCNOBJFLAG_DISABLE_DRAW } |
![]() | |
math::MTX34 | mMtxArray [MTX_TYPE_MAX] |
math::AABB | mAABB [BOUNDINGVOLUME_MAX] |
![]() | |
static const int | VIEW_MAX = 16 |
static const int | MTX_CACHE_MIN = 8 |
static const int | MTX_CACHE_MAX |
enum nw4r::g3d::ScnMdl::ScnMdlOption |
Definition at line 63 of file g3d_scnmdl.h.
enum nw4r::g3d::ScnMdl::BufferOption |
Definition at line 69 of file g3d_scnmdl.h.
|
private |
Definition at line 135 of file g3d_scnmdl.h.
|
virtual |
Reimplemented from nw4r::g3d::ScnMdlSimple.
|
virtual |
Reimplemented from nw4r::g3d::ScnMdlSimple.
|
virtual |
Reimplemented from nw4r::g3d::ScnMdlSimple.
|
virtual |
Reimplemented from nw4r::g3d::ScnMdlSimple.
|
virtual |
Reimplemented from nw4r::g3d::ScnMdlSimple.
|
virtual |
Reimplemented from nw4r::g3d::ScnMdlSimple.
|
virtual |
Reimplemented from nw4r::g3d::ScnMdlSimple.
|
virtual |
Reimplemented from nw4r::g3d::ScnMdlSimple.
|
inline |
Definition at line 119 of file g3d_scnmdl.h.
|
inline |
Definition at line 123 of file g3d_scnmdl.h.
|
inlineprivate |
Definition at line 141 of file g3d_scnmdl.h.
|
inlineprivate |
Definition at line 144 of file g3d_scnmdl.h.
|
inlineprivate |
Definition at line 147 of file g3d_scnmdl.h.
|
inlineprivate |
Definition at line 151 of file g3d_scnmdl.h.
|
inlineprivate |
Definition at line 154 of file g3d_scnmdl.h.
|
private |
Definition at line 159 of file g3d_scnmdl.h.
|
private |
Definition at line 160 of file g3d_scnmdl.h.
|
private |
Definition at line 161 of file g3d_scnmdl.h.
|
private |
Definition at line 162 of file g3d_scnmdl.h.