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

Use if then else instead of switch

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6272 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 9024b381
...@@ -332,21 +332,18 @@ void MovePlugin::moveObject(ACG::Matrix4x4d mat, int _id) { ...@@ -332,21 +332,18 @@ void MovePlugin::moveObject(ACG::Matrix4x4d mat, int _id) {
if ( ! PluginFunctions::getObject(_id,object) ) if ( ! PluginFunctions::getObject(_id,object) )
return; return;
switch ( object->dataType() ) { if ( object->dataType() == DATA_TRIANGLE_MESH ) {
case DATA_TRIANGLE_MESH: transformMesh(mat , *PluginFunctions::triMesh(object) );
transformMesh(mat , *PluginFunctions::triMesh(object) ); } else if ( object->dataType() == DATA_POLY_MESH ) {
break; transformMesh(mat , *PluginFunctions::polyMesh(object) );
case DATA_POLY_MESH: #ifdef ENABLE_POLYLINE_SUPPORT
transformMesh(mat , *PluginFunctions::polyMesh(object) ); } else if ( object->dataType() == DATA_POLY_LINE ) {
break; transformPolyLine(mat , *PluginFunctions::polyLine(object) );
case DATA_POLY_LINE: #endif
#ifdef ENABLE_POLYLINE_SUPPORT } else {
transformPolyLine(mat , *PluginFunctions::polyLine(object) );
#endif emit log(LOGERR,"moveObject called for unsupported Object Type");
break; return;
default:
emit log(LOGERR,"moveObject called for unsupported Object Type");
return;
} }
emit updatedObject(_id); emit updatedObject(_id);
...@@ -653,7 +650,7 @@ void MovePlugin::showManipulators( ) ...@@ -653,7 +650,7 @@ void MovePlugin::showManipulators( )
(additionalManipulators_[i])->set_center( (additionalManipulators_[i])->matrix().transform_point( (additionalManipulators_[i])->center() ) ); (additionalManipulators_[i])->set_center( (additionalManipulators_[i])->matrix().transform_point( (additionalManipulators_[i])->center() ) );
(additionalManipulators_[i])->loadIdentity(); (additionalManipulators_[i])->loadIdentity();
} }
} }
......
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