SuperTuxKart
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
ArenaNode Class Reference
Inheritance diagram for ArenaNode:
Inheritance graph
[legend]

Public Member Functions

 ArenaNode (const Vec3 &p0, const Vec3 &p1, const Vec3 &p2, const Vec3 &p3, const Vec3 &normal, unsigned int node_index)
 
const std::vector< int > & getAdjacentNodes ()
 
std::vector< int > * getNearbyNodes ()
 
void setAdjacentNodes (const std::vector< int > &nodes)
 
void setNearbyNodes (const std::vector< int > &nodes)
 
bool isNearEdge () const
 Returns true if the quad lies near the edge, which means it doesn't have 4 adjacent quads.
 
virtual float getDistance2FromPoint (const Vec3 &xyz) const OVERRIDE
 Returns the square of the distance between the given point and any point on the 'centre' line, i.e.
 
- Public Member Functions inherited from Quad
 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 Vec3operator[] (int i) const
 Returns the i-th.
 
const Vec3getCenter () 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 Vec3getNormal () 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
 

Private Attributes

core::line3df m_line
 
std::vector< int > m_adjacent_nodes
 
std::vector< int > m_nearby_nodes
 

Additional Inherited Members

- Protected Attributes inherited from Quad
Vec3 m_p [4]
 The four points of a quad.
 
Vec3 m_center
 The center of all four points, which is used by the AI.
 
int m_index
 Index of this quad, used only with graph.
 
Vec3 m_normal
 Normal of the quad.
 

Member Function Documentation

◆ getDistance2FromPoint()

float ArenaNode::getDistance2FromPoint ( const Vec3 xyz) const
virtual

Returns the square of the distance between the given point and any point on the 'centre' line, i.e.

the finite line from the middle point of the lower end of the node to the middle point of the upper end of the node which belongs to this node.

Parameters
xyzThe point for which the distance to the line is computed.

Reimplemented from Quad.


The documentation for this class was generated from the following files: