6#define NW4R_G3D_TYPE_OBJ_DECL(className) \
7 static const nw4r::g3d::G3dObj::ResNameDataT<sizeof(#className)> TYPE_NAME; \
8 static const TypeObj GetTypeObjStatic() { return TypeObj(TYPE_NAME); }
10#define NW4R_G3D_TYPE_OBJ_DEF(className) \
11 const nw4r::g3d::G3dObj::ResNameDataT<sizeof(#className)> className::TYPE_NAME = {sizeof(#className), #className}
24 char mName[N + 1 + 3 & ~3];
36 const TypeObjData *GetTypeObj()
const {
return mData; }
37 const TypeObjData *mData;
73 virtual void G3dProc(ulong proc, ulong param,
void *info) = 0;
75 virtual const TypeObj GetTypeObj();
76 virtual const char *GetTypeName();
79 void DetachFromParent();
81 template <
typename DerivedType,
typename Type>
82 static inline DerivedType *DynamicCast(Type *obj) {
83 if (obj !=
nullptr && obj->IsDerivedFrom(DerivedType::GetTypeObjStatic())) {
84 return (DerivedType*) (obj);
90 NW4R_G3D_TYPE_OBJ_DECL(G3dObj);
G3dProcParam
Additional parameters for G3D process operations.
@ G3DPROCPARAM_SORT_ZSORT
Use ScnRoot::ZSort() for sorting.
@ G3DPROCPARAM_SORT_SORT
Use ScnRoot::Sort() for sorting.
@ G3DPROCPARAM_SORT_SORT_WITHFUNC
Use ScnRoot::Sort(FuncLess, FuncLess) for sorting.
@ G3DPROCPARAM_CALC_WORLD_SCNOBJMTX_NOUPDATE
Will not update the world conversion matrix of the ScnObj.
G3dProcOp
The possible G3D process operations.
@ G3DPROC_CALC_VTX
Performs vertex array calculations.
@ G3DPROC_CHILD_DETACHED
The child is about to be detached.
@ G3DPROC_CALC_WORLD
Calculates the world transform matrix.
@ G3DPROC_GATHER_SCNOBJ
Gathers the ScnObj to be rendered.
@ G3DPROC_DRAW_OPA
Draws the material specified as OPA.
@ G3DPROC_CALC_VIEW
Calculates the view transform matrix.
@ G3DPROC_SORT
Sorts the gathered ScnObj.
@ G3DPROC_DETACHED
The child has been detached from the parent.
@ G3DPROC_ATTACHED
A parent has been attached.
@ G3DPROC_UPDATEFRAME
Calls the UpdateFrame member function for all animation objects.
@ G3DPROC_CALC_MAT
Calculates the material settings.
@ G3DPROC_DRAW_XLU
Draws the material specified as XLU.
3D graphics drawing library.