Interface Shape3D

All Known Implementing Classes:
Box, Sphere

public interface Shape3D
Shared interface for all three-dimensional shapes. Shapes use coordinates with float precision, and instances are immutable. Sister interface to Shape, which targets 2D shapes.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final float
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    Returns the smallest possible bounding box that can fit this shape.
     
    Returns a new Shape3D instance that is repositioned by the specified offset.
  • Field Details

  • Method Details

    • getBoundingBox

      Box getBoundingBox()
      Returns the smallest possible bounding box that can fit this shape.
    • getCenter

      Point3D getCenter()
    • contains

      boolean contains(Point3D point)
    • reposition

      Shape3D reposition(Point3D offset)
      Returns a new Shape3D instance that is repositioned by the specified offset.