NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
nw4r::g3d::ScnRoot Class Reference
Inheritance diagram for nw4r::g3d::ScnRoot:
[legend]

Description

Definition at line 22 of file g3d_scnroot.h.

Public Types

enum  ScnRootFlag { SCNROOTFLAG_FORCE_RESMDLDRAWMODE = (1 << 0) }
 
- Public Types inherited from nw4r::g3d::ScnObj
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)
 
- Public Types inherited from nw4r::g3d::G3dObj
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

 ScnRoot (MEMAllocator *pAllocator, IScnObjGather *pGather, ScnObj **ppChildrenBuf, ulong maxChildren, ulong numLight, ulong numLightSet, LightObj *pLightObjBuf, AmbLightObj *pAmbObjBuf, LightSetData *pLightSetBuf)
 
virtual void G3dProc (ulong task, ulong param, void *pInfo)
 
Camera GetCamera (int idx)
 
Camera GetCurrentCamera ()
 
void SetCurrentCamera (int idx)
 
Fog GetFog (int idx)
 
LightSet GetLightSet (int idx)
 
void UpdateFrame ()
 
void SetGlbSettings ()
 
void CalcAnmScn ()
 
void CalcWorld ()
 
void CalcMaterial ()
 
void CalcVtx ()
 
void CalcView ()
 
void GatherDrawScnObj ()
 
void ZSort ()
 
void DrawOpa ()
 
void DrawXlu ()
 
ulong TestScnRootFlag (ScnRootFlag flag) const
 
void SetScnRootFlag (ScnRootFlag flag, ulong on)
 
int GetCurrentCameraID () const
 
LightSettingGetLightSetting ()
 
- Public Member Functions inherited from nw4r::g3d::ScnGroup
 ScnGroup (MEMAllocator *pAllocator, ScnObj **ppObj, ulong capacity)
 
virtual ForEachResult ForEach (ForEachFunc pFunc, void *pInfo, bool postOrder)
 
virtual bool Insert (ulong idx, ScnObj *pObj)
 
virtual ScnObjRemove (ulong idx)
 
virtual bool Remove (ScnObj *pObj)
 
ScnObj ** Begin ()
 
ScnObj ** End ()
 
ScnObjoperator[] (ulong idx)
 
ulong Size () const
 
bool Empty () const
 
bool PushBack (ScnObj *pObj)
 
ScnObjPopBack ()
 
void Clear ()
 
- Public Member Functions inherited from nw4r::g3d::ScnObj
 ScnObj (MEMAllocator *pAllocator)
 
virtual bool SetScnObjOption (ulong option, ulong value)
 
virtual bool GetScnObjOption (ulong option, ulong *pValue) const
 
virtual f32 GetValueForSortOpa () const
 
virtual f32 GetValueForSortXlu () const
 
virtual void CalcWorldMtx (const math::MTX34 *pParent, ulong *pParam)
 
void CalcViewMtx (const math::MTX34 *pCamera)
 
bool SetMtx (ScnObjMtxType type, const math::MTX34 *pMtx)
 
bool GetMtx (ScnObjMtxType type, math::MTX34 *pMtx) const
 
const math::MTX34GetMtxPtr (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)
 
- Public Member Functions inherited from nw4r::g3d::G3dObj
virtual bool IsDerivedFrom (TypeObj other) const
 
virtual const TypeObj GetTypeObj () const
 
virtual const char * GetTypeName () const
 
 G3dObj (MEMAllocator *pAllocator, G3dObj *pParent)
 
G3dObjGetParent () const
 
void SetParent (G3dObj *pParent)
 
void DetachFromParent ()
 
void Destroy ()
 

Static Public Member Functions

static ScnRootConstruct (MEMAllocator *pAllocator, size_t *pSize, size_t maxChildren, size_t maxScnObj, size_t numLightObj, size_t numLightSet)
 
static ScnRootConstruct (MEMAllocator *pAllocator, size_t *pSize, size_t maxChildren, size_t maxScnObj)
 
- Static Public Member Functions inherited from nw4r::g3d::G3dObj
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)
 

Private Member Functions

 NW4R_G3D_RTTI_DECL_DERIVED (ScnRoot, ScnGroup)
 

Private Attributes

IScnObjGathermpCollection
 
ResMdlDrawMode mDrawMode
 
