gz/physics/Register.hh File Reference
Go to the source code of this file.
Macros | |
#define | IGN_PHYSICS_ADD_PLUGIN(PluginType, FeaturePolicyT, FeatureListT) DETAIL_IGN_PHYSICS_ADD_PLUGIN(PluginType, FeaturePolicyT, FeatureListT) |
Add a plugin that can be used as physics engine. More... | |
Macro Definition Documentation
◆ IGN_PHYSICS_ADD_PLUGIN
#define IGN_PHYSICS_ADD_PLUGIN | ( | PluginType, | |
FeaturePolicyT, | |||
FeatureListT | |||
) | DETAIL_IGN_PHYSICS_ADD_PLUGIN(PluginType, FeaturePolicyT, FeatureListT) |
Add a plugin that can be used as physics engine.
- The first argument is the name of the class that wraps the physics engine into a plugin.
- The second argument is the Feature Policy for this plugin, e.g. ignition::physics::FeaturePolicy3d
- The third argument is the Feature List, specifying all the features that this plugin provides, e.g. ignition::physics::StandardFeatures
Note that the Feature Policy and Feature List should match the types that you pass to the ignition::physics::Implements<P, L> that your plugin class inherits.
If your library has multiple translation units (.cpp files) and you want to register plugins in multiple translation units, use this ignition/physics/Register.hh header in ONE of the translation units, and then the ignition/physics/RegisterMore.hh header in all of the rest of the translation units.