Class IndexedTriMeshN0_fCPtr


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

      • IndexedTriMeshN0_fCPtr

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

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

        public IndexedTriMeshN0_fCPtr​(IndexedTriMeshN0_f 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
      • getTriangle

        public Triangle getTriangle​(long i)
      • getTriangle

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

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

        public Vector3Df getTriVertex​(long i,
                                      long triIdx)
        get vertex i of triangle at index triIdx.
        Parameters:
        i - [in] should be in interval [0;2]
        triIdx - [in] index of triangle in the triangle mesh
        Returns:
        a reference to the given vertex.
      • getTriangles

        public VectorIndexedTriangle getTriangles()
        get triangle list
        Returns:
        vector of triangles
      • calcFaceNormal

        public Vector3Df calcFaceNormal​(long triIdx)
        calculate face normal of triangle at index triIdx
        Returns:
        the face normal.
      • getNrTris

        public int getNrTris()
      • getSize

        public long getSize()
      • getTriangleStride

        public short getTriangleStride()
        The stride of a triangle.
        Returns:
        the stride.
      • getIndexSize

        public short getIndexSize()
        The size of the index type used.
        Returns:
        Typically 2 (uint16_t) or 4 (uint32_t).
      • size

        public long size()
      • hasVertexNormals

        public boolean hasVertexNormals()
        Check if trimesh has vertex normals defined.
        Returns:
        true if vertex normals are defined.
      • hasFaceNormals

        public boolean hasFaceNormals()
        Check if trimesh has face normals defined.
        Returns:
        true if face normals are defined.
      • getVolume

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