#include <Segment.h>
Public Member Functions | |
Segment (std::istream &source) | |
virtual | ~Segment () |
const std::string & | get_name () const |
Get the human-readable name. | |
std::size_t | get_number_of_connections () const |
Get the number of joins that are used to connect these segments to others. | |
const SegmentConnection & | get_connection (std::size_t index) const |
Get segment connection information. | |
const SegmentConnection & | get_connection (std::size_t index, PieceDistortion piece_distortion) const |
Get where the connection would be if the face was distoreted. | |
const TrackMesh< DrawableMesh > & | get_graphics_mesh () const |
Get the TrackMesh used for the graphics. | |
const TrackMesh & | get_ai_mesh () const |
Get the TrackMesh used for the ai's floor navigation. | |
const TrackMesh & | get_floor_mesh () const |
Get the TrackMesh used for the floor's physics. | |
const TrackMesh & | get_wall_mesh () const |
Get the TrackMesh used for the wall's physics. | |
btScalar | get_length () const |
Get the length of the segment's physics floor mesh in the y direction. | |
btScalar | get_minimum_y () const |
Get the lowest y position of the vertices in the physics floor mesh. | |
const Texture & | get_texture () const |
Get the texture to bind before drawing the graphics_mesh. | |
bool | edges_allowed () const |
Return true if the mesh could be used along an edge. | |
Protected Attributes | |
Texture | texture |
TrackMesh< DrawableMesh > | graphics_mesh |
TrackMesh | ai_floor_mesh |
TrackMesh | physics_wall_mesh |
TrackMesh | physics_floor_mesh |
std::string | name |
The human-readable name. Taken from blender scene the segment came from. | |
std::vector< boost::shared_ptr< SegmentConnection > > | connections |
(undistorted) cross section connections information | |
bool | m_edges_allowed |
True if good for edges, false otherwise. |
A Segment knows how it can be connected with other segments to form the track. The mesh is cut off into 'tiles' with any number of planar ends to be connected to matching planar ends.
Definition at line 38 of file Segment.h.
Track::Segment::Segment | ( | std::istream & | source | ) |
Definition at line 17 of file Segment.cpp.
Track::Segment::~Segment | ( | ) | [virtual] |
Definition at line 53 of file Segment.cpp.
bool Track::Segment::edges_allowed | ( | ) | const |
const TrackMesh & Track::Segment::get_ai_mesh | ( | ) | const |
const SegmentConnection& Track::Segment::get_connection | ( | std::size_t | index, | |
PieceDistortion | piece_distortion | |||
) | const |
Get where the connection would be if the face was distoreted.
Similar to get_connection.
piece_distortion | The distortion to apply to the connection information. | |
index | The 0-based index of the connection to return the information for. |
const SegmentConnection & Track::Segment::get_connection | ( | std::size_t | index | ) | const |
Get segment connection information.
A segment defines cross sections at the entry and exit points that must be connected to something with a matching cross section to form a valid track layout. This function returns the information one cross section per call.
index | The index from 0 to one less than the number returned by get_number_of_connections() of the connectivity information to store. |
Definition at line 67 of file Segment.cpp.
const TrackMesh & Track::Segment::get_floor_mesh | ( | ) | const |
Get the TrackMesh used for the floor's physics.
This is the part you can drive on as seen by the physics engine.
Definition at line 82 of file Segment.cpp.
const TrackMesh< DrawableMesh > & Track::Segment::get_graphics_mesh | ( | ) | const |
btScalar Track::Segment::get_length | ( | ) | const |
Get the length of the segment's physics floor mesh in the y direction.
Definition at line 92 of file Segment.cpp.
btScalar Track::Segment::get_minimum_y | ( | ) | const |
Get the lowest y position of the vertices in the physics floor mesh.
Definition at line 97 of file Segment.cpp.
const std::string & Track::Segment::get_name | ( | ) | const |
Get the human-readable name.
This name is taken from the object names in Blender when the theme is exported, and displayed to the users of racer_editor.
Definition at line 57 of file Segment.cpp.
std::size_t Track::Segment::get_number_of_connections | ( | ) | const |
Get the number of joins that are used to connect these segments to others.
Definition at line 62 of file Segment.cpp.
const Texture & Track::Segment::get_texture | ( | ) | const |
Get the texture to bind before drawing the graphics_mesh.
Definition at line 103 of file Segment.cpp.
const TrackMesh & Track::Segment::get_wall_mesh | ( | ) | const |
Get the TrackMesh used for the wall's physics.
This is the part you can collide with, but not drive on, as seen by the physics engine.
Definition at line 87 of file Segment.cpp.
TrackMesh Track::Segment::ai_floor_mesh [protected] |
std::vector<boost::shared_ptr<SegmentConnection> > Track::Segment::connections [protected] |
TrackMesh<DrawableMesh> Track::Segment::graphics_mesh [protected] |
bool Track::Segment::m_edges_allowed [protected] |
std::string Track::Segment::name [protected] |
TrackMesh Track::Segment::physics_floor_mesh [protected] |
TrackMesh Track::Segment::physics_wall_mesh [protected] |
Texture Track::Segment::texture [protected] |
Generated at Mon Sep 6 00:41:18 2010 by Doxygen version 1.4.7 for Racer version svn335.