This class allows to perform some functions on all of the objects in a hierarchy.
Example:
struct ExampleStruct
{
};
class ExampleHierarchy : public Hierarchy
{
public:
virtual void Free(
void *data) { ExampleStruct *es = (ExampleStruct*)data;
DeleteObj(es); }
virtual void CopyTo(
void *
src,
void *dst) { *(
static_cast<ExampleStruct*
>(dst)) = *
static_cast<ExampleStruct*
>(
src); }
virtual Bool Do(
void *data, BaseObject *op,
const Matrix &mg,
Bool controlobject);
};
Bool ExampleHierarchy::Do(
void *data, BaseObject *op,
const Matrix &mg,
Bool controlobject)
{
ExampleStruct* dt = (ExampleStruct*)data;
Int32 mode = op->GetRenderMode();
d->parent_state = mode;
if (controlobject)
return true;
return true;
return true;
}
virtual void Free(void *data)=0
virtual void CopyTo(void *src, void *dst)=0
virtual Bool Do(void *data, BaseObject *op, const Matrix &mg, Bool controlobject)=0
const ARG & src
Definition: apibase.h:2751
#define MODE_UNDEF
The object is enabled by default, but the state of any parent object is used if it is enabled or disa...
Definition: c4d_baseobject.h:38
#define Opolygon
Polygon - PolygonObject.
Definition: ge_prepass.h:1038
maxon::Bool Bool
Definition: ge_sys_math.h:46
maxon::Int32 Int32
Definition: ge_sys_math.h:51
maxon::Mat3< maxon::Vector64 > Matrix
Definition: ge_math.h:141
#define DeleteObj(obj)
Definition: newobj.h:165
#define NewObjPtr(T,...)
Deprecated.
Definition: newobj.h:120