supertux
Classes | Public Member Functions | Public Attributes | List of all members
Path Class Referencefinal

Classes

class  Node
 Helper class that stores an individual node of a Path. More...
 

Public Member Functions

 Path (PathGameObject &parent)
 
 Path (const Vector &pos, PathGameObject &parent)
 
void read (const ReaderMapping &reader)
 
void save (Writer &writer)
 
Vector get_base () const
 
int get_nearest_node_idx (const Vector &reference_point) const
 returns Node index nearest to reference_point or -1 if not applicable
 
int get_farthest_node_idx (const Vector &reference_point) const
 returns Node index farthest from reference_point or -1 if not applicable
 
void move_by (const Vector &shift)
 Moves all nodes by given shift. More...
 
void edit_path ()
 Puts node markers to the nodes to edit them. More...
 
bool is_valid () const
 Returns false when has no nodes.
 
const std::vector< Node > & get_nodes () const
 
PathGameObjectget_gameobject () const
 
void on_flip (float height)
 

Public Attributes

std::vector< Nodem_nodes
 
WalkMode m_mode
 
bool m_adapt_speed
 Whether or not to adapt the speed to bezier curves, cancelling the code that forces traveling bezier curves at constant speed.
 

Member Function Documentation

◆ edit_path()

void Path::edit_path ( )

Puts node markers to the nodes to edit them.

◆ move_by()

void Path::move_by ( const Vector &  shift)

Moves all nodes by given shift.


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