Class NaiveDoubleMesh.Triangles

    • Constructor Summary

      Constructors 
      Constructor Description
      Triangles()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long add​(long v0, long v1, long v2, double nx, double ny, double nz)
      Adds a triangle to the mesh's triangles list.
      long addf​(long v0, long v1, long v2, float nx, float ny, float nz)
      Adds a triangle to the mesh's triangles list.
      Mesh mesh()
      The mesh to which the collection of triangles belongs.
      double nx​(long tIndex)
      X coordinate of triangle's normal, as a double.
      float nxf​(long tIndex)
      X coordinate of triangle's normal, as a float.
      double ny​(long tIndex)
      Y coordinate of triangle's normal, as a double.
      float nyf​(long tIndex)
      Y coordinate of triangle's normal, as a float.
      double nz​(long tIndex)
      Z coordinate of triangle's normal, as a double.
      float nzf​(long tIndex)
      Z coordinate of triangle's normal, as a float.
      long sizel()
      Number of triangles in the collection as a long value.
      long vertex0​(long tIndex)
      Index of first vertex in a triangle.
      long vertex1​(long tIndex)
      Index of second vertex in a triangle.
      long vertex2​(long tIndex)
      Index of third vertex in a triangle.
    • Constructor Detail

      • Triangles

        public Triangles()
    • Method Detail

      • mesh

        public Mesh mesh()
        Description copied from interface: Triangles
        The mesh to which the collection of triangles belongs.
        Specified by:
        mesh in interface Triangles
      • sizel

        public long sizel()
        Description copied from interface: Triangles
        Number of triangles in the collection as a long value.
        Specified by:
        sizel in interface Triangles
      • vertex0

        public long vertex0​(long tIndex)
        Description copied from interface: Triangles
        Index of first vertex in a triangle.
        Specified by:
        vertex0 in interface Triangles
      • vertex1

        public long vertex1​(long tIndex)
        Description copied from interface: Triangles
        Index of second vertex in a triangle.
        Specified by:
        vertex1 in interface Triangles
      • vertex2

        public long vertex2​(long tIndex)
        Description copied from interface: Triangles
        Index of third vertex in a triangle.
        Specified by:
        vertex2 in interface Triangles
      • nx

        public double nx​(long tIndex)
        Description copied from interface: Triangles
        X coordinate of triangle's normal, as a double.
        Specified by:
        nx in interface Triangles
      • ny

        public double ny​(long tIndex)
        Description copied from interface: Triangles
        Y coordinate of triangle's normal, as a double.
        Specified by:
        ny in interface Triangles
      • nz

        public double nz​(long tIndex)
        Description copied from interface: Triangles
        Z coordinate of triangle's normal, as a double.
        Specified by:
        nz in interface Triangles
      • add

        public long add​(long v0,
                        long v1,
                        long v2,
                        double nx,
                        double ny,
                        double nz)
        Description copied from interface: Triangles
        Adds a triangle to the mesh's triangles list.
        Specified by:
        add in interface Triangles
        Parameters:
        v0 - Index of triangle's first vertex.
        v1 - Index of triangle's second vertex.
        v2 - Index of triangle's third vertex.
        nx - X coordinate of triangle's normal.
        ny - Y coordinate of triangle's normal.
        nz - Z coordinate of triangle's normal.
        Returns:
        Index of newly added triangle.
      • nxf

        public float nxf​(long tIndex)
        Description copied from interface: Triangles
        X coordinate of triangle's normal, as a float.
        Specified by:
        nxf in interface Triangles
      • nyf

        public float nyf​(long tIndex)
        Description copied from interface: Triangles
        Y coordinate of triangle's normal, as a float.
        Specified by:
        nyf in interface Triangles
      • nzf

        public float nzf​(long tIndex)
        Description copied from interface: Triangles
        Z coordinate of triangle's normal, as a float.
        Specified by:
        nzf in interface Triangles
      • addf

        public long addf​(long v0,
                         long v1,
                         long v2,
                         float nx,
                         float ny,
                         float nz)
        Description copied from interface: Triangles
        Adds a triangle to the mesh's triangles list.
        Specified by:
        addf in interface Triangles
        Parameters:
        v0 - Index of triangle's first vertex.
        v1 - Index of triangle's second vertex.
        v2 - Index of triangle's third vertex.
        nx - X coordinate of triangle's normal.
        ny - Y coordinate of triangle's normal.
        nz - Z coordinate of triangle's normal.
        Returns:
        Index of newly added triangle.