Commit f73a9bd6 authored by Jan Möbius's avatar Jan Möbius

Cleanup the MeshSelection file a bit (Make all referneces const ref)

Cleanup MeshInfo to be more consistent (Use pointers for all mesh parameters)
	- Change cog to get a pointer to the esh
	- Change getBoundingBox to get a pointer to the mesh
Thanks to Vladimir Chalupecky for reporting the inconsistencies.

refs #1372

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@16055 383ad7c9-94d9-4d36-a494-682f7c89f535
parent ae7bcddf
...@@ -521,7 +521,7 @@ void InfoMeshObjectPlugin::printMeshInfo( MeshT* _mesh , int _id, unsigned int _ ...@@ -521,7 +521,7 @@ void InfoMeshObjectPlugin::printMeshInfo( MeshT* _mesh , int _id, unsigned int _
//Calculate Bounding Box(min,max,cog) //Calculate Bounding Box(min,max,cog)
ACG::Vec3d min; ACG::Vec3d min;
ACG::Vec3d max; ACG::Vec3d max;
MeshInfo::getBoundingBox(*_mesh, min, max); MeshInfo::getBoundingBox(_mesh, min, max);
//Bounding Box Size //Bounding Box Size
ACG::Vec3d diff = max-min; ACG::Vec3d diff = max-min;
...@@ -539,7 +539,7 @@ void InfoMeshObjectPlugin::printMeshInfo( MeshT* _mesh , int _id, unsigned int _ ...@@ -539,7 +539,7 @@ void InfoMeshObjectPlugin::printMeshInfo( MeshT* _mesh , int _id, unsigned int _
info_->bbSizeZ->setText( QString::number(diff[2],'f') ); info_->bbSizeZ->setText( QString::number(diff[2],'f') );
//COG //COG
ACG::Vec3d cog = MeshInfo::cog(*_mesh); ACG::Vec3d cog = MeshInfo::cog(_mesh);
info_->cogX->setText( QString::number(cog[0],'f') ); info_->cogX->setText( QString::number(cog[0],'f') );
info_->cogY->setText( QString::number(cog[1],'f') ); info_->cogY->setText( QString::number(cog[1],'f') );
......
...@@ -392,7 +392,7 @@ Vector InfoMeshObjectPlugin::cog(int _id) ...@@ -392,7 +392,7 @@ Vector InfoMeshObjectPlugin::cog(int _id)
return Vector(); return Vector();
} }
return MeshInfo::cog(*mesh); return MeshInfo::cog(mesh);
} else { } else {
PolyMesh* mesh = PluginFunctions::polyMesh(object); PolyMesh* mesh = PluginFunctions::polyMesh(object);
...@@ -402,7 +402,7 @@ Vector InfoMeshObjectPlugin::cog(int _id) ...@@ -402,7 +402,7 @@ Vector InfoMeshObjectPlugin::cog(int _id)
return Vector(); return Vector();
} }
return MeshInfo::cog(*mesh); return MeshInfo::cog(mesh);
} }
} }
...@@ -436,7 +436,7 @@ Vector InfoMeshObjectPlugin::boundingBoxMin(int _id) ...@@ -436,7 +436,7 @@ Vector InfoMeshObjectPlugin::boundingBoxMin(int _id)
ACG::Vec3d min; ACG::Vec3d min;
ACG::Vec3d max; ACG::Vec3d max;
MeshInfo::getBoundingBox(*mesh, min, max); MeshInfo::getBoundingBox(mesh, min, max);
return min; return min;
...@@ -450,7 +450,7 @@ Vector InfoMeshObjectPlugin::boundingBoxMin(int _id) ...@@ -450,7 +450,7 @@ Vector InfoMeshObjectPlugin::boundingBoxMin(int _id)
ACG::Vec3d min; ACG::Vec3d min;
ACG::Vec3d max; ACG::Vec3d max;
MeshInfo::getBoundingBox(*mesh, min, max); MeshInfo::getBoundingBox(mesh, min, max);
return min; return min;
} }
...@@ -486,7 +486,7 @@ Vector InfoMeshObjectPlugin::boundingBoxMax(int _id) ...@@ -486,7 +486,7 @@ Vector InfoMeshObjectPlugin::boundingBoxMax(int _id)
ACG::Vec3d min; ACG::Vec3d min;
ACG::Vec3d max; ACG::Vec3d max;
MeshInfo::getBoundingBox(*mesh, min, max); MeshInfo::getBoundingBox(mesh, min, max);
return max; return max;
...@@ -500,7 +500,7 @@ Vector InfoMeshObjectPlugin::boundingBoxMax(int _id) ...@@ -500,7 +500,7 @@ Vector InfoMeshObjectPlugin::boundingBoxMax(int _id)
ACG::Vec3d min; ACG::Vec3d min;
ACG::Vec3d max; ACG::Vec3d max;
MeshInfo::getBoundingBox(*mesh, min, max); MeshInfo::getBoundingBox(mesh, min, max);
return max; return max;
} }
...@@ -536,7 +536,7 @@ Vector InfoMeshObjectPlugin::boundingBoxSize(int _id) ...@@ -536,7 +536,7 @@ Vector InfoMeshObjectPlugin::boundingBoxSize(int _id)
ACG::Vec3d min; ACG::Vec3d min;
ACG::Vec3d max; ACG::Vec3d max;
MeshInfo::getBoundingBox(*mesh, min, max); MeshInfo::getBoundingBox(mesh, min, max);
return (max - min); return (max - min);
...@@ -550,7 +550,7 @@ Vector InfoMeshObjectPlugin::boundingBoxSize(int _id) ...@@ -550,7 +550,7 @@ Vector InfoMeshObjectPlugin::boundingBoxSize(int _id)
ACG::Vec3d min; ACG::Vec3d min;
ACG::Vec3d max; ACG::Vec3d max;
MeshInfo::getBoundingBox(*mesh, min, max); MeshInfo::getBoundingBox(mesh, min, max);
return (max - min); return (max - min);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment