00001 00005 /* Copyright © 2009, 2010 James Legg. 00006 This program is free software: you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation, either version 3 of the License, or 00009 (at your option) any later version. 00010 */ 00011 #ifndef LIBTRACK_SEGMENT_H_ 00012 #define LIBTRACK_SEGMENT_H_ 00013 00014 #include <istream> 00015 #include <string> 00016 #include <vector> 00017 00018 #include <boost/shared_ptr.hpp> 00019 00020 #include <LinearMath/btScalar.h> 00021 00022 #include "TrackMesh.h" 00023 #include "Mesh/DrawableMesh.h" 00024 #include "Texture.h" 00025 #include "SegmentConnection.h" 00026 00027 namespace Track 00028 { 00029 00038 class Segment 00039 { 00040 public: 00041 Segment(std::istream & source); 00042 virtual ~Segment(); 00043 00048 const std::string & get_name() const; 00049 00052 std::size_t get_number_of_connections() const; 00053 00064 const SegmentConnection & get_connection(std::size_t index) const; 00065 00072 const SegmentConnection & get_connection(std::size_t index, 00073 PieceDistortion piece_distortion) const; 00074 00077 const TrackMesh<DrawableMesh> & get_graphics_mesh() const; 00078 00081 const TrackMesh<> & get_ai_mesh() const; 00082 00086 const TrackMesh<> & get_floor_mesh() const; 00087 00092 const TrackMesh<> & get_wall_mesh() const; 00093 00095 btScalar get_length() const; 00096 00098 btScalar get_minimum_y() const; 00099 00101 const Texture & get_texture() const; 00102 00104 bool edges_allowed() const; 00105 protected: 00106 Texture texture; 00107 TrackMesh<DrawableMesh> graphics_mesh; 00108 TrackMesh<> ai_floor_mesh; 00109 TrackMesh<> physics_wall_mesh; 00110 TrackMesh<> physics_floor_mesh; 00111 00113 std::string name; 00114 00116 std::vector<boost::shared_ptr<SegmentConnection> > connections; 00117 00119 bool m_edges_allowed; 00120 }; 00121 00122 } 00123 00124 #endif /*LIBTRACK_SEGMENT_H_*/
Generated at Mon Sep 6 00:41:12 2010 by Doxygen version 1.4.7 for Racer version svn335.