Provides a description of an actor. More...
#include <Actor.hh>
Public Member Functions | |
Actor () | |
Default constructor. More... | |
void | AddAnimation (const Animation &_anim) |
Add a new animation. More... | |
bool | AddJoint (const Joint &_joint) |
Add a joint to the actor. More... | |
bool | AddLink (const Link &_link) |
Add a link to the actor. More... | |
void | AddPlugin (const Plugin &_plugin) |
Add a plugin to this object. More... | |
void | AddTrajectory (const Trajectory &_traj) |
Add a new trajectory. More... | |
const Animation * | AnimationByIndex (uint64_t _index) const |
Get an animation based on an index. More... | |
uint64_t | AnimationCount () const |
Get the number of animations. More... | |
bool | AnimationNameExists (const std::string &_name) const |
Get whether an animation name exists. More... | |
void | ClearJoints () |
Remove all joints. More... | |
void | ClearLinks () |
Remove all links. More... | |
void | ClearPlugins () |
Remove all plugins. More... | |
sdf::ElementPtr | Element () const |
Get a pointer to the SDF element that was used during load. More... | |
const std::string & | FilePath () const |
The path to the file where this element was loaded from. More... | |
const Joint * | JointByIndex (uint64_t _index) const |
Get a joint based on an index. More... | |
uint64_t | JointCount () const |
Get the number of joints. More... | |
bool | JointNameExists (const std::string &_name) const |
Get whether a joint name exists. More... | |
const Link * | LinkByIndex (uint64_t _index) const |
Get a link based on an index. More... | |
uint64_t | LinkCount () const |
Get the number of links. More... | |
bool | LinkNameExists (const std::string &_name) const |
Get whether a link name exists. More... | |
Errors | Load (ElementPtr _sdf) |
Load the actor based on a element pointer. More... | |
const std::string & | Name () const |
Get the name of the actor. More... | |
sdf::Plugins & | Plugins () |
Get a mutable vector of plugins attached to this object. More... | |
const sdf::Plugins & | Plugins () const |
Get the plugins attached to this object. More... | |
const std::string & | PoseRelativeTo () const |
Get the name of the coordinate frame relative to which this object's pose is expressed. More... | |
const gz::math::Pose3d & | RawPose () const |
Get the pose of the actor. More... | |
bool | ScriptAutoStart () const |
Get whether the animation plays when simulation starts. More... | |
double | ScriptDelayStart () const |
Get the time (in seconds) of delay to start. More... | |
bool | ScriptLoop () const |
Get whether the animation plays in loop. More... | |
void | SetFilePath (const std::string &_filePath) |
Set the path to the file where this element was loaded from. More... | |
void | SetName (const std::string &_name) |
Set the name of the actor. 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 gz::math::Pose3d &_pose) |
Set the pose of the actor. More... | |
void | SetScriptAutoStart (bool _scriptAutoStart) |
Set whether the animation plays when simulation starts. More... | |
void | SetScriptDelayStart (double _scriptDelayStart) |
Set the delay time to start. More... | |
void | SetScriptLoop (bool _scriptLoop) |
Set whether the animation plays in loop. More... | |
void | SetSkinFilename (std::string _skinFilename) |
Set the skin filename. More... | |
void | SetSkinScale (double _skinScale) |
Set the skin scale. More... | |
const std::string & | SkinFilename () const |
Get the skin filename. More... | |
double | SkinScale () const |
Get the skin scale. More... | |
sdf::ElementPtr | ToElement () const |
Create and return an SDF element filled with data from this actor. More... | |
const Trajectory * | TrajectoryByIndex (uint64_t _index) const |
Get a trajectory based on an index. More... | |
uint64_t | TrajectoryCount () const |
Get the number of trajectories. More... | |
bool | TrajectoryIdExists (uint64_t _id) const |
Get whether a trajectory id exists. More... | |
Provides a description of an actor.
sdf::SDF_VERSION_NAMESPACE::Actor::Actor | ( | ) |
Default constructor.
void sdf::SDF_VERSION_NAMESPACE::Actor::AddAnimation | ( | const Animation & | _anim | ) |
Add a new animation.
[in] | _anim | Animation to be added. |
bool sdf::SDF_VERSION_NAMESPACE::Actor::AddJoint | ( | const Joint & | _joint | ) |
Add a joint to the actor.
[in] | _link | Joint to add. |
bool sdf::SDF_VERSION_NAMESPACE::Actor::AddLink | ( | const Link & | _link | ) |
Add a link to the actor.
[in] | _link | Link to add. |
void sdf::SDF_VERSION_NAMESPACE::Actor::AddPlugin | ( | const Plugin & | _plugin | ) |
Add a plugin to this object.
[in] | _plugin | Plugin to add. |
void sdf::SDF_VERSION_NAMESPACE::Actor::AddTrajectory | ( | const Trajectory & | _traj | ) |
Add a new trajectory.
[in] | _traj | Trajectory to be added. |
const Animation * sdf::SDF_VERSION_NAMESPACE::Actor::AnimationByIndex | ( | uint64_t | _index | ) | const |
Get an animation based on an index.
[in] | _index | Index of the animation. The index should be in the range [0..AnimationCount()). |
uint64_t sdf::SDF_VERSION_NAMESPACE::Actor::AnimationCount | ( | ) | const |
Get the number of animations.
bool sdf::SDF_VERSION_NAMESPACE::Actor::AnimationNameExists | ( | const std::string & | _name | ) | const |
Get whether an animation name exists.
[in] | _name | Name of the animation to check. |
void sdf::SDF_VERSION_NAMESPACE::Actor::ClearJoints | ( | ) |
Remove all joints.
void sdf::SDF_VERSION_NAMESPACE::Actor::ClearLinks | ( | ) |
Remove all links.
void sdf::SDF_VERSION_NAMESPACE::Actor::ClearPlugins | ( | ) |
Remove all plugins.
sdf::ElementPtr sdf::SDF_VERSION_NAMESPACE::Actor::Element | ( | ) | const |
const std::string & sdf::SDF_VERSION_NAMESPACE::Actor::FilePath | ( | ) | const |
The path to the file where this element was loaded from.
const Joint * sdf::SDF_VERSION_NAMESPACE::Actor::JointByIndex | ( | uint64_t | _index | ) | const |
Get a joint based on an index.
[in] | _index | Index of the joint. The index should be in the range [0..JointCount()). |
uint64_t sdf::SDF_VERSION_NAMESPACE::Actor::JointCount | ( | ) | const |
Get the number of joints.
bool sdf::SDF_VERSION_NAMESPACE::Actor::JointNameExists | ( | const std::string & | _name | ) | const |
Get whether a joint name exists.
[in] | _name | Name of the joint to check. |
const Link * sdf::SDF_VERSION_NAMESPACE::Actor::LinkByIndex | ( | uint64_t | _index | ) | const |
Get a link based on an index.
[in] | _index | Index of the link. The index should be in the range [0..LinkCount()). |
uint64_t sdf::SDF_VERSION_NAMESPACE::Actor::LinkCount | ( | ) | const |
Get the number of links.
bool sdf::SDF_VERSION_NAMESPACE::Actor::LinkNameExists | ( | const std::string & | _name | ) | const |
Get whether a link name exists.
[in] | _name | Name of the link to check. |
Errors sdf::SDF_VERSION_NAMESPACE::Actor::Load | ( | ElementPtr | _sdf | ) |
const std::string & sdf::SDF_VERSION_NAMESPACE::Actor::Name | ( | ) | const |
Get the name of the actor.
sdf::Plugins & sdf::SDF_VERSION_NAMESPACE::Actor::Plugins | ( | ) |
Get a mutable vector of plugins attached to this object.
const sdf::Plugins & sdf::SDF_VERSION_NAMESPACE::Actor::Plugins | ( | ) | const |
Get the plugins attached to this object.
const std::string & sdf::SDF_VERSION_NAMESPACE::Actor::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 world frame.
const gz::math::Pose3d & sdf::SDF_VERSION_NAMESPACE::Actor::RawPose | ( | ) | const |
Get the pose of the actor.
This is the pose of the actor as specified in SDF (<actor> <pose> ... </pose></actor>), and is typically used to express the position and rotation of an actor in a global coordinate frame.
bool sdf::SDF_VERSION_NAMESPACE::Actor::ScriptAutoStart | ( | ) | const |
Get whether the animation plays when simulation starts.
double sdf::SDF_VERSION_NAMESPACE::Actor::ScriptDelayStart | ( | ) | const |
Get the time (in seconds) of delay to start.
bool sdf::SDF_VERSION_NAMESPACE::Actor::ScriptLoop | ( | ) | const |
Get whether the animation plays in loop.
void sdf::SDF_VERSION_NAMESPACE::Actor::SetFilePath | ( | const std::string & | _filePath | ) |
Set the path to the file where this element was loaded from.
\paramp[in] _filePath Full path to the file on disk.
void sdf::SDF_VERSION_NAMESPACE::Actor::SetName | ( | const std::string & | _name | ) |
Set the name of the actor.
[in] | _name | Name of the actor. |
void sdf::SDF_VERSION_NAMESPACE::Actor::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 world frame.
[in] | _frame | The name of the pose relative-to frame. |
void sdf::SDF_VERSION_NAMESPACE::Actor::SetRawPose | ( | const gz::math::Pose3d & | _pose | ) |
Set the pose of the actor.
[in] | _pose | The new actor pose. |
void sdf::SDF_VERSION_NAMESPACE::Actor::SetScriptAutoStart | ( | bool | _scriptAutoStart | ) |
Set whether the animation plays when simulation starts.
[in] | _staticAutoStart | True to indicate that the animation plays when simulation starts. |
void sdf::SDF_VERSION_NAMESPACE::Actor::SetScriptDelayStart | ( | double | _scriptDelayStart | ) |
Set the delay time to start.
[in] | _scriptDelayStart | Time of delay to start. |
void sdf::SDF_VERSION_NAMESPACE::Actor::SetScriptLoop | ( | bool | _scriptLoop | ) |
Set whether the animation plays in loop.
[in] | _scriptLoop | True to indicate that the animation plays in loop. |
void sdf::SDF_VERSION_NAMESPACE::Actor::SetSkinFilename | ( | std::string | _skinFilename | ) |
Set the skin filename.
[in] | _skinFilename | Skin filename. |
void sdf::SDF_VERSION_NAMESPACE::Actor::SetSkinScale | ( | double | _skinScale | ) |
Set the skin scale.
[in] | _skinScale | Skin scale. |
const std::string & sdf::SDF_VERSION_NAMESPACE::Actor::SkinFilename | ( | ) | const |
Get the skin filename.
double sdf::SDF_VERSION_NAMESPACE::Actor::SkinScale | ( | ) | const |
Get the skin scale.
sdf::ElementPtr sdf::SDF_VERSION_NAMESPACE::Actor::ToElement | ( | ) | const |
const Trajectory * sdf::SDF_VERSION_NAMESPACE::Actor::TrajectoryByIndex | ( | uint64_t | _index | ) | const |
Get a trajectory based on an index.
[in] | _index | Index of the trajectory. The index should be in the range [0..TrajectoryCount()). |
uint64_t sdf::SDF_VERSION_NAMESPACE::Actor::TrajectoryCount | ( | ) | const |
Get the number of trajectories.
bool sdf::SDF_VERSION_NAMESPACE::Actor::TrajectoryIdExists | ( | uint64_t | _id | ) | const |
Get whether a trajectory id exists.
[in] | _id | Id of the trajectory to check. |