Provides convenient functions to spawn entities and load their plugins from SDF elements, to remove them, and to change their hierarchy. More...
#include <SdfEntityCreator.hh>
Public Member Functions | |
SdfEntityCreator (const SdfEntityCreator &_creator) | |
Copy constructor. More... | |
SdfEntityCreator (EntityComponentManager &_ecm, EventManager &_eventManager) | |
Constructor. More... | |
SdfEntityCreator (SdfEntityCreator &&_creator) noexcept | |
Move constructor. More... | |
~SdfEntityCreator () | |
Destructor. More... | |
Entity | CreateEntities (const sdf::Actor *_actor) |
Create all entities that exist in the sdf::Actor object and load their plugins. More... | |
Entity | CreateEntities (const sdf::Collision *_collision) |
Create all entities that exist in the sdf::Collision object and load their plugins. More... | |
Entity | CreateEntities (const sdf::Joint *_joint) |
Create all entities that exist in the sdf::Joint object and load their plugins. More... | |
Entity | CreateEntities (const sdf::Joint *_joint, bool _resolved) |
Create all entities that exist in the sdf::Joint object and load their plugins. More... | |
Entity | CreateEntities (const sdf::Light *_light) |
Create all entities that exist in the sdf::Light object and load their plugins. More... | |
Entity | CreateEntities (const sdf::Link *_link) |
Create all entities that exist in the sdf::Link object and load their plugins. More... | |
Entity | CreateEntities (const sdf::Model *_model) |
Create all entities that exist in the sdf::Model object and load their plugins. Also loads plugins of child sensors. More... | |
Entity | CreateEntities (const sdf::ParticleEmitter *_emitter) |
Create all entities that exist in the sdf::ParticleEmitter object. More... | |
Entity | CreateEntities (const sdf::Sensor *_sensor) |
Create all entities that exist in the sdf::Sensor object. Sensor plugins won't be directly loaded by this function. More... | |
Entity | CreateEntities (const sdf::Visual *_visual) |
Create all entities that exist in the sdf::Visual object and load their plugins. More... | |
Entity | CreateEntities (const sdf::World *_world) |
Create all entities that exist in the sdf::World object and load their plugins. More... | |
SdfEntityCreator & | operator= (const SdfEntityCreator &_creator) |
Copy assignment operator. More... | |
SdfEntityCreator & | operator= (SdfEntityCreator &&_creator) noexcept |
Move assignment operator. More... | |
void | RequestRemoveEntity (const Entity _entity, bool _recursive=true) |
Request an entity deletion. This will insert the request into a queue. The queue is processed toward the end of a simulation update step. More... | |
void | SetParent (Entity _child, Entity _parent) |
Set an entity's parent entity. This function takes care of updating the EntityComponentManager and necessary components. More... | |
Detailed Description
Provides convenient functions to spawn entities and load their plugins from SDF elements, to remove them, and to change their hierarchy.
ignition/gazebo/SdfEntityCreator.hh This class provides wrappers around entities and components which are more convenient and straight-forward to use than dealing with the EntityComponentManager
directly.
Constructor & Destructor Documentation
◆ SdfEntityCreator() [1/3]
|
explicit |
Constructor.
- Parameters
-
[in] _ecm Entity component manager. This class keeps a pointer to it, but doesn't assume ownership. [in] _eventManager Event manager. This class keeps a pointer to it, but doesn't assume ownership.
◆ SdfEntityCreator() [2/3]
SdfEntityCreator | ( | const SdfEntityCreator & | _creator | ) |
Copy constructor.
- Parameters
-
[in] _creator SdfEntityCreator to copy.
◆ SdfEntityCreator() [3/3]
|
noexcept |
Move constructor.
- Parameters
-
[in] _creator SdfEntityCreator to move.
◆ ~SdfEntityCreator()
~SdfEntityCreator | ( | ) |
Destructor.
Member Function Documentation
◆ CreateEntities() [1/11]
Entity CreateEntities | ( | const sdf::Actor * | _actor | ) |
Create all entities that exist in the sdf::Actor object and load their plugins.
- Parameters
-
[in] _actor SDF actor object.
- Returns
- Actor entity.
◆ CreateEntities() [2/11]
Entity CreateEntities | ( | const sdf::Collision * | _collision | ) |
Create all entities that exist in the sdf::Collision object and load their plugins.
- Parameters
-
[in] _collision SDF collision object.
- Returns
- Collision entity.
◆ CreateEntities() [3/11]
Entity CreateEntities | ( | const sdf::Joint * | _joint | ) |
Create all entities that exist in the sdf::Joint object and load their plugins.
- Parameters
-
[in] _joint SDF joint object.
- Returns
- Joint entity.
◆ CreateEntities() [4/11]
Entity CreateEntities | ( | const sdf::Joint * | _joint, |
bool | _resolved | ||
) |
Create all entities that exist in the sdf::Joint object and load their plugins.
- Parameters
-
[in] _joint SDF joint object. [in] _resolved True if all frames are already resolved
- Returns
- Joint entity.
◆ CreateEntities() [5/11]
Entity CreateEntities | ( | const sdf::Light * | _light | ) |
Create all entities that exist in the sdf::Light object and load their plugins.
- Parameters
-
[in] _light SDF light object.
- Returns
- Light entity.
◆ CreateEntities() [6/11]
Entity CreateEntities | ( | const sdf::Link * | _link | ) |
Create all entities that exist in the sdf::Link object and load their plugins.
- Parameters
-
[in] _link SDF link object.
- Returns
- Link entity.
◆ CreateEntities() [7/11]
Entity CreateEntities | ( | const sdf::Model * | _model | ) |
Create all entities that exist in the sdf::Model object and load their plugins. Also loads plugins of child sensors.
- Parameters
-
[in] _model SDF model object.
- Returns
- Model entity.
◆ CreateEntities() [8/11]
Entity CreateEntities | ( | const sdf::ParticleEmitter * | _emitter | ) |
Create all entities that exist in the sdf::ParticleEmitter object.
- Parameters
-
[in] _emitter SDF ParticleEmitter object.
- Returns
- ParticleEmitter entity.
◆ CreateEntities() [9/11]
Entity CreateEntities | ( | const sdf::Sensor * | _sensor | ) |
◆ CreateEntities() [10/11]
Entity CreateEntities | ( | const sdf::Visual * | _visual | ) |
Create all entities that exist in the sdf::Visual object and load their plugins.
- Parameters
-
[in] _visual SDF visual object.
- Returns
- Visual entity.
◆ CreateEntities() [11/11]
Entity CreateEntities | ( | const sdf::World * | _world | ) |
Create all entities that exist in the sdf::World object and load their plugins.
- Parameters
-
[in] _world SDF world object.
- Returns
- World entity.
◆ operator=() [1/2]
SdfEntityCreator& operator= | ( | const SdfEntityCreator & | _creator | ) |
Copy assignment operator.
- Parameters
-
[in] _creator SdfEntityCreator to copy.
- Returns
- Reference to this.
◆ operator=() [2/2]
|
noexcept |
Move assignment operator.
- Parameters
-
[in] _creator SdfEntityCreator component to move.
- Returns
- Reference to this.
◆ RequestRemoveEntity()
void RequestRemoveEntity | ( | const Entity | _entity, |
bool | _recursive = true |
||
) |
Request an entity deletion. This will insert the request into a queue. The queue is processed toward the end of a simulation update step.
- Parameters
-
[in] _entity Entity to be removed. [in] _recursive Whether to recursively delete all child entities. True by default.
◆ SetParent()
Set an entity's parent entity. This function takes care of updating the EntityComponentManager
and necessary components.
- Parameters
-
[in] _child Entity which should be parented. [in] _parent Entity which should be _child's parent.
The documentation for this class was generated from the following file: