#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:
{
public:
{
}
{
}
{
}
{
}
{
}
};
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.
|
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) |
|
◆ base
◆ GetShapeClone
Return a clone of shape.
- Parameters
-
[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. |
- Returns
- The particle shape pointer structure of the cloned particle shape. The caller owns the pointed TP_PShapePtr.
◆ GetShape
Return the shape associated with shape. Normally this is the same object, so a typical implementation would be:
{
return TP_ShapePtr(shape);
return nullptr;
}
- Parameters
-
[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. |
- Returns
- The particle shape pointer structure. The shape handler owns the pointed shape.
◆ GetShapeVirtualObjects
Return a real BaseObject for shape.
- Parameters
-
[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. |
- Returns
- The particle shape object. The particle shape handler owns the pointed object.
◆ GetShapeScale
Return the scale of the particle shape.
- Parameters
-
[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() |
- Returns
- The particle shape scale.
◆ FreeShape
Free the particle shape.
- Parameters
-
[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() |
Definition: c4d_baseobject.h:179
TP_BaseShape * base
Base class pointer.
Definition: c4d_particles.h:439
Definition: c4d_particles.h:394
Definition: c4d_baseobject.h:224
maxon::Float Float
Definition: ge_sys_math.h:64
Definition: c4d_particles.h:437
Definition: c4d_baselist.h:2977
BaseObject *(TP_BaseShape::* GetShapeVirtualObjects)(const TP_PShapePtr &shape, TP_MasterSystem *msys, Int32 pid, BaseDocument *doc, HierarchyHelp *hh)
Definition: c4d_particles.h:480
Float(TP_BaseShape::* GetShapeScale)(const TP_PShapePtr &shape, TP_MasterSystem *msys, Int32 pid)
Definition: c4d_particles.h:489
void(TP_BaseShape::* FreeShape)(TP_PShapePtr &shape, TP_MasterSystem *msys, Int32 pid)
Definition: c4d_particles.h:497
Wrapper around a TP_PShapeI pointer.
Definition: c4d_particles.h:267
maxon::Int32 Int32
Definition: ge_sys_math.h:58
Int32 owner_id
Owner ID of the shape. This is TP_MasterSystem::GetOperatorID() for the node responsible for the shap...
Definition: c4d_particles.h:248
TP_PShapePtr(TP_BaseShape::* GetShapeClone)(const TP_PShapePtr &shape, TP_MasterSystem *msys, Int32 pid, COPYFLAGS flags, AliasTrans *trn)
Definition: c4d_particles.h:450
TP_PShapeI * Get() const
Definition: c4d_particles.h:369
Definition: c4d_particles.h:739
TP_PShapePtr(TP_BaseShape::* GetShape)(const TP_PShapePtr &shape, TP_MasterSystem *msys, Int32 pid, Int32 owner_id)
Definition: c4d_particles.h:469
Definition: c4d_basedocument.h:490