Renamed GraphNode::getIndex to getQuadIndex.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11487 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk
2012-08-08 06:57:55 +00:00
parent bb0219fa42
commit b972a2b2a3
4 changed files with 5 additions and 6 deletions

View File

@@ -151,8 +151,7 @@ public:
int getPredecessor(unsigned int i) const {return m_predecessor_nodes[i]; }
// ------------------------------------------------------------------------
/** Returns the quad_index in the quad_set of this node. */
int getIndex() const { return m_quad_index; }
int getQuadIndex() const { return m_quad_index; }
// ------------------------------------------------------------------------
/** Returns the quad of this graph node. */
const Quad& getQuad() const {return QuadSet::get()->getQuad(m_quad_index);}

View File

@@ -605,7 +605,7 @@ void QuadGraph::computeDistanceFromStart(unsigned int node, float new_distance)
if(current_distance<new_distance)
{
float delta = new_distance - current_distance;
updateDistancesForAllSuccessors(gn->getIndex(), delta);
updateDistancesForAllSuccessors(gn->getQuadIndex(), delta);
}
return;
}
@@ -622,7 +622,7 @@ void QuadGraph::computeDistanceFromStart(unsigned int node, float new_distance)
if(gn_next->getDistanceFromStart()==0)
continue;
computeDistanceFromStart(gn_next->getIndex(),
computeDistanceFromStart(gn_next->getQuadIndex(),
new_distance + gn->getDistanceToSuccessor(i));
} // for i
} // computeDistanceFromStart

View File

@@ -174,7 +174,7 @@ public:
// ----------------------------------------------------------------------
/** Returns the quad that belongs to a graph node. */
const Quad& getQuadOfNode(unsigned int j) const
{ return QuadSet::get()->getQuad(m_all_nodes[j]->getIndex()); }
{ return QuadSet::get()->getQuad(m_all_nodes[j]->getQuadIndex()); }
// ----------------------------------------------------------------------
/** Returns the quad that belongs to a graph node. */
GraphNode& getNode(unsigned int j) const{ return *m_all_nodes[j]; }

View File

@@ -74,7 +74,7 @@ void QuadSet::getPoint(const XMLNode *xml, const std::string &attribute_name,
} // getPoint
// -----------------------------------------------------------------------------
/** Loads the set of all quads from the speciified filename.
/** Loads the set of all quads from the specified filename.
* \param filename The absolute filename to load the quad file from.
*/
void QuadSet::init(const std::string &filename)