Class BoxShape

java.lang.Object
org.episteme.core.mathematics.geometry.collision.BoxShape
All Implemented Interfaces:
CollisionShape

public class BoxShape extends Object implements CollisionShape
Box collision shape defined by its half-extents.
  • Constructor Details

    • BoxShape

      public BoxShape(double x, double y, double z)
  • Method Details

    • getHalfExtents

      public Vector<Real> getHalfExtents()
    • getSupportPoint

      public Vector<Real> getSupportPoint(Vector<Real> direction)
      Description copied from interface: CollisionShape
      Gets the support point in a given direction (furthest point in that direction). Used for GJK and SAT algorithms.
      Specified by:
      getSupportPoint in interface CollisionShape
      Parameters:
      direction - the direction vector
      Returns:
      the support point in local coordinates
    • getAABB

      public Vector<Real>[] getAABB()
      Description copied from interface: CollisionShape
      compute AABB (Axis Aligned Bounding Box).
      Specified by:
      getAABB in interface CollisionShape
      Returns:
      array of two Vectors {min, max}