removed more duplicate iterators

This commit is contained in:
ejcoumans
2006-10-03 18:01:24 +00:00
parent 1208c67f85
commit d85ecfe5c2
2 changed files with 11 additions and 8 deletions

View File

@@ -173,6 +173,8 @@ bool ColladaConverter::load(const char* orgfilename)
bool ColladaConverter::convert() bool ColladaConverter::convert()
{ {
unsigned i;
//succesfully loaded file, now convert data //succesfully loaded file, now convert data
if ( m_dom->getAsset()->getUp_axis() ) if ( m_dom->getAsset()->getUp_axis() )
@@ -228,7 +230,7 @@ bool ColladaConverter::convert()
// Load all the geometry libraries // Load all the geometry libraries
for ( unsigned int i = 0; i < m_dom->getLibrary_geometries_array().getCount(); i++) for ( i = 0; i < m_dom->getLibrary_geometries_array().getCount(); i++)
{ {
domLibrary_geometriesRef libgeom = m_dom->getLibrary_geometries_array()[i]; domLibrary_geometriesRef libgeom = m_dom->getLibrary_geometries_array()[i];
@@ -279,7 +281,7 @@ bool ColladaConverter::convert()
//m_dom->getLibrary_physics_models_array() //m_dom->getLibrary_physics_models_array()
for ( unsigned int i = 0; i < m_dom->getLibrary_physics_scenes_array().getCount(); i++) for ( i = 0; i < m_dom->getLibrary_physics_scenes_array().getCount(); i++)
{ {
domLibrary_physics_scenesRef physicsScenesRef = m_dom->getLibrary_physics_scenes_array()[i]; domLibrary_physics_scenesRef physicsScenesRef = m_dom->getLibrary_physics_scenes_array()[i];
for (unsigned int s=0;s<physicsScenesRef->getPhysics_scene_array().getCount();s++) for (unsigned int s=0;s<physicsScenesRef->getPhysics_scene_array().getCount();s++)
@@ -298,9 +300,9 @@ bool ColladaConverter::convert()
} }
for (unsigned int m=0;m<physicsSceneRef->getInstance_physics_model_array().getCount();m++) for (unsigned int ps=0;ps<physicsSceneRef->getInstance_physics_model_array().getCount();ps++)
{ {
domInstance_physics_modelRef instance_physicsModelRef = physicsSceneRef->getInstance_physics_model_array()[m]; domInstance_physics_modelRef instance_physicsModelRef = physicsSceneRef->getInstance_physics_model_array()[ps];
daeElementRef ref = instance_physicsModelRef->getUrl().getElement(); daeElementRef ref = instance_physicsModelRef->getUrl().getElement();
@@ -468,9 +470,9 @@ bool ColladaConverter::convert()
//handle constraints //handle constraints
for (unsigned int m=0;m<physicsSceneRef->getInstance_physics_model_array().getCount();m++) for (unsigned int ma=0;ma<physicsSceneRef->getInstance_physics_model_array().getCount();ma++)
{ {
domInstance_physics_modelRef instance_physicsModelRef = physicsSceneRef->getInstance_physics_model_array()[m]; domInstance_physics_modelRef instance_physicsModelRef = physicsSceneRef->getInstance_physics_model_array()[ma];
daeElementRef ref = instance_physicsModelRef->getUrl().getElement(); daeElementRef ref = instance_physicsModelRef->getUrl().getElement();

View File

@@ -229,9 +229,10 @@ void Raytracer::displayCallback()
btSphereShape pointShape(0.0f); btSphereShape pointShape(0.0f);
int x;
///clear texture ///clear texture
for (int x=0;x<screenWidth;x++) for (x=0;x<screenWidth;x++)
{ {
for (int y=0;y<screenHeight;y++) for (int y=0;y<screenHeight;y++)
{ {
@@ -245,7 +246,7 @@ void Raytracer::displayCallback()
btTransform rayToTrans; btTransform rayToTrans;
rayToTrans.setIdentity(); rayToTrans.setIdentity();
btVector3 rayTo; btVector3 rayTo;
for (int x=0;x<screenWidth;x++) for (x=0;x<screenWidth;x++)
{ {
for (int y=0;y<screenHeight;y++) for (int y=0;y<screenHeight;y++)
{ {