Public Member Functions | List of all members
sdf::v10::Trajectory Class Reference

Trajectory for Animation. More...

#include <Actor.hh>

Public Member Functions

 Trajectory ()
 Default constructor. More...
 
 Trajectory (const Trajectory &_trajectory)
 Copy constructor. More...
 
 Trajectory (Trajectory &&_trajectory) noexcept
 Move constructor. More...
 
 ~Trajectory ()
 Destructor. More...
 
void AddWaypoint (const Waypoint &_waypoint)
 Add a new waypoint. More...
 
void CopyFrom (const Trajectory &_trajectory)
 Copy trajectory from a trajectory instance. More...
 
uint64_t Id () const
 Get the unique id of the trajectory. More...
 
Errors Load (ElementPtr _sdf)
 Load the trajectory based on a element pointer. More...
 
Trajectoryoperator= (const Trajectory &_trajectory)
 Assignment operator. More...
 
Trajectoryoperator= (Trajectory &&_trajectory)
 Move assignment operator. More...
 
void SetId (uint64_t _id)
 Set the ID of the trajectory. More...
 
void SetTension (double _tension)
 Set the tension of trajectory spline. More...
 
void SetType (const std::string &_type)
 Set the animation type of the trajectory. More...
 
double Tension () const
 Get the tension of the trajectory spline. More...
 
const std::string & Type () const
 Get the type of the trajectory. More...
 
const WaypointWaypointByIndex (uint64_t _index) const
 Get a waypoint based on an index. More...
 
uint64_t WaypointCount () const
 Get the number of waypoints. More...
 

Detailed Description

Trajectory for Animation.

Constructor & Destructor Documentation

◆ Trajectory() [1/3]

sdf::v10::Trajectory::Trajectory ( )

Default constructor.

◆ Trajectory() [2/3]

sdf::v10::Trajectory::Trajectory ( const Trajectory _trajectory)

Copy constructor.

Parameters
[in]_trajectoryTrajectory to copy.

◆ Trajectory() [3/3]

sdf::v10::Trajectory::Trajectory ( Trajectory &&  _trajectory)
noexcept

Move constructor.

Parameters
[in]_trajectoryTrajectory to move.

◆ ~Trajectory()

sdf::v10::Trajectory::~Trajectory ( )

Destructor.

Member Function Documentation

◆ AddWaypoint()

void sdf::v10::Trajectory::AddWaypoint ( const Waypoint _waypoint)

Add a new waypoint.

Parameters
[in]_waypointWaypoint to be added.

◆ CopyFrom()

void sdf::v10::Trajectory::CopyFrom ( const Trajectory _trajectory)

Copy trajectory from a trajectory instance.

Parameters
[in]_trajectoryThe trajectory to set values from.

◆ Id()

uint64_t sdf::v10::Trajectory::Id ( ) const

Get the unique id of the trajectory.

Returns
Trajectory id.

◆ Load()

Errors sdf::v10::Trajectory::Load ( ElementPtr  _sdf)

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
[in]_sdfThe SDF Element pointer
Returns
Errors, which is a vector of Error objects. Each Error includes an error code and message. An empty vector indicates no error.

◆ operator=() [1/2]

Trajectory& sdf::v10::Trajectory::operator= ( const Trajectory _trajectory)

Assignment operator.

Parameters
[in]_trajectoryThe trajectory to set values from.
Returns
*this

◆ operator=() [2/2]

Trajectory& sdf::v10::Trajectory::operator= ( Trajectory &&  _trajectory)

Move assignment operator.

Parameters
[in]_trajectoryTrajectory to move.
Returns
Reference to this.

◆ SetId()

void sdf::v10::Trajectory::SetId ( uint64_t  _id)

Set the ID of the trajectory.

Parameters
[in]_idTrajectory Id.

◆ SetTension()

void sdf::v10::Trajectory::SetTension ( double  _tension)

Set the tension of trajectory spline.

Parameters
[in]_tensionTension for the trajectory spline.

◆ SetType()

void sdf::v10::Trajectory::SetType ( const std::string &  _type)

Set the animation type of the trajectory.

(should match the animation name).

Parameters
[in]_typeAnimation type to be played.

◆ Tension()

double sdf::v10::Trajectory::Tension ( ) const

Get the tension of the trajectory spline.

Returns
Tension of the trajectory spline.

◆ Type()

const std::string& sdf::v10::Trajectory::Type ( ) const

Get the type of the trajectory.

Returns
Type of the trajectory.

◆ WaypointByIndex()

const Waypoint* sdf::v10::Trajectory::WaypointByIndex ( uint64_t  _index) const

Get a waypoint based on an index.

Parameters
[in]_indexIndex 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::v10::Trajectory::WaypointCount ( ) const

Get the number of waypoints.

Returns
Number of waypoints.

The documentation for this class was generated from the following file: