DeclareShapeType.hh File Reference
Go to the source code of this file.
Macros | |
#define | GZ_PHYSICS_DECLARE_SHAPE_TYPE(CustomShapeType) DETAIL_GZ_PHYSICS_DECLARE_DERIVED_TYPE(Shape, CustomShapeType) |
Given a shape type named CustomShapeType, this macro creates the following classes: More... | |
Macro Definition Documentation
◆ GZ_PHYSICS_DECLARE_SHAPE_TYPE
#define GZ_PHYSICS_DECLARE_SHAPE_TYPE | ( | CustomShapeType | ) | DETAIL_GZ_PHYSICS_DECLARE_DERIVED_TYPE(Shape, CustomShapeType) |
Given a shape type named CustomShapeType, this macro creates the following classes:
class CustomShapeTypeCast
- A Feature class that allows plain Shape objects to downcast themselves to CustomShapeType, as long as it is truly an instance of a CustomShapeType. This class provides the function Shape::CastToCustomShapeType() when added to a Shape's FeatureList.
template<P, F> class CustomShapeType
- An Entity class that includes the API of both the plain Shape class and the CustomShapeType, as defined by FeaturePolicy P and FeatureList F.
template <F> class CustomShapeType3d template <F> class CustomShapeType2d template <F> class CustomShapeType3f template <F> class CustomShapeType2f
- Similar to CustomShapeType<P,F>, except P is replaced with the predefined Feature Policies.
Physics engine plugin developers must implement the virtual function
Identity CastToCustomShapeType(const Identity &_id) const
if their physics engine plugin wants to be able to provide CustomShapeType features.