Class OBBFactoryCPtr


  • public class OBBFactoryCPtr
    extends java.lang.Object
    Ptr stores a pointer and optionally takes ownership of the value.
    • Constructor Detail

      • OBBFactoryCPtr

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

        public OBBFactoryCPtr()
        Default constructor yielding a NULL-pointer.
      • OBBFactoryCPtr

        public OBBFactoryCPtr​(OBBFactory ptr)
        Do not take ownership of ptr.

        ptr can be null.

        The constructor is implicit on purpose.
    • Method Detail

      • delete

        public void delete()
      • deref

        public OBBFactory deref()
        The pointer stored in the object.
      • __ref__

        public OBBFactory __ref__()
        Dereferencing operator.
      • getDeref

        public OBBFactory getDeref()
        Member access operator.
      • equals

        public boolean equals​(OBBFactory p)
      • isShared

        public boolean isShared()
        check if this Ptr has shared ownership or none
        ownership
        Returns:
        true if Ptr has shared ownership, false if it has no ownership.
      • isNull

        public boolean isNull()
        checks if the pointer is null
        Returns:
        Returns true if the pointer is null
      • makeDITO

        public OBB makeDITO​(TriMesh mesh)
      • makePCA

        public OBB makePCA​(TriMesh mesh)
        computes covariance over vertices in mesh and calculates the
        eigen vectors of the covariance and use this as axes in the bounding box
        Parameters:
        mesh - [in] the triangle mesh to create oriented bounding box for.
        Returns:
        a tight fitting bounding box
      • makePCAHull

        public OBB makePCAHull​(TriMesh mesh)
        computes covariance over the vertices of the convex hull
        of the mesh and calculates the
        eigen vectors of the covariance and use this as axes in the bounding box
        Parameters:
        mesh - [in] the triangle mesh to create oriented bounding box for.
        Returns:
        a tight fitting bounding box