Class IndexedTriMeshN0_f


  • public class IndexedTriMeshN0_f
    extends IndexedTriMesh_f
    an Indexed Triangle mesh with zero normals
    • Method Detail

      • getVertexNormal

        public Vector3Df getVertexNormal​(long i,
                                         VertexIdx vidx)
        Description copied from class: IndexedTriMesh_f
        Get normal of vertex vidx of triangle at index i.
        Overrides:
        getVertexNormal in class IndexedTriMesh_f
        Parameters:
        i - [in] the index of the triangle.
        vidx - [in] the triangle vertex.
        Returns:
        reference to normal vector.
        Warning: Using the virtual function comes with a performance penalty.
        If possible, use functions implemented on subtypes directly.
      • getVertex

        public Vector3Df getVertex​(long i,
                                   VertexIdx vidx)
        Description copied from class: IndexedTriMesh_f
        get vertex vidx of triangle at index i.
        Overrides:
        getVertex in class IndexedTriMesh_f
        Parameters:
        i - [in] the index of the triangle
        vidx - [in] the index of the triangle vertex
        Returns:
        reference to vertex.
        Warning: Using the virtual function comes with a performance penalty.
        If possible, use functions implemented on subtypes directly (like
        IndexedTriMeshN0::getTriVertex).
      • getIndexedTriangle

        public IndexedTriangle_32 getIndexedTriangle​(long i)
        Description copied from class: IndexedTriMesh_f
        get the indexed triangle at index i
        Overrides:
        getIndexedTriangle in class IndexedTriMesh_f
        Parameters:
        i - [in] the index of the triangle
        Returns:
        an indexed triangle
        Warning: Using the virtual function comes with a performance penalty.
        If possible, use functions implemented on subtypes directly.
      • getTriangle

        public Triangle getTriangle​(long i)
        Description copied from class: TriMesh
        gets the triangle at index idx.
        Overrides:
        getTriangle in class TriMesh
        Parameters:
        i - [in] the index of the triangle.
        Returns:
        the triangle at index idx
      • getTriangle

        public void getTriangle​(long i,
                                Triangle dst)
        Description copied from class: TriMesh
        gets the triangle at index idx.
        Overrides:
        getTriangle in class TriMesh
        Parameters:
        i - [in] the index of the triangle.
        dst - [out] where to store the triangle at index idx
      • getTriangle

        public void getTriangle​(long i,
                                Triangle_f dst)
        Description copied from class: TriMesh
        gets the triangle at index idx. Using Floating point presicion
        Overrides:
        getTriangle in class TriMesh
        Parameters:
        i - [in] the index of the triangle.
        dst - [out] where to store the triangle at index idx
      • add

        public void add​(IndexedTriangle triangle)
        Add indexed triangle to the triangle mesh.
        Parameters:
        triangle - [in] the indexed triangle to add.
      • 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
      • calcFaceArea

        public float calcFaceArea​(long triIdx)
        calculate area of triangle at index triIdx
        Returns:
        the area.
      • calcFaceCentroid

        public Vector3Df calcFaceCentroid​(long triIdx)
        calculate centroid of triangle at index triIdx
        Returns:
        the centroid.
      • calcFaceNormal

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

        public void resize​(long nsize)
        Set the number of triangles in the mesh.
        Parameters:
        nsize - [in] the new size of the mesh.
      • getSize

        public long getSize()
        Description copied from class: TriMesh
        gets the number of triangles in the triangle array.
        Overrides:
        getSize in class TriMesh
      • clone

        public TriMeshPtr clone()
        Description copied from class: TriMesh
        make a clone of this triangle mesh
        Overrides:
        clone in class TriMesh
        Returns:
        clone of this trimesh