Class OBB


  • public class OBB
    extends java.lang.Object
    class representing an Oriented Bounding Box (OBB)
    • Constructor Detail

      • OBB

        public OBB​(long cPtr,
                   boolean cMemoryOwn)
      • OBB

        public OBB()
        constructor
    • Method Detail

      • getCPtr

        public static long getCPtr​(OBB obj)
      • delete

        public void delete()
      • setTransform

        public void setTransform​(Transform3D t3d)
        set the transformation of this OBB
      • getHalfLengths

        public Vector3D getHalfLengths()
        get the halflengths of this OBB
      • setHalfLengths

        public void setHalfLengths​(Vector3D halfLng)
        set the halflengths of the OBB
      • calcVolume

        public double calcVolume()
        calculate the volume of this OBB
      • calcArea

        public double calcArea()
        calculates the total area of the box
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • buildTightOBB

        public static OBB buildTightOBB​(TriMesh tris,
                                        long index)
      • buildTightOBB

        public static OBB buildTightOBB​(TriMesh tris)
      • createMesh

        public TriMeshPtr createMesh​(boolean local)
        Creates a TriMesh representing the OBB.

        The triangles of the mesh is by default placed in the "global" frame corresponding to the
        frame in which the OBB is defined. In case the parameter local is set to true, the
        reference frame will be the frame of the OBB itself.
      • createMesh

        public TriMeshPtr createMesh()
        Creates a TriMesh representing the OBB.

        The triangles of the mesh is by default placed in the "global" frame corresponding to the
        frame in which the OBB is defined. In case the parameter local is set to true, the
        reference frame will be the frame of the OBB itself.