#include <TrackAttachment.h>
Inheritance diagram for Track::TrackAttachment:
Public Member Functions | |
TrackAttachment (std::istream &source) | |
TrackAttachment () | |
virtual | ~TrackAttachment () |
btScalar | get_t_position () const |
void | set_t_position (btScalar value) |
Set the position along the edge's curve from 0 to 1. | |
btScalar | get_lateral_position () const |
void | set_lateral_position (btScalar value) |
Set the position along the track perpendicular to the edge's direction. | |
btScalar | get_vertical_position () const |
void | set_vertical_position (btScalar value) |
Set the position in the direction of the track's normal. | |
virtual void | add_data (std::ostream &stream) const |
Write the data needed to reconstruct the object to a stream. | |
virtual std::string | get_class_identifier () const |
Return the string used to identify the class. | |
virtual void | draw () const |
Draw the attachment. | |
void | set_global_transform (btTransform pos) |
Set the transformation from world space to the attachment's space. | |
const btTransform & | get_global_transform () const |
Get the transformation from world space to the attachment's space. | |
Public Attributes | |
std::size_t | edge_name |
Protected Attributes | |
btTransform | m_global_transform |
The transformation from world space to the attachment's space. | |
btScalar | m_t_position |
How far down the path the object is. | |
btScalar | m_lateral_position |
Offset from the centre across the track in spacial units. | |
btScalar | m_vertical_position |
Offset from the centre perpendicular to the track in spacial units. |
It is fixed onto an edge or vertex in the track editor. When the edge or vertex is moved, it remains fixed to the same point in the track. It attaches to the surface of the AI navigation mesh.
Definition at line 29 of file TrackAttachment.h.
Track::TrackAttachment::TrackAttachment | ( | std::istream & | source | ) |
Definition at line 25 of file TrackAttachment.cpp.
Track::TrackAttachment::TrackAttachment | ( | ) |
Definition at line 49 of file TrackAttachment.cpp.
Track::TrackAttachment::~TrackAttachment | ( | ) | [virtual] |
Definition at line 56 of file TrackAttachment.cpp.
void Track::TrackAttachment::add_data | ( | std::ostream & | stream | ) | const [virtual] |
Write the data needed to reconstruct the object to a stream.
Reimplemented in Track::StartingPosition, and Track::TrackBooster.
Definition at line 90 of file TrackAttachment.cpp.
void Track::TrackAttachment::draw | ( | ) | const [virtual] |
Draw the attachment.
The modelview matrix should be set so that the position using the above and the associated edge is the origin of the modelview matrix.
Reimplemented in Track::StartingPosition, and Track::TrackBooster.
Definition at line 98 of file TrackAttachment.cpp.
std::string Track::TrackAttachment::get_class_identifier | ( | ) | const [virtual] |
Return the string used to identify the class.
This is the same string as the associated ClassLoaderBase uses. The return value should be the same for each instance of the class.
Implements Track::Savable.
Reimplemented in Track::StartingPosition, and Track::TrackBooster.
Definition at line 18 of file TrackAttachment.cpp.
const btTransform & Track::TrackAttachment::get_global_transform | ( | ) | const |
Get the transformation from world space to the attachment's space.
Definition at line 107 of file TrackAttachment.cpp.
btScalar Track::TrackAttachment::get_lateral_position | ( | ) | const |
Definition at line 70 of file TrackAttachment.cpp.
btScalar Track::TrackAttachment::get_t_position | ( | ) | const |
Definition at line 60 of file TrackAttachment.cpp.
btScalar Track::TrackAttachment::get_vertical_position | ( | ) | const |
Definition at line 80 of file TrackAttachment.cpp.
void Track::TrackAttachment::set_global_transform | ( | btTransform | pos | ) |
Set the transformation from world space to the attachment's space.
This will be used to draw the attachment and locate its handles in the editor.
pos | the new global transformation. |
Definition at line 102 of file TrackAttachment.cpp.
void Track::TrackAttachment::set_lateral_position | ( | btScalar | value | ) |
Set the position along the track perpendicular to the edge's direction.
Definition at line 75 of file TrackAttachment.cpp.
void Track::TrackAttachment::set_t_position | ( | btScalar | value | ) |
Set the position along the edge's curve from 0 to 1.
Definition at line 65 of file TrackAttachment.cpp.
void Track::TrackAttachment::set_vertical_position | ( | btScalar | value | ) |
Set the position in the direction of the track's normal.
This is for the z direction in car space.
Definition at line 85 of file TrackAttachment.cpp.
std::size_t Track::TrackAttachment::edge_name |
Definition at line 58 of file TrackAttachment.h.
btTransform Track::TrackAttachment::m_global_transform [protected] |
The transformation from world space to the attachment's space.
Definition at line 74 of file TrackAttachment.h.
btScalar Track::TrackAttachment::m_lateral_position [protected] |
Offset from the centre across the track in spacial units.
Positive is to the right in normal direction of travel. 0 is on the curve itself.
Definition at line 83 of file TrackAttachment.h.
btScalar Track::TrackAttachment::m_t_position [protected] |
How far down the path the object is.
Parameter to path's curve, between 0 and 1.
Definition at line 78 of file TrackAttachment.h.
btScalar Track::TrackAttachment::m_vertical_position [protected] |
Offset from the centre perpendicular to the track in spacial units.
Positive is above the track in the normal direction travel. 0 is on the curve itself.
Definition at line 88 of file TrackAttachment.h.
Generated at Mon Sep 6 00:41:19 2010 by Doxygen version 1.4.7 for Racer version svn335.