Class TransformedSphere

All Implemented Interfaces:
ConstJoltPhysicsObject, ConstTransformedConvexObject, AutoCloseable, Comparable<JoltPhysicsObject>

public class TransformedSphere extends TransformedConvexObject
A sphere combined with a coordinate transform. (native type: TransformedConvexObject<Sphere>)
  • Constructor Details

    • TransformedSphere

      public TransformedSphere(Mat44Arg transform, ConstSphere sphere)
      Instantiate an object for the specified transform and sphere.
      Parameters:
      transform - the desired coordinate transform (not null, uniform scaling, unaffected)
      sphere - the desired base sphere (not null, unaffected)
  • Method Details

    • getSupport

      public Vec3 getSupport(Vec3Arg direction)
      Calculate the support vector for the specified direction. The convex object is unaffected.
      Parameters:
      direction - the direction to use (not null, unaffected)
      Returns:
      a new location vector
    • getTransform

      public Mat44 getTransform()
      Copy the coordinate transform. The convex object is unaffected. (native member: mTransform)
      Returns:
      a new transform matrix