ulong mScnRootFlags
 
u8 mCurrentCameraID
 
u8 PADDING_0xF5
 
u8 PADDING_0xF6
 
u8 PADDING_0xF7
 
CameraData mCamera [G3DState::NUM_CAMERA]
 
FogData mFog [G3DState::NUM_FOG]
 
LightSetting mLightSetting
 
AnmScnmpAnmScn
 

Additional Inherited Members

- Protected Types inherited from nw4r::g3d::ScnObj
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
}
 
- Protected Member Functions inherited from nw4r::g3d::ScnGroup
void DefG3dProcScnGroup (ulong task, ulong param, void *pInfo)
 
- Protected Member Functions inherited from nw4r::g3d::ScnObj
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)
 
- Protected Attributes inherited from nw4r::g3d::ScnObj
math::MTX34 mMtxArray [MTX_TYPE_MAX]
 
math::AABB mAABB [BOUNDINGVOLUME_MAX]
 

Member Enumeration Documentation

◆ ScnRootFlag

enum nw4r::g3d::ScnRoot::ScnRootFlag

Definition at line 24 of file g3d_scnroot.h.

Member Function Documentation

◆ Construct()

static ScnRoot * nw4r::g3d::ScnRoot::Construct ( MEMAllocator * pAllocator,
size_t * pSize,
size_t maxChildren,
size_t maxScnObj )
inlinestatic

Definition at line 31 of file g3d_scnroot.h.

◆ G3dProc()

virtual void nw4r::g3d::ScnRoot::G3dProc ( ulong task,
ulong param,
void * pInfo )
virtual

Reimplemented from nw4r::g3d::ScnGroup.

◆ TestScnRootFlag()

ulong nw4r::g3d::ScnRoot::TestScnRootFlag ( ScnRootFlag flag) const
inline

Definition at line 66 of file g3d_scnroot.h.

◆ SetScnRootFlag()

void nw4r::g3d::ScnRoot::SetScnRootFlag ( ScnRootFlag flag,
ulong on )
inline

Definition at line 69 of file g3d_scnroot.h.

◆ GetCurrentCameraID()

int nw4r::g3d::ScnRoot::GetCurrentCameraID ( ) const
inline

Definition at line 77 of file g3d_scnroot.h.

◆ GetLightSetting()

LightSetting & nw4r::g3d::ScnRoot::GetLightSetting ( )
inline

Definition at line 81 of file g3d_scnroot.h.

Member Data Documentation

◆ mpCollection

IScnObjGather* nw4r::g3d::ScnRoot::mpCollection
private

Definition at line 86 of file g3d_scnroot.h.

◆ mDrawMode

ResMdlDrawMode nw4r::g3d::ScnRoot::mDrawMode
private

Definition at line 87 of file g3d_scnroot.h.

◆ mScnRootFlags

ulong nw4r::g3d::ScnRoot::mScnRootFlags
private

Definition at line 88 of file g3d_scnroot.h.

◆ mCurrentCameraID

u8 nw4r::g3d::ScnRoot::mCurrentCameraID
private

Definition at line 89 of file g3d_scnroot.h.

◆ PADDING_0xF5

u8 nw4r::g3d::ScnRoot::PADDING_0xF5
private

Definition at line 90 of file g3d_scnroot.h.

◆ PADDING_0xF6

u8 nw4r::g3d::ScnRoot::PADDING_0xF6
private

Definition at line 91 of file g3d_scnroot.h.

◆ PADDING_0xF7

u8 nw4r::g3d::ScnRoot::PADDING_0xF7
private

Definition at line 92 of file g3d_scnroot.h.

◆ mCamera

CameraData nw4r::g3d::ScnRoot::mCamera[G3DState::NUM_CAMERA]
private

Definition at line 93 of file g3d_scnroot.h.

◆ mFog

FogData nw4r::g3d::ScnRoot::mFog[G3DState::NUM_FOG]
private

Definition at line 94 of file g3d_scnroot.h.

◆ mLightSetting

LightSetting nw4r::g3d::ScnRoot::mLightSetting
private

Definition at line 95 of file g3d_scnroot.h.

◆ mpAnmScn

AnmScn* nw4r::g3d::ScnRoot::mpAnmScn
private

Definition at line 96 of file g3d_scnroot.h.