|
| DriveNode (const Vec3 &p0, const Vec3 &p1, const Vec3 &p2, const Vec3 &p3, const Vec3 &normal, unsigned int node_index, bool invisible, bool ai_ignore, bool ignored) |
|
void | addSuccessor (unsigned int to) |
| Adds a successor to a node.
|
|
void | setupPathsToNode () |
| If this node has more than one successor, it will set up a vector that contains the direction to use when a certain drive node X should be reached.
|
|
void | setChecklineRequirements (int latest_checkline) |
|
void | setDirectionData (unsigned int successor, DirectionType dir, unsigned int last_node_index) |
|
unsigned int | getNumberOfSuccessors () const |
| Returns the number of successors.
|
|
unsigned int | getSuccessor (unsigned int i) const |
| Returns the i-th successor node.
|
|
unsigned int | getNumberOfPredecessors () const |
| Returns the number of predecessors.
|
|
int | getPredecessor (unsigned int i) const |
| Returns a predecessor for this node.
|
|
float | getDistanceToSuccessor (unsigned int j) const |
| Returns the distance to the j-th.
|
|
float | getAngleToSuccessor (unsigned int j) const |
| Returns the angle from this node to the j-th.
|
|
float | getDistanceFromStart () const |
| Returns the distance from start.
|
|
void | setDistanceFromStart (float d) |
| Sets the distance from start for this node.
|
|
float | getPathWidth () const |
| Returns the width of the part for this quad.
|
|
const Vec3 & | getLowerCenter () const |
| Returns the center point of the lower edge of this drive node.
|
|
const Vec3 & | getUpperCenter () const |
| Returns the center point of the upper edge of this drive node.
|
|
float | getNodeLength () const |
| Returns the length of the quad of this node.
|
|
bool | ignoreSuccessorForAI (unsigned int i) const |
| Returns true if the index-successor of this node is one that the AI is allowed to use.
|
|
int | getSuccessorToReach (unsigned int n) |
| Returns which successor node to use in order to be able to reach the given node n.
|
|
const std::vector< int > & | getChecklineRequirements () const |
| Returns the checkline requirements of this drive node.
|
|
void | getDirectionData (unsigned int succ, DirectionType *dir, unsigned int *last) const |
| Returns the direction in which the successor n is.
|
|
const Vec3 & | getRightUnitVector () const |
| Returns a unit vector pointing to the right side of the quad.
|
|
bool | letAIIgnore () const |
| True if this node should be ignored by the AI.
|
|
virtual void | getDistances (const Vec3 &xyz, Vec3 *result) const =0 |
|
| Quad (const Vec3 &p0, const Vec3 &p1, const Vec3 &p2, const Vec3 &p3, const Vec3 &normal=Vec3(0, 1, 0), int index=-1, bool invisible=false, bool ignored=false) |
| Constructor, takes 4 points.
|
|
void | getVertices (video::S3DVertex *v, const video::SColor &color) const |
| Sets the vertices in a irrlicht vertex array to the 4 points of this quad.
|
|
void | getSPMVertices (video::S3DVertexSkinnedMesh *v, const video::SColor &color) const |
| Sets the vertices in an spm vertex array to the 4 points of this quad.
|
|
const Vec3 & | operator[] (int i) const |
| Returns the i-th.
|
|
const Vec3 & | getCenter () const |
| Returns the center of a quad.
|
|
void | setQuad (const Vec3 &p0, const Vec3 &p1, const Vec3 &p2, const Vec3 &p3) |
| Set new quad coordinates.
|
|
void | setHeightTesting (float min, float max) |
|
float | getMinHeight () const |
| Returns the minimum height of a quad.
|
|
int | getIndex () const |
| Returns the index of this quad.
|
|
bool | isInvisible () const |
| Returns true of this quad is invisible, i.e.
|
|
bool | isIgnored () const |
|
const Vec3 & | getNormal () const |
| Returns the normal of this quad.
|
|
virtual bool | pointInside (const Vec3 &p, bool ignore_vertical=false) const |
| Returns true if a point is inside this quad.
|
|
virtual bool | is3DQuad () const |
| Returns true if this quad is 3D, which additional 3D testing is used in pointInside.
|
|
virtual float | getDistance2FromPoint (const Vec3 &xyz) const |
|
|
bool | m_ai_ignore |
| Set to true if this drive node should not be used by the AI.
|
|
std::vector< int > | m_successor_nodes |
| The list of successor drive nodes.
|
|
std::vector< int > | m_predecessor_nodes |
| The list of predecessors of a node.
|
|
std::vector< float > | m_distance_to_next |
| The distance to each of the successors.
|
|
std::vector< float > | m_angle_to_next |
| The angle of the line from this node to each neighbour.
|
|
float | m_width |
| Width of the track, which is the average of the width at the beginning and at the end.
|
|
Vec3 | m_center_to_right |
| A vector from the center of the quad to the right edge.
|
|
PathToNodeVector | m_path_to_node |
| This vector is only used if the drive node has more than one successor.
|
|
std::vector< DirectionType > | m_direction |
| The direction for each of the successors.
|
|
std::vector< unsigned int > | m_last_index_same_direction |
| Stores for each successor the index of the last drive node that has the same direction (i.e.
|
|
Vec3 | m_right_unit_vector |
| A unit vector pointing from the center to the right side, orthogonal to the driving direction.
|
|
std::vector< int > | m_checkline_requirements |
| Sets of checklines you should have activated when you are driving on this node (there is a possibility of more than one set because of alternate ways)
|
|
This class stores a node of the drive graph, i.e.
a list of successor edges, it can either be 2d or 3d.