Made the boundary box private to Graph.
This commit is contained in:
@@ -122,9 +122,7 @@ void DriveGraph::load(const std::string &quad_file_name,
|
||||
bool ai_ignore=false;
|
||||
xml_node->get("ai-ignore", &ai_ignore);
|
||||
createQuad(p0, p1, p2, p3, m_all_nodes.size(), invisible, ai_ignore,
|
||||
false/*is_arena*/);
|
||||
m_bb_max.max(p0);m_bb_max.max(p1);m_bb_max.max(p2);m_bb_max.max(p3);
|
||||
m_bb_min.min(p0);m_bb_min.min(p1);m_bb_min.min(p2);m_bb_min.min(p3);
|
||||
false/*is_arena*/);
|
||||
}
|
||||
delete quad;
|
||||
|
||||
|
||||
@@ -446,6 +446,9 @@ void Graph::createQuad(const Vec3 &p0, const Vec3 &p1, const Vec3 &p2,
|
||||
}
|
||||
m_all_nodes.push_back(q);
|
||||
|
||||
m_bb_max.max(p0); m_bb_max.max(p1); m_bb_max.max(p2); m_bb_max.max(p3);
|
||||
m_bb_min.min(p0); m_bb_min.min(p1); m_bb_min.min(p2); m_bb_min.min(p3);
|
||||
|
||||
} // createQuad
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -51,16 +51,16 @@ class RTT;
|
||||
*/
|
||||
class Graph : public NoCopy
|
||||
{
|
||||
private:
|
||||
/** The 2d bounding box, used for hashing. */
|
||||
Vec3 m_bb_min;
|
||||
Vec3 m_bb_max;
|
||||
|
||||
protected:
|
||||
static Graph* m_graph;
|
||||
|
||||
std::vector<Quad*> m_all_nodes;
|
||||
|
||||
/** The 2d bounding box, used for hashing. */
|
||||
Vec3 m_bb_min;
|
||||
|
||||
Vec3 m_bb_max;
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
/** Factory method to dynamic create 2d / 3d quad for drive and arena
|
||||
* graph. */
|
||||
|
||||
Reference in New Issue
Block a user