Fixed incorrect culling of debug track, some minor code cleanup.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3549 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
21c5795deb
commit
6b1974c459
@ -197,8 +197,12 @@ void QuadGraph::createDebugMesh()
|
||||
} // for i=1; i<m_all_quads
|
||||
|
||||
m_mesh_buffer->append(new_v, (n-1)*4, ind, (n-1)*6);
|
||||
// Instead of setting the bounding boxes, we could just disable culling,
|
||||
// since the debug track should always be drawn.
|
||||
//m_node->setAutomaticCulling(scene::EAC_OFF);
|
||||
m_mesh_buffer->recalculateBoundingBox();
|
||||
m_mesh->setBoundingBox(m_mesh_buffer->getBoundingBox());
|
||||
m_node = irr_driver->addMesh(m_mesh);
|
||||
|
||||
} // createDebugMesh
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -596,8 +596,6 @@ void Track::loadDriveline()
|
||||
m_driveline_min = Vec3( 9999999.9f);
|
||||
m_driveline_max = Vec3(-9999999.9f);
|
||||
|
||||
|
||||
m_distance_from_start.reserve(DRIVELINE_SIZE);
|
||||
float d = 0.0f ;
|
||||
for ( size_t i = 0 ; i < DRIVELINE_SIZE ; ++i )
|
||||
{
|
||||
@ -609,7 +607,6 @@ void Track::loadDriveline()
|
||||
m_driveline_max.max(m_right_driveline[i]);
|
||||
m_driveline_max.max(m_left_driveline[i] );
|
||||
|
||||
m_distance_from_start.push_back(d); // dfs[i] is not valid in windows here!
|
||||
d += (m_driveline[i]-m_driveline[ i==DRIVELINE_SIZE-1 ? 0 : i+1 ]).length();
|
||||
}
|
||||
m_total_distance = d;
|
||||
|
@ -127,8 +127,6 @@ public:
|
||||
//FIXME: should the driveline be set as a sgVec2?
|
||||
private:
|
||||
std::vector<Vec3> m_driveline;
|
||||
std::vector<float> m_distance_from_start;
|
||||
std::vector<float> m_path_width;
|
||||
//Left and Right drivelines for overhead map rendering.
|
||||
std::vector<Vec3> m_left_driveline;
|
||||
std::vector<Vec3> m_right_driveline;
|
||||
|
Loading…
Reference in New Issue
Block a user