I’m working with STL based geometries, which work very well.
I have some geometries which are not centered.
I would like to rotate this object along it’s own arbitrary axis.
For objects already defined in the mother’s center, I do this via:
// Define Some arb axis G4ThreeVector AxisOfRotation = G4ThreeVector(0.5,0.1,0.5).unit(); // Define RotationMatrix G4RotationMatrix * RotMat = new G4RotationMatrix(); // rotate object 90deg w.r.t this axis RotMat -> rotate(90.0 *deg, AxisOfRotation); RotMat -> invert();` new G4PVPlacement(G4Transform3D(*RotMat, TranslationVector), ...... );
However, now that my object is off-centered to begin with, I would need to translate the object to the center, THEN, rotate and translate back.
Is there a way to make this work? Or perhaps a better method?