Class Bounds

java.lang.Object
eu.mihosoft.vrl.v3d.Bounds

public class Bounds extends Object
Bounding box for CSGs.
Author:
Michael Hoffer <info@michaelhoffer.de>
  • Constructor Details Link icon

    • Bounds Link icon

      public Bounds(Vector3d min, Vector3d max)
      Constructor.
      Parameters:
      min - min x,y,z values
      max - max x,y,z values
  • Method Details Link icon

    • clone Link icon

      public Bounds clone()
      Overrides:
      clone in class Object
    • getCenter Link icon

      public Vector3d getCenter()
      Returns the position of the center.
      Returns:
      the center position
    • getBounds Link icon

      public Vector3d getBounds()
      Returns the bounds (width,height,depth).
      Returns:
      the bounds (width,height,depth)
    • toCSG Link icon

      public CSG toCSG()
      Returns this bounding box as csg.
      Returns:
      this bounding box as csg
    • toCube Link icon

      public Cube toCube()
      Returns this bounding box as cube.
      Returns:
      this bounding box as cube
    • contains Link icon

      public boolean contains(Vertex v)
      Indicates whether the specified vertex is contained within this bounding box (check includes box boundary).
      Parameters:
      v - vertex to check
      Returns:
      true if the vertex is contained within this bounding box; false otherwise
    • contains Link icon

      public boolean contains(Vector3d v)
      Indicates whether the specified point is contained within this bounding box (check includes box boundary).
      Parameters:
      v - vertex to check
      Returns:
      true if the point is contained within this bounding box; false otherwise
    • contains Link icon

      public boolean contains(Polygon p)
      Indicates whether the specified polygon is contained within this bounding box (check includes box boundary).
      Parameters:
      p - polygon to check
      Returns:
      true if the polygon is contained within this bounding box; false otherwise
    • intersects Link icon

      @Deprecated public boolean intersects(Polygon p)
      Deprecated.
      not implemented yet
      Indicates whether the specified polygon intersects with this bounding box (check includes box boundary).
      Parameters:
      p - polygon to check
      Returns:
      true if the polygon intersects this bounding box; false otherwise
    • intersects Link icon

      public boolean intersects(Bounds b)
      Indicates whether the specified bounding box intersects with this bounding box (check includes box boundary).
      Parameters:
      b - box to check
      Returns:
      true if the bounding box intersects this bounding box; false otherwise
    • getMin Link icon

      public Vector3d getMin()
      Returns:
      the min x,y,z values
    • getMax Link icon

      public Vector3d getMax()
      Returns:
      the max x,y,z values
    • toString Link icon

      public String toString()
      Overrides:
      toString in class Object