Class OBBCPtr


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

      Constructors 
      Constructor Description
      OBBCPtr()
      Default constructor yielding a NULL-pointer.
      OBBCPtr​(long cPtr, boolean cMemoryOwn)  
      OBBCPtr​(OBB ptr)
      Do not take ownership of ptr.

      ptr can be null.

      The constructor is implicit on purpose.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      OBB __ref__()
      Dereferencing operator.
      double calcArea()
      calculates the total area of the box
      double calcVolume()
      calculate the volume of this OBB
      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.
      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.
      void delete()  
      OBB deref()
      The pointer stored in the object.
      boolean equals​(OBB p)  
      static long getCPtr​(OBBCPtr obj)  
      OBB getDeref()
      Member access operator.
      Vector3D getHalfLengths()
      get the halflengths of this OBB
      Transform3D getTransform()  
      boolean isNull()
      checks if the pointer is null
      boolean isShared()
      check if this Ptr has shared ownership or none
      ownership
      • Methods inherited from class java.lang.Object

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

      • OBBCPtr

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

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

        public OBBCPtr​(OBB ptr)
        Do not take ownership of ptr.

        ptr can be null.

        The constructor is implicit on purpose.
    • Method Detail

      • getCPtr

        public static long getCPtr​(OBBCPtr obj)
      • delete

        public void delete()
      • deref

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

        public OBB __ref__()
        Dereferencing operator.
      • getDeref

        public OBB getDeref()
        Member access operator.
      • equals

        public boolean equals​(OBB 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
      • getHalfLengths

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

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

        public double calcArea()
        calculates the total area of the box
      • 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.