Class IndexedTriArrayPtr


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

      • IndexedTriArrayPtr

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

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

        public IndexedTriArrayPtr​(IndexedTriArray ptr)
        Do not take ownership of ptr.

        ptr can be null.

        The constructor is implicit on purpose.
    • Method Detail

      • delete

        public void delete()
      • 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
      • getIndexes

        public vector_ui getIndexes()
        get the index mapping
      • sortAxis

        public void sortAxis​(int axis)
        sorts the triangles in the range [first,last[. the vertices of the triangles
        are projected onto the axis and then sorted in regard to the projected value
        from small to high
        Parameters:
        axis -
      • sortAxis

        public void sortAxis​(int axis,
                             Transform3D t3d)
      • getSubRange

        public IndexedTriArray getSubRange​(long first,
                                           long last)
      • scale

        public void scale​(double s)
      • getGlobalIndex

        public long getGlobalIndex​(int idx)
      • set

        public void set​(long i,
                        Triangle d)
      • getTriangle

        public Triangle getTriangle​(long idx)
      • getTriangle

        public void getTriangle​(long i,
                                Triangle dst)
      • getTriangle

        public void getTriangle​(long i,
                                Triangle_f dst)
      • getSize

        public long getSize()
      • size

        public long size()
      • getTriMesh

        public TriMeshPtr getTriMesh​(boolean forceCopy)
      • isConvex

        public boolean isConvex()
      • setConvexEnabled

        public void setConvexEnabled​(boolean isConvex)
      • getVolume

        public double getVolume()
        calculate a volume of this triangle mesh
      • toString

        public java.lang.String toString​(GeometryData.GeometryType type)
        format GeometryType to string
        Parameters:
        type -