MCPcopy Create free account
hub / github.com/MITK/MITK / RotateGeometry

Method RotateGeometry

Modules/DataTypesExt/src/mitkAffineBaseDataInteractor3D.cpp:243–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243void mitk::AffineBaseDataInteractor3D::RotateGeometry(mitk::ScalarType angle,
244 int rotationaxis,
245 mitk::BaseGeometry *geometry)
246{
247 mitk::Vector3D rotationAxis = geometry->GetAxisVector(rotationaxis);
248 float pointX = 0.0f;
249 float pointY = 0.0f;
250 float pointZ = 0.0f;
251 mitk::Point3D pointOfRotation;
252 pointOfRotation.Fill(0.0);
253 this->GetDataNode()->GetFloatProperty(anchorPointX, pointX);
254 this->GetDataNode()->GetFloatProperty(anchorPointY, pointY);
255 this->GetDataNode()->GetFloatProperty(anchorPointZ, pointZ);
256 pointOfRotation[0] = pointX;
257 pointOfRotation[1] = pointY;
258 pointOfRotation[2] = pointZ;
259
260 auto *doOp = new mitk::RotationOperation(OpROTATE, pointOfRotation, rotationAxis, angle);
261
262 geometry->ExecuteOperation(doOp);
263 delete doOp;
264 mitk::RenderingManager::GetInstance()->RequestUpdateAll();
265}
266
267void mitk::AffineBaseDataInteractor3D::TranslateGeometry(mitk::Vector3D translate, mitk::BaseGeometry *geometry)
268{

Callers 6

RotateUpKeyMethod · 0.95
RotateDownKeyMethod · 0.95
RotateLeftKeyMethod · 0.95
RotateRightKeyMethod · 0.95
RotateUpModifierKeyMethod · 0.95
RotateDownModifierKeyMethod · 0.95

Calls 6

GetAxisVectorMethod · 0.80
FillMethod · 0.45
GetFloatPropertyMethod · 0.45
GetDataNodeMethod · 0.45
ExecuteOperationMethod · 0.45
RequestUpdateAllMethod · 0.45

Tested by

no test coverage detected