TP_PShapeInterface Struct Reference

#include <c4d_particles.h>

Detailed Description

Callback interface for nodes that register shapes.
The easiest way to create this is to implement the TP_BaseShape class:
This class is only forward-declared in c4d_particles.h, so as long as the linker approves this is fine.
Example:

{
public:
TP_BaseShape() { si.base = this; }
TP_PShape* GetShapeClone(TP_PShapePtr &shape , TP_MasterSystem *msys, Int32 pid, Int32 flags, AliasTrans *trn)
{
// ...
}
TP_PShape* GetShape(TP_PShapePtr &shape , TP_MasterSystem *msys, Int32 pid, Int32 owner_id)
{
// ...
}
{
// ...
}
{
// ...
}
void FreeShape(TP_PShapePtr &shape, TP_MasterSystem *msys, Int32 pid)
{
// ...
}
};

In the TP_MSG_GET_PSHAPEINTERFACE message then simply set the passed pointer TP_PShapeInterface to &baseshape.si, for a global TP_BaseShape baseshape object that was previously created.
Thinking Particles will then call the shape functions as needed.

Public Attributes

TP_BaseShapebase
 
TP_PShapePtr(TP_BaseShape::* GetShapeClone )(const TP_PShapePtr &shape, TP_MasterSystem *msys, Int32 pid, COPYFLAGS flags, AliasTrans *trn)
 
TP_PShapePtr(TP_BaseShape::* GetShape )(const TP_PShapePtr &shape, TP_MasterSystem *msys, Int32 pid, Int32 owner_id)
 
BaseObject *(TP_BaseShape::* GetShapeVirtualObjects )(const TP_PShapePtr &shape, TP_MasterSystem *msys, Int32 pid, BaseDocument *doc, HierarchyHelp *hh)
 
Float(TP_BaseShape::* GetShapeScale )(const TP_PShapePtr &shape, TP_MasterSystem *msys, Int32 pid)
 
void(TP_BaseShape::* FreeShape )(TP_PShapePtr &shape, TP_MasterSystem *msys, Int32 pid)
 

Member Data Documentation

◆ base

TP_BaseShape* base

Base class pointer.

◆ GetShapeClone

TP_PShapePtr(TP_BaseShape::* GetShapeClone(const TP_PShapePtr &shape, TP_MasterSystem *msys, Int32 pid, COPYFLAGS flags, AliasTrans *trn)

◆ GetShape

TP_PShapePtr(TP_BaseShape::* GetShape(const TP_PShapePtr &shape, TP_MasterSystem *msys, Int32 pid, Int32 owner_id)

◆ GetShapeVirtualObjects

BaseObject*(TP_BaseShape::* GetShapeVirtualObjects(const TP_PShapePtr &shape, TP_MasterSystem *msys, Int32 pid, BaseDocument *doc, HierarchyHelp *hh)

◆ GetShapeScale

Float(TP_BaseShape::* GetShapeScale(const TP_PShapePtr &shape, TP_MasterSystem *msys, Int32 pid)

◆ FreeShape

void(TP_BaseShape::* FreeShape(TP_PShapePtr &shape, TP_MasterSystem *msys, Int32 pid)
HierarchyHelp
Definition: c4d_baseobject.h:179
TP_PShapeInterface::base
TP_BaseShape * base
Base class pointer.
Definition: c4d_particles.h:425
TP_BaseShape
Definition: c4d_particles.h:380
BaseObject
Definition: c4d_baseobject.h:224
Float
maxon::Float Float
Definition: ge_sys_math.h:66
TP_PShapeInterface
Definition: c4d_particles.h:423
AliasTrans
Definition: c4d_baselist.h:3033
TP_PShapeInterface::GetShapeVirtualObjects
BaseObject *(TP_BaseShape::* GetShapeVirtualObjects)(const TP_PShapePtr &shape, TP_MasterSystem *msys, Int32 pid, BaseDocument *doc, HierarchyHelp *hh)
Definition: c4d_particles.h:429
TP_PShapeInterface::GetShapeScale
Float(TP_BaseShape::* GetShapeScale)(const TP_PShapePtr &shape, TP_MasterSystem *msys, Int32 pid)
Definition: c4d_particles.h:430
TP_PShapeInterface::FreeShape
void(TP_BaseShape::* FreeShape)(TP_PShapePtr &shape, TP_MasterSystem *msys, Int32 pid)
Definition: c4d_particles.h:431
TP_PShapePtr
Wrapper around a TP_PShapeI pointer.
Definition: c4d_particles.h:253
Int32
maxon::Int32 Int32
Definition: ge_sys_math.h:60
TP_PShapeInterface::GetShapeClone
TP_PShapePtr(TP_BaseShape::* GetShapeClone)(const TP_PShapePtr &shape, TP_MasterSystem *msys, Int32 pid, COPYFLAGS flags, AliasTrans *trn)
Definition: c4d_particles.h:427
TP_MasterSystem
Definition: c4d_particles.h:672
TP_PShapeInterface::GetShape
TP_PShapePtr(TP_BaseShape::* GetShape)(const TP_PShapePtr &shape, TP_MasterSystem *msys, Int32 pid, Int32 owner_id)
Definition: c4d_particles.h:428
BaseDocument
Definition: c4d_basedocument.h:490