#include <PathVertex.h>
Inheritance diagram for Track::PathVertex:
Public Member Functions | |
PathVertex () | |
Failing constuctor. | |
PathVertex (const Track *track) | |
PathVertex (std::istream &source, const Theme &theme, const Track *track) | |
virtual | ~PathVertex () |
const btVector3 & | get_position () const |
Get the position of the centre of the vertex. | |
btVector3 | get_position (std::size_t index) const |
Get a SegmentConnection's position on this vertex. | |
void | set_position (const btVector3 &position) |
const btVector3 & | get_gradient () const |
Get the tangent of the arcs where they meet the vertex. | |
btVector3 | get_gradient (std::size_t index) const |
Get the tangent of the arcs where they meet a SegmentConnection. | |
const btVector3 & | get_up () const |
Get the up vector of the track at the vertex. | |
btVector3 | get_up (std::size_t index) const |
Get the up vector of the track at a SegmentConnection. | |
void | set_angle (btQuaternion angle) |
Set the angle used to determine the gradient and up vector. | |
const btQuaternion & | get_angle () const |
Get the angle used to determine the gradient and up vector of the vertex itself. | |
btQuaternion | get_angle (std::size_t index) const |
Get the angle used to determine the gradient and up vector at a SegmentConnection. | |
std::size_t | get_segment_index () const |
void | set_segment (std::size_t new_segment_index, const Segment *new_segment) |
const Segment * | get_segment () const |
virtual bool | is_here (btVector3 start, btVector3 stop, btScalar radius) const |
Check if the object lies along a given line segment. | |
virtual boost::shared_ptr< Document::DocumentDelta > | make_delta (btVector3 new_position) const |
Create a document delta moving the vertex to a new position. | |
const EditAssist::ControlPoint * | get_control_point_here (btVector3 start, btVector3 stop, btScalar radius) const |
Return any vertex handles near a line segment. | |
void | draw_control_points () const |
Draw all ControlPoint objects adjusting this vertex. | |
void | set_handle_lengths (btScalar handle_length) |
Set the lengths of the rotation handles. | |
const std::vector< boost::shared_ptr< EditAssist::SegmentConnectionHandle > > & | get_connection_handles () const |
void | set_track (const Track *track) |
void | add_collision_faces (btTriangleMesh &shape) const |
Add the collision faces of the PathVertex into a shape. | |
void | add_floor_faces (btTriangleMesh &shape) const |
Add the drivable surface of the PathVertex into a shape. | |
void | add_ai_faces (MeshFaces &mesh) const |
Add the surface the AI considers driving on to a mesh. | |
virtual AxisAlignedBoundingBox | get_bounds () const |
Get the Axis aligned bounding box of the object. | |
virtual void | draw () const |
Draw the object. | |
Protected Member Functions | |
void | calculate_bounds () |
Set the correct value for m_bounds and m_transform and update the navigation graph. | |
void | update_handles () |
Update the properties of the vertices control points. | |
Protected Attributes | |
unsigned int | file_version |
btVector3 | position |
The position of the vertex. | |
const Segment * | segment |
The segment to use at the vertex. | |
std::size_t | segment_index |
The index of the segment in the Theme. | |
btVector3 | gradient |
The normalised forward direction from this vertex. | |
btVector3 | up |
The normalised up direction from this vertex. | |
btQuaternion | angle |
The rotation from gradient (0, 1, 0) and up (0, 0, 1). | |
std::vector< btQuaternion > | connection_angles |
Rotation of each of the connections. | |
EditAssist::VertexRotationHandle | up_handle |
control point used to change the up direction in the editor. | |
EditAssist::VertexRotationHandle | forward_handle |
control point used to change the forward direction in the editor. | |
std::vector< boost::shared_ptr< EditAssist::SegmentConnectionHandle > > | connection_handles |
const Track * | track |
AxisAlignedBoundingBox | m_bounds |
The bounds of the segment's transformed graphics mesh. | |
btTransform | m_transform |
The transformation of the segment to world space. | |
MeshFaces | m_nav_mesh |
The navigation mesh. | |
MeshFaces::Graph | m_navigation_graph |
Friends | |
std::ostream & | operator<< (std::ostream &destination, const PathVertex &path_vertex) |
AxisAlignedBoundingBox & | operator|= (AxisAlignedBoundingBox &box, const PathVertex &path_vertex) |
Expand an AxisAlignedBoundingBox almost minimally to contain a PathVertex. |
Definition at line 39 of file PathVertex.h.
Track::PathVertex::PathVertex | ( | ) |
Failing constuctor.
This is added for compatibility with boost's graph library. It should never be called, since we only create graph edges where the vertices already exist.
Definition at line 23 of file PathVertex.cpp.
Track::PathVertex::PathVertex | ( | const Track * | track | ) |
Definition at line 33 of file PathVertex.cpp.
Definition at line 47 of file PathVertex.cpp.
Track::PathVertex::~PathVertex | ( | ) | [virtual] |
Definition at line 64 of file PathVertex.cpp.
void Track::PathVertex::add_ai_faces | ( | MeshFaces & | mesh | ) | const |
Add the surface the AI considers driving on to a mesh.
Definition at line 285 of file PathVertex.cpp.
void Track::PathVertex::add_collision_faces | ( | btTriangleMesh & | shape | ) | const |
Add the collision faces of the PathVertex into a shape.
Definition at line 272 of file PathVertex.cpp.
void Track::PathVertex::add_floor_faces | ( | btTriangleMesh & | shape | ) | const |
Add the drivable surface of the PathVertex into a shape.
Definition at line 279 of file PathVertex.cpp.
void Track::PathVertex::calculate_bounds | ( | ) | [protected] |
Set the correct value for m_bounds and m_transform and update the navigation graph.
Definition at line 298 of file PathVertex.cpp.
void Track::PathVertex::draw | ( | ) | const [virtual] |
Draw the object.
Called indirectly by draw(const OcclusionTester &) const when it is on the screen, but can also be called manually if view bounds are not known.
Implements Track::Drawable.
Definition at line 310 of file PathVertex.cpp.
void Track::PathVertex::draw_control_points | ( | ) | const |
Draw all ControlPoint objects adjusting this vertex.
Definition at line 241 of file PathVertex.cpp.
btQuaternion Track::PathVertex::get_angle | ( | std::size_t | index | ) | const |
Get the angle used to determine the gradient and up vector at a SegmentConnection.
index | The index the Segment uses for the SegmentConnection. |
Definition at line 148 of file PathVertex.cpp.
const btQuaternion & Track::PathVertex::get_angle | ( | ) | const |
Get the angle used to determine the gradient and up vector of the vertex itself.
Definition at line 143 of file PathVertex.cpp.
AxisAlignedBoundingBox Track::PathVertex::get_bounds | ( | ) | const [virtual] |
Get the Axis aligned bounding box of the object.
The object is contained entierly within this region.
Implements Track::AABBBounded.
Definition at line 293 of file PathVertex.cpp.
const std::vector< boost::shared_ptr< EditAssist::SegmentConnectionHandle > > & Track::PathVertex::get_connection_handles | ( | ) | const |
Definition at line 262 of file PathVertex.cpp.
const EditAssist::ControlPoint * Track::PathVertex::get_control_point_here | ( | btVector3 | start, | |
btVector3 | stop, | |||
btScalar | radius | |||
) | const |
Return any vertex handles near a line segment.
start | The starting point of the line segment to scan. | |
stop | The end point of the the line segment to scan | |
radius | The radius around the line to consider. |
Definition at line 217 of file PathVertex.cpp.
btVector3 Track::PathVertex::get_gradient | ( | std::size_t | index | ) | const |
Get the tangent of the arcs where they meet a SegmentConnection.
It is unit length.
index | The index the Segment uses for the SegmentConnection. |
Definition at line 115 of file PathVertex.cpp.
const btVector3 & Track::PathVertex::get_gradient | ( | ) | const |
Get the tangent of the arcs where they meet the vertex.
It is unit length.
Definition at line 110 of file PathVertex.cpp.
btVector3 Track::PathVertex::get_position | ( | std::size_t | index | ) | const |
Get a SegmentConnection's position on this vertex.
index | The index of the SegmentConnection in the Segment to look up. |
Definition at line 74 of file PathVertex.cpp.
const btVector3 & Track::PathVertex::get_position | ( | ) | const |
const Segment * Track::PathVertex::get_segment | ( | ) | const |
Definition at line 180 of file PathVertex.cpp.
std::size_t Track::PathVertex::get_segment_index | ( | ) | const |
Definition at line 153 of file PathVertex.cpp.
btVector3 Track::PathVertex::get_up | ( | std::size_t | index | ) | const |
Get the up vector of the track at a SegmentConnection.
It is perpendicular to gradient, and unit length.
index | The index the Segment uses for the SegmentConnection. |
Definition at line 126 of file PathVertex.cpp.
const btVector3 & Track::PathVertex::get_up | ( | ) | const |
Get the up vector of the track at the vertex.
It is perpendicular to gradient, and unit length.
Definition at line 121 of file PathVertex.cpp.
bool Track::PathVertex::is_here | ( | btVector3 | start, | |
btVector3 | stop, | |||
btScalar | radius | |||
) | const [virtual] |
Check if the object lies along a given line segment.
start | The start position of the line in world space. | |
stop | The end position of the line in world space | |
radius | to consider points near the line |
Implements Track::EditAssist::Selectable.
Definition at line 185 of file PathVertex.cpp.
boost::shared_ptr< Document::DocumentDelta > Track::PathVertex::make_delta | ( | btVector3 | new_position | ) | const [virtual] |
Create a document delta moving the vertex to a new position.
new_position | The location the vertex should ocupy when the produced delta is applied. |
Implements Track::EditAssist::Dragable.
Definition at line 205 of file PathVertex.cpp.
void Track::PathVertex::set_angle | ( | btQuaternion | angle | ) |
Set the angle used to determine the gradient and up vector.
The gradient is wherever the rotation takes y axis, and the up vector is wherever the rotation takes the z axis.
Definition at line 132 of file PathVertex.cpp.
void Track::PathVertex::set_handle_lengths | ( | btScalar | handle_length | ) |
void Track::PathVertex::set_position | ( | const btVector3 & | position | ) |
Definition at line 79 of file PathVertex.cpp.
void Track::PathVertex::set_segment | ( | std::size_t | new_segment_index, | |
const Segment * | new_segment | |||
) |
Definition at line 158 of file PathVertex.cpp.
void Track::PathVertex::set_track | ( | const Track * | track | ) |
Definition at line 267 of file PathVertex.cpp.
void Track::PathVertex::update_handles | ( | ) | [protected] |
std::ostream& operator<< | ( | std::ostream & | destination, | |
const PathVertex & | path_vertex | |||
) | [friend] |
Definition at line 323 of file PathVertex.cpp.
AxisAlignedBoundingBox& operator|= | ( | AxisAlignedBoundingBox & | box, | |
const PathVertex & | path_vertex | |||
) | [friend] |
Expand an AxisAlignedBoundingBox almost minimally to contain a PathVertex.
Definition at line 333 of file PathVertex.cpp.
btQuaternion Track::PathVertex::angle [protected] |
std::vector<btQuaternion> Track::PathVertex::connection_angles [protected] |
std::vector<boost::shared_ptr<EditAssist::SegmentConnectionHandle> > Track::PathVertex::connection_handles [protected] |
Definition at line 184 of file PathVertex.h.
unsigned int Track::PathVertex::file_version [protected] |
Definition at line 161 of file PathVertex.h.
control point used to change the forward direction in the editor.
Definition at line 182 of file PathVertex.h.
btVector3 Track::PathVertex::gradient [protected] |
AxisAlignedBoundingBox Track::PathVertex::m_bounds [protected] |
MeshFaces Track::PathVertex::m_nav_mesh [protected] |
Definition at line 195 of file PathVertex.h.
btTransform Track::PathVertex::m_transform [protected] |
btVector3 Track::PathVertex::position [protected] |
const Segment* Track::PathVertex::segment [protected] |
std::size_t Track::PathVertex::segment_index [protected] |
const Track* Track::PathVertex::track [protected] |
Definition at line 186 of file PathVertex.h.
btVector3 Track::PathVertex::up [protected] |
control point used to change the up direction in the editor.
Definition at line 180 of file PathVertex.h.
Generated at Mon Sep 6 00:41:18 2010 by Doxygen version 1.4.7 for Racer version svn335.