OpenXcom  1.0
Open-source clone of the original X-Com
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
OpenXcom::UfoTrajectory Class Reference

Holds information about a specific trajectory. More...

#include <UfoTrajectory.h>

Public Member Functions

const std::string & getID () const
 Gets the trajectory's ID. More...
 
void load (const YAML::Node &node)
 Loads trajectory data from YAML. More...
 
size_t getWaypointCount () const
 Gets the number of waypoints in this trajectory. More...
 
size_t getZone (size_t wp) const
 Gets the zone index at a waypoint. More...
 
std::string getAltitude (size_t wp) const
 Gets the altitude at a waypoint. More...
 
float getSpeedPercentage (size_t wp) const
 Gets the speed percentage at a waypoint. More...
 
size_t groundTimer () const
 Gets the number of seconds UFOs should spend on the ground. More...
 

Detailed Description

Holds information about a specific trajectory.

Ufo trajectories are a sequence of mission zones, altitudes and speed percentages.

Member Function Documentation

std::string OpenXcom::UfoTrajectory::getAltitude ( size_t  wp) const

Gets the altitude at a waypoint.

Parameters
wpThe waypoint.
Returns
The altitude.
const std::string& OpenXcom::UfoTrajectory::getID ( ) const
inline

Gets the trajectory's ID.

Returns
The trajectory's ID.
float OpenXcom::UfoTrajectory::getSpeedPercentage ( size_t  wp) const
inline

Gets the speed percentage at a waypoint.

Parameters
wpThe waypoint.
Returns
The speed as a percentage.
size_t OpenXcom::UfoTrajectory::getWaypointCount ( ) const
inline

Gets the number of waypoints in this trajectory.

Returns
The number of waypoints.
size_t OpenXcom::UfoTrajectory::getZone ( size_t  wp) const
inline

Gets the zone index at a waypoint.

Parameters
wpThe waypoint.
Returns
The zone index.
size_t OpenXcom::UfoTrajectory::groundTimer ( ) const
inline

Gets the number of seconds UFOs should spend on the ground.

Returns
The number of seconds.
void OpenXcom::UfoTrajectory::load ( const YAML::Node &  node)

Loads trajectory data from YAML.

Overwrites trajectory data with the data stored in node.

Only the fields contained in the node will be overwritten.

Parameters
nodeThe node containing the new values.

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