Skip to content

REFAC: Orientation axes removed, Full orientation support for all primitives shapes

Andrew Wilson requested to merge andrew.wilson/iMSTK:OrientedBox into master

Did this up Friday, finished testing today. Solves #285 (closed). It replaces orientation axes of analytical geometries with quaternion orientations for local transforms of primitives. Orientation axes cannot represent configurations of non-rotationally symmetric shapes along the axes. This was particularly troublesome for planes and boxes which could not be rotated around the orientation axes. Ex: If box orientation axes points up, it cannot rotate around it. For a capsule, cylinder, or sphere orientation axes aren't a problem because they are rotationally symmetric along one axes.

User facing API change:

  • setOrientationAxes and getOrientationAxes no longer exist, they should not.
  • GeometryUtilities::toQuadSurfaceMesh and toCubeSurfaceMesh conformed to a single toSurfaceMesh.

A couple of examples you may find useful for testing:

  • ObjectControllerExample: You can swap the shape in code, move the shape around.
  • ScreenshotExample: Just renders a sphere, plane, and a cube. Note, the cube is actually incorrectly oriented in this example on master due to this issue.
  • PBDCuttingExample: Uses a capsule for PBD collision.
Edited by Andrew Wilson

Merge request reports