#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.
范例:
在
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, 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:
TP_PShapePtr GetShape ( TP_PShapePtr &shape, TP_MasterSystem *msys, Int32 pid, Int32 owner_id) { if (shape-> Get ()-> owner_id == owner_id) return TP_ShapePtr(shape); return nullptr ; }[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, 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() |