Trajectory for Animation.
More...
#include <Actor.hh>
|
| Trajectory () |
| Default constructor.
|
|
void | AddWaypoint (const Waypoint &_waypoint) |
| Add a new waypoint.
|
|
uint64_t | Id () const |
| Get the unique id of the trajectory.
|
|
Errors | Load (ElementPtr _sdf) |
| Load the trajectory based on a element pointer.
|
|
void | SetId (uint64_t _id) |
| Set the ID of the trajectory.
|
|
void | SetTension (double _tension) |
| Set the tension of trajectory spline.
|
|
void | SetType (const std::string &_type) |
| Set the animation type of the trajectory.
|
|
double | Tension () const |
| Get the tension of the trajectory spline.
|
|
const std::string & | Type () const |
| Get the type of the trajectory.
|
|
const Waypoint * | WaypointByIndex (uint64_t _index) const |
| Get a waypoint based on an index.
|
|
uint64_t | WaypointCount () const |
| Get the number of waypoints.
|
|
◆ Trajectory()
sdf::SDF_VERSION_NAMESPACE::Trajectory::Trajectory |
( |
| ) |
|
◆ AddWaypoint()
void sdf::SDF_VERSION_NAMESPACE::Trajectory::AddWaypoint |
( |
const Waypoint & |
_waypoint | ) |
|
Add a new waypoint.
- Parameters
-
◆ Id()
uint64_t sdf::SDF_VERSION_NAMESPACE::Trajectory::Id |
( |
| ) |
const |
Get the unique id of the trajectory.
- Returns
- Trajectory id.
◆ Load()
Load the trajectory based on a element pointer.
This is not the usual entry point. Typical usage of the SDF DOM is through the Root object.
- Parameters
-
- Returns
- Errors, which is a vector of Error objects. Each Error includes an error code and message. An empty vector indicates no error.
◆ SetId()
void sdf::SDF_VERSION_NAMESPACE::Trajectory::SetId |
( |
uint64_t |
_id | ) |
|
Set the ID of the trajectory.
- Parameters
-
◆ SetTension()
void sdf::SDF_VERSION_NAMESPACE::Trajectory::SetTension |
( |
double |
_tension | ) |
|
Set the tension of trajectory spline.
- Parameters
-
[in] | _tension | Tension for the trajectory spline. |
◆ SetType()
void sdf::SDF_VERSION_NAMESPACE::Trajectory::SetType |
( |
const std::string & |
_type | ) |
|
Set the animation type of the trajectory.
(should match the animation name).
- Parameters
-
◆ Tension()
double sdf::SDF_VERSION_NAMESPACE::Trajectory::Tension |
( |
| ) |
const |
Get the tension of the trajectory spline.
- Returns
- Tension of the trajectory spline.
◆ Type()
const std::string & sdf::SDF_VERSION_NAMESPACE::Trajectory::Type |
( |
| ) |
const |
Get the type of the trajectory.
- Returns
- Type of the trajectory.
◆ WaypointByIndex()
const Waypoint * sdf::SDF_VERSION_NAMESPACE::Trajectory::WaypointByIndex |
( |
uint64_t |
_index | ) |
const |
Get a waypoint based on an index.
- Parameters
-
[in] | _index | Index of the waypoint. The index should be in the range [0..WaypointCount()). |
- Returns
- Pointer to the waypoint. Nullptr if the index does not exist.
- See also
- uint64_t WaypointCount() const
◆ WaypointCount()
uint64_t sdf::SDF_VERSION_NAMESPACE::Trajectory::WaypointCount |
( |
| ) |
const |
Get the number of waypoints.
- Returns
- Number of waypoints.
The documentation for this class was generated from the following file: