Class ContBox3f

  • All Implemented Interfaces:
    java.io.Serializable

    public class ContBox3f
    extends java.lang.Object
    implements java.io.Serializable
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static long serialVersionUID  
    • Constructor Summary

      Constructors 
      Constructor Description
      ContBox3f()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Box3f ContAlignedBox​(int iQuantity, Vector3f[] akPoint)
      Compute the smallest axis-aligned bounding box of the points.
      static Box3f ContOrientedBox​(int iQuantity, java.util.Vector<Vector3f> kMeshVertices)
      Compute an oriented bounding box of the points.
      static boolean InBox​(Vector3f rkPoint, Box3f rkBox)
      Test for containment.
      static Box3f MergeBoxes​(Box3f rkBox0, Box3f rkBox1)
      Construct an oriented box that contains two other oriented boxes.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ContBox3f

        public ContBox3f()
    • Method Detail

      • ContAlignedBox

        public static Box3f ContAlignedBox​(int iQuantity,
                                           Vector3f[] akPoint)
        Compute the smallest axis-aligned bounding box of the points.
        Parameters:
        iQuantity - number of points
        akPoint - points to examine
        Returns:
        bounding box
      • ContOrientedBox

        public static Box3f ContOrientedBox​(int iQuantity,
                                            java.util.Vector<Vector3f> kMeshVertices)
        Compute an oriented bounding box of the points. The box center is the average of the points. The box axes are the eigenvectors of the covariance matrix.
        Parameters:
        iQuantity - number of points
        kMeshVertices - vertices to examine
        Returns:
        bounding box
      • InBox

        public static boolean InBox​(Vector3f rkPoint,
                                    Box3f rkBox)
        Test for containment. Let X = C + y0*U0 + y1*U1 + y2*U2 where C is the box center and U0, U1, U2 are the orthonormal axes of the box. X is in the box if |y_i|
        Parameters:
        rkPoint - point to test for containment
        rkBox - box container
        Returns:
        true if rkPoint is inside rkBox
        • MergeBoxes

          public static Box3f MergeBoxes​(Box3f rkBox0,
                                         Box3f rkBox1)
          Construct an oriented box that contains two other oriented boxes. The result is not guaranteed to be the minimum volume box containing the input boxes.
          Parameters:
          rkBox0 - first box to merge
          rkBox1 - second box to merge
          Returns:
          merged box