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) {
if ( ! PluginFunctions::getObject(_id,object) )
return;
switch ( object->dataType() ) {
case DATA_TRIANGLE_MESH:
transformMesh(mat , *PluginFunctions::triMesh(object) );
break;
case DATA_POLY_MESH:
transformMesh(mat , *PluginFunctions::polyMesh(object) );
break;
case DATA_POLY_LINE:
#ifdef ENABLE_POLYLINE_SUPPORT
transformPolyLine(mat , *PluginFunctions::polyLine(object) );
#endif
break;
default:
emit log(LOGERR,"moveObject called for unsupported Object Type");
return;
if ( object->dataType() == DATA_TRIANGLE_MESH ) {
transformMesh(mat , *PluginFunctions::triMesh(object) );
} else if ( object->dataType() == DATA_POLY_MESH ) {
transformMesh(mat , *PluginFunctions::polyMesh(object) );
#ifdef ENABLE_POLYLINE_SUPPORT
} else if ( object->dataType() == DATA_POLY_LINE ) {
transformPolyLine(mat , *PluginFunctions::polyLine(object) );
#endif
} else {
emit log(LOGERR,"moveObject called for unsupported Object Type");
return;
}
emit updatedObject(_id);
......@@ -653,7 +650,7 @@ void MovePlugin::showManipulators( )
(additionalManipulators_[i])->set_center( (additionalManipulators_[i])->matrix().transform_point( (additionalManipulators_[i])->center() ) );
(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