Class ColliderShape

java.lang.Object
jsim.collision.ColliderShape
Direct Known Subclasses:
BoxCollider, PlaneCollider, SphereCollider

public abstract class ColliderShape extends Object
A collision shape attached to a rigid body.

Shapes are defined in body-local space. The physics world transforms them to world space when building AABBs and running narrowphase tests.

  • Constructor Details

    • ColliderShape

      public ColliderShape()
  • Method Details

    • getType

      public abstract ColliderShape.Type getType()
      The shape type of this collider.
      Returns:
      this shape's type tag
    • computeAABB

      public abstract void computeAABB(edu.wpi.first.math.geometry.Pose3d pose, double[] out)
      Compute the world-space AABB of this shape given the body's pose.
      Parameters:
      pose - world-space pose of the body (position in metres, orientation as quaternion)
      out - receives [minX, minY, minZ, maxX, maxY, maxZ] in metres