22class ScnRoot :
public ScnGroup {
24 enum ScnRootFlag { SCNROOTFLAG_FORCE_RESMDLDRAWMODE = (1 << 0) };
27 static ScnRoot* Construct(
MEMAllocator* pAllocator,
size_t* pSize,
28 size_t maxChildren,
size_t maxScnObj,
size_t numLightObj,
31 static ScnRoot* Construct(
MEMAllocator* pAllocator,
size_t* pSize,
32 size_t maxChildren,
size_t maxScnObj) {
33 return Construct(pAllocator, pSize, maxChildren, maxScnObj,
34 G3DState::NUM_LIGHT, G3DState::NUM_LIGHT_SET);
38 ScnObj** ppChildrenBuf, ulong maxChildren, ulong numLight,
42 virtual void G3dProc(ulong task, ulong param,
void* pInfo);
47 void SetCurrentCamera(
int idx);
53 void SetGlbSettings();
61 void GatherDrawScnObj();
66 ulong TestScnRootFlag(ScnRootFlag flag)
const {
67 return (mScnRootFlags & flag) != 0;
69 void SetScnRootFlag(ScnRootFlag flag, ulong on) {
71 mScnRootFlags |= flag;
73 mScnRootFlags &= ~flag;
77 int GetCurrentCameraID()
const {
78 return mCurrentCameraID;
87 ResMdlDrawMode mDrawMode;
94 FogData mFog[G3DState::NUM_FOG];
98 NW4R_G3D_RTTI_DECL_DERIVED(ScnRoot, ScnGroup);
108 ScnObjGather(
ScnObj** ppBufOpa,
ScnObj** ppBufXlu, ulong capacity);
110 virtual ~ScnObjGather() {}
112 virtual CullingStatus Add(
ScnObj* pObj,
bool opa,
bool xlu);
113 virtual void Clear() {
114 mNumScnObjOpa = mNumScnObjXlu = 0;
117 virtual void ZSort();
120 virtual void Sort(LessThanFunc pOpaFunc,
121 LessThanFunc pXluFunc);
123 virtual void DrawOpa(ResMdlDrawMode* pForceMode);
124 virtual void DrawXlu(ResMdlDrawMode* pForceMode);