#include <c4d_particles.h>
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:
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_BaseShape * | base |
| 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, const 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) |
| TP_BaseShape* base |
Base class pointer.
| TP_PShapePtr(TP_BaseShape::* GetShapeClone) (const TP_PShapePtr &shape, TP_MasterSystem *msys, Int32 pid, COPYFLAGS flags, AliasTrans *trn) |
Return a clone of shape.
| [in] | shape | The particle shape pointer structure of the particle shape handle. |
| [in] | msys | The master system. The caller owns the pointed TP_MasterSystem. |
| [in] | pid | The particle ID: 0 <= pid < msys->NumParticles() |
| [in] | flags | The flags: COPYFLAGS |
| [in] | trn | An alias translator for the operation. Can be nullptr. The caller owns the pointed AliasTrans. |
| TP_PShapePtr(TP_BaseShape::* GetShape) (const TP_PShapePtr &shape, TP_MasterSystem *msys, Int32 pid, Int32 owner_id) |
Return the shape associated with shape. Normally this is the same object, so a typical implementation would be:
| [in] | shape | The particle shape pointer structure of the particle shape handle. |
| [in] | msys | The master system. The caller owns the pointed TP_MasterSystem. |
| [in] | pid | The particle ID: 0 <= pid < msys->NumParticles() |
| [in] | owner_id | The owner ID. |
| BaseObject*(TP_BaseShape::* GetShapeVirtualObjects) (const TP_PShapePtr &shape, TP_MasterSystem *msys, Int32 pid, BaseDocument *doc, const HierarchyHelp *hh) |
Return a real BaseObject for shape.
| [in] | shape | The particle shape pointer structure of the particle shape handle. |
| [in] | msys | The master system. The caller owns the pointed TP_MasterSystem. |
| [in] | pid | The particle ID: 0 <= pid < msys->NumParticles() |
| [in] | doc | The current document. The caller owns the pointed BaseDocument. |
| [in] | hh | A hierarchy helper for the operation. The caller owns the pointed HierarchyHelp. |
| Float(TP_BaseShape::* GetShapeScale) (const TP_PShapePtr &shape, TP_MasterSystem *msys, Int32 pid) |
Return the scale of the particle shape.
| [in] | shape | The particle shape pointer structure of the particle shape handle. |
| [in] | msys | The master system. The caller owns the pointed TP_MasterSystem. |
| [in] | pid | The particle ID: 0 <= pid < msys->NumParticles() |
| void(TP_BaseShape::* FreeShape) (TP_PShapePtr &shape, TP_MasterSystem *msys, Int32 pid) |
Free the particle shape.
| [in] | shape | The particle shape pointer structure of the particle shape handle. |
| [in] | msys | The master system. The caller owns the pointed TP_MasterSystem. |
| [in] | pid | The particle ID: 0 <= pid < msys->NumParticles() |