#include <Link.hh>
Public Member Functions | |
Link () | |
Default constructor. More... | |
Link (const Link &_link) | |
Copy constructor. More... | |
Link (Link &&_link) noexcept | |
Move constructor. More... | |
~Link () | |
Destructor. More... | |
const Collision * | CollisionByIndex (const uint64_t _index) const |
Get a collision based on an index. More... | |
const Collision * | CollisionByName (const std::string &_name) const |
Get a collision based on a name. More... | |
uint64_t | CollisionCount () const |
Get the number of collisions. More... | |
bool | CollisionNameExists (const std::string &_name) const |
Get whether a collision name exists. More... | |
sdf::ElementPtr | Element () const |
Get a pointer to the SDF element that was used during load. More... | |
bool | EnableWind () const |
Check if this link should be subject to wind. More... | |
const ignition::math::Inertiald & | Inertial () const |
Get the inertial value for this link. More... | |
const Light * | LightByIndex (const uint64_t _index) const |
Get a light based on an index. More... | |
const Light * | LightByName (const std::string &_name) const |
Get a light based on a name. More... | |
uint64_t | LightCount () const |
Get the number of lights. More... | |
bool | LightNameExists (const std::string &_name) const |
Get whether a light name exists. More... | |
Errors | Load (ElementPtr _sdf) |
Load the link based on a element pointer. More... | |
std::string | Name () const |
Get the name of the link. More... | |
Link & | operator= (const Link &_link) |
Copy assignment operator. More... | |
Link & | operator= (Link &&_link) |
Move assignment operator. More... | |
const ParticleEmitter * | ParticleEmitterByIndex (const uint64_t _index) const |
Get a particle emitter based on an index. More... | |
const ParticleEmitter * | ParticleEmitterByName (const std::string &_name) const |
Get a particle emitter based on a name. More... | |
uint64_t | ParticleEmitterCount () const |
Get the number of particle emitters. More... | |
bool | ParticleEmitterNameExists (const std::string &_name) const |
Get whether a particle emitter name exists. More... | |
const std::string & | PoseRelativeTo () const |
Get the name of the coordinate frame relative to which this object's pose is expressed. More... | |
const ignition::math::Pose3d & | RawPose () const |
Get the pose of the link. More... | |
sdf::SemanticPose | SemanticPose () const |
Get SemanticPose object of this object to aid in resolving poses. More... | |
const Sensor * | SensorByIndex (const uint64_t _index) const |
Get a sensor based on an index. More... | |
const Sensor * | SensorByName (const std::string &_name) const |
Get a sensor based on a name. More... | |
uint64_t | SensorCount () const |
Get the number of sensors. More... | |
bool | SensorNameExists (const std::string &_name) const |
Get whether a sensor name exists. More... | |
void | SetEnableWind (bool _enableWind) |
Set whether this link should be subject to wind. More... | |
bool | SetInertial (const ignition::math::Inertiald &_inertial) |
Set the inertial value for this link. More... | |
void | SetName (const std::string &_name) const |
Set the name of the link. More... | |
void | SetPoseRelativeTo (const std::string &_frame) |
Set the name of the coordinate frame relative to which this object's pose is expressed. More... | |
void | SetRawPose (const ignition::math::Pose3d &_pose) |
Set the pose of the link. More... | |
const Visual * | VisualByIndex (const uint64_t _index) const |
Get a visual based on an index. More... | |
const Visual * | VisualByName (const std::string &_name) const |
Get a visual based on a name. More... | |
uint64_t | VisualCount () const |
Get the number of visuals. More... | |
bool | VisualNameExists (const std::string &_name) const |
Get whether a visual name exists. More... | |
sdf::v10::Link::Link | ( | ) |
Default constructor.
sdf::v10::Link::~Link | ( | ) |
Destructor.
const Collision* sdf::v10::Link::CollisionByIndex | ( | const uint64_t | _index | ) | const |
Get a collision based on an index.
[in] | _index | Index of the collision. The index should be in the range [0..CollisionCount()). |
const Collision* sdf::v10::Link::CollisionByName | ( | const std::string & | _name | ) | const |
Get a collision based on a name.
[in] | _name | Name of the collision. |
uint64_t sdf::v10::Link::CollisionCount | ( | ) | const |
Get the number of collisions.
bool sdf::v10::Link::CollisionNameExists | ( | const std::string & | _name | ) | const |
Get whether a collision name exists.
[in] | _name | Name of the collision to check. |
sdf::ElementPtr sdf::v10::Link::Element | ( | ) | const |
bool sdf::v10::Link::EnableWind | ( | ) | const |
Check if this link should be subject to wind.
If true, this link should be affected by wind.
const ignition::math::Inertiald& sdf::v10::Link::Inertial | ( | ) | const |
Get the inertial value for this link.
The inertial object consists of the link's mass, a 3x3 rotational inertia matrix, and a pose for the inertial reference frame. The units for mass is kilograms with a default value of 1kg. The 3x3 rotational inertia matrix is symmetric and only 6 above-diagonal elements of this matrix are specified the Interial's ignition::math::MassMatrix3 property.
The origin of the inertial reference frame needs to be at the center of mass expressed in this link's frame. The axes of the inertial reference frame do not need to be aligned with the principal axes of the inertia.
const Light* sdf::v10::Link::LightByIndex | ( | const uint64_t | _index | ) | const |
Get a light based on an index.
[in] | _index | Index of the light. The index should be in the range [0..LightCount()). |
const Light* sdf::v10::Link::LightByName | ( | const std::string & | _name | ) | const |
Get a light based on a name.
[in] | _name | Name of the light. |
uint64_t sdf::v10::Link::LightCount | ( | ) | const |
Get the number of lights.
bool sdf::v10::Link::LightNameExists | ( | const std::string & | _name | ) | const |
Get whether a light name exists.
[in] | _name | Name of the light to check. |
Errors sdf::v10::Link::Load | ( | ElementPtr | _sdf | ) |
std::string sdf::v10::Link::Name | ( | ) | const |
Get the name of the link.
The name of a link must be unique within the scope of a Model.
const ParticleEmitter* sdf::v10::Link::ParticleEmitterByIndex | ( | const uint64_t | _index | ) | const |
Get a particle emitter based on an index.
[in] | _index | Index of the particle emitter. The index should be in the range [0..ParticleEmitterCount()). |
const ParticleEmitter* sdf::v10::Link::ParticleEmitterByName | ( | const std::string & | _name | ) | const |
Get a particle emitter based on a name.
[in] | _name | Name of the particle emitter. |
uint64_t sdf::v10::Link::ParticleEmitterCount | ( | ) | const |
Get the number of particle emitters.
bool sdf::v10::Link::ParticleEmitterNameExists | ( | const std::string & | _name | ) | const |
Get whether a particle emitter name exists.
[in] | _name | Name of the particle emitter to check. |
const std::string& sdf::v10::Link::PoseRelativeTo | ( | ) | const |
Get the name of the coordinate frame relative to which this object's pose is expressed.
An empty value indicates that the frame is relative to the parent model.
const ignition::math::Pose3d& sdf::v10::Link::RawPose | ( | ) | const |
Get the pose of the link.
This is the pose of the link as specified in SDF (<link> <pose> ... </pose></link>).
sdf::SemanticPose sdf::v10::Link::SemanticPose | ( | ) | const |
Get SemanticPose object of this object to aid in resolving poses.
const Sensor* sdf::v10::Link::SensorByIndex | ( | const uint64_t | _index | ) | const |
Get a sensor based on an index.
[in] | _index | Index of the sensor. The index should be in the range [0..SensorCount()). |
const Sensor* sdf::v10::Link::SensorByName | ( | const std::string & | _name | ) | const |
Get a sensor based on a name.
[in] | _name | Name of the sensor. |
uint64_t sdf::v10::Link::SensorCount | ( | ) | const |
Get the number of sensors.
bool sdf::v10::Link::SensorNameExists | ( | const std::string & | _name | ) | const |
Get whether a sensor name exists.
[in] | _name | Name of the sensor to check. |
void sdf::v10::Link::SetEnableWind | ( | bool | _enableWind | ) |
Set whether this link should be subject to wind.
[in] | _enableWind | True or false depending on whether the link should be subject to wind. |
bool sdf::v10::Link::SetInertial | ( | const ignition::math::Inertiald & | _inertial | ) |
Set the inertial value for this link.
[in] | _inertial | The link's inertial value. |
void sdf::v10::Link::SetName | ( | const std::string & | _name | ) | const |
Set the name of the link.
The name of a link must be unique within the scope of a Model.
[in] | _name | Name of the link. |
void sdf::v10::Link::SetPoseRelativeTo | ( | const std::string & | _frame | ) |
Set the name of the coordinate frame relative to which this object's pose is expressed.
An empty value indicates that the frame is relative to the parent model.
[in] | _frame | The name of the pose relative-to frame. |
void sdf::v10::Link::SetRawPose | ( | const ignition::math::Pose3d & | _pose | ) |
Set the pose of the link.
[in] | _pose | The new link pose. |
const Visual* sdf::v10::Link::VisualByIndex | ( | const uint64_t | _index | ) | const |
Get a visual based on an index.
[in] | _index | Index of the visual. The index should be in the range [0..VisualCount()). |
const Visual* sdf::v10::Link::VisualByName | ( | const std::string & | _name | ) | const |
Get a visual based on a name.
[in] | _name | Name of the visual. |
uint64_t sdf::v10::Link::VisualCount | ( | ) | const |
Get the number of visuals.
bool sdf::v10::Link::VisualNameExists | ( | const std::string & | _name | ) | const |
Get whether a visual name exists.
[in] | _name | Name of the visual to check. |