Gazebo Physics

API Reference

6.5.1
gz/physics/DeclareJointType.hh File Reference
#include <gz/physics/FeatureList.hh>
#include <gz/physics/detail/DeclareDerivedType.hh>

Go to the source code of this file.

Macros

#define GZ_PHYSICS_DECLARE_JOINT_TYPE(CustomJointType)   DETAIL_GZ_PHYSICS_DECLARE_DERIVED_TYPE(Joint, CustomJointType)
 Given a joint type named CustomJointType, this macro creates the following classes: More...
 

Macro Definition Documentation

◆ GZ_PHYSICS_DECLARE_JOINT_TYPE

#define GZ_PHYSICS_DECLARE_JOINT_TYPE (   CustomJointType)    DETAIL_GZ_PHYSICS_DECLARE_DERIVED_TYPE(Joint, CustomJointType)

Given a joint type named CustomJointType, this macro creates the following classes:

class CustomJointTypeCast

  • A Feature class that allows plain Joint objects to downcast themselves to CustomJointType, as long as it is truly an instance of a CustomJointType. This class provides the function Joint::CastToCustomJointType() when added to a Joint's FeatureList.

template<P, F> class CustomJointType

  • An Entity class that includes the API of both the plain Joint class and the CustomJointType, as defined by FeaturePolicy P and FeatureList F.

template <F> class CustomJointType3d template <F> class CustomJointType2d template <F> class CustomJointType3f template <F> class CustomJointType2f

  • Similar to CustomJointType<P,F>, except P is replaced with the predefined Feature Policies.

Physics engine plugin developers must implement the virtual function

Identity CastToCustomJointType(const Identity &_id) const

if their physics engine plugin wants to be able to provide CustomJointType features.