Class NaiveDoubleMesh.Vertices

    • Constructor Summary

      Constructors 
      Constructor Description
      Vertices()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long add​(double x, double y, double z, double nx, double ny, double nz, double u, double v)
      Adds a vertex.
      long addf​(float x, float y, float z, float nx, float ny, float nz, float u, float v)
      Adds a vertex.
      Mesh mesh()
      The mesh to which the collection of vertices belongs.
      double nx​(long vIndex)
      X coordinate of vertex normal, as a double.
      float nxf​(long vIndex)
      X coordinate of vertex normal, as a float.
      double ny​(long vIndex)
      Y coordinate of vertex normal, as a double.
      float nyf​(long vIndex)
      Y coordinate of vertex normal, as a float.
      double nz​(long vIndex)
      Z coordinate of vertex normal, as a double.
      float nzf​(long vIndex)
      Z coordinate of vertex normal, as a float.
      void set​(long vIndex, double x, double y, double z, double nx, double ny, double nz, double u, double v)
      Overwrites a vertex's position, normal and texture coordinates.
      void setf​(long vIndex, float x, float y, float z, float nx, float ny, float nz, float u, float v)
      Overwrites a vertex's position, normal and texture coordinates.
      void setNormal​(long vIndex, double nx, double ny, double nz)
      Overwrites a vertex's normal.
      void setNormalf​(long vIndex, float nx, float ny, float nz)
      Overwrites a vertex's normal.
      void setPosition​(long vIndex, double x, double y, double z)
      Overwrites a vertex's position.
      void setPositionf​(long vIndex, float x, float y, float z)
      Overwrites a vertex's position.
      void setTexture​(long vIndex, double u, double v)
      Overwrites a vertex's texture coordinates.
      void setTexturef​(long vIndex, float u, float v)
      Overwrites a vertex's texture coordinates.
      long sizel()
      Number of vertices in the collection as a long value.
      double u​(long vIndex)
      U value of vertex texture coordinate, as a double.
      float uf​(long vIndex)
      U value of vertex texture coordinate, as a float.
      double v​(long vIndex)
      V value of vertex texture coordinate, as a double.
      float vf​(long vIndex)
      V value of vertex texture coordinate, as a float.
      double x​(long vIndex)
      X position of a vertex, as a double.
      float xf​(long vIndex)
      X position of a vertex, as a float.
      double y​(long vIndex)
      Y position of a vertex, as a double.
      float yf​(long vIndex)
      Y position of a vertex, as a float.
      double z​(long vIndex)
      Z position of a vertex, as a double.
      float zf​(long vIndex)
      Z position of a vertex, as a float.
    • Constructor Detail

      • Vertices

        public Vertices()
    • Method Detail

      • mesh

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

        public long sizel()
        Description copied from interface: Vertices
        Number of vertices in the collection as a long value.
        Specified by:
        sizel in interface Vertices
      • x

        public double x​(long vIndex)
        Description copied from interface: Vertices
        X position of a vertex, as a double.
        Specified by:
        x in interface Vertices
      • y

        public double y​(long vIndex)
        Description copied from interface: Vertices
        Y position of a vertex, as a double.
        Specified by:
        y in interface Vertices
      • z

        public double z​(long vIndex)
        Description copied from interface: Vertices
        Z position of a vertex, as a double.
        Specified by:
        z in interface Vertices
      • nx

        public double nx​(long vIndex)
        Description copied from interface: Vertices
        X coordinate of vertex normal, as a double.
        Specified by:
        nx in interface Vertices
      • ny

        public double ny​(long vIndex)
        Description copied from interface: Vertices
        Y coordinate of vertex normal, as a double.
        Specified by:
        ny in interface Vertices
      • nz

        public double nz​(long vIndex)
        Description copied from interface: Vertices
        Z coordinate of vertex normal, as a double.
        Specified by:
        nz in interface Vertices
      • u

        public double u​(long vIndex)
        Description copied from interface: Vertices
        U value of vertex texture coordinate, as a double.
        Specified by:
        u in interface Vertices
      • v

        public double v​(long vIndex)
        Description copied from interface: Vertices
        V value of vertex texture coordinate, as a double.
        Specified by:
        v in interface Vertices
      • add

        public long add​(double x,
                        double y,
                        double z,
                        double nx,
                        double ny,
                        double nz,
                        double u,
                        double v)
        Description copied from interface: Vertices
        Adds a vertex.
        Specified by:
        add in interface Vertices
        Parameters:
        x - X position of the vertex.
        y - Y position of the vertex.
        z - Z position of the vertex.
        nx - X coordinate of the vertex's normal.
        ny - Y coordinate of the vertex's normal.
        nz - Z coordinate of the vertex's normal.
        u - U value of vertex texture coordinate.
        v - V value of vertex texture coordinate.
        Returns:
        Index of newly added vertex.
      • set

        public void set​(long vIndex,
                        double x,
                        double y,
                        double z,
                        double nx,
                        double ny,
                        double nz,
                        double u,
                        double v)
        Description copied from interface: Vertices
        Overwrites a vertex's position, normal and texture coordinates.
        Specified by:
        set in interface Vertices
        Parameters:
        vIndex - Index of vertex to overwrite.
        x - X position of the vertex.
        y - Y position of the vertex.
        z - Z position of the vertex.
        nx - X coordinate of the vertex's normal.
        ny - Y coordinate of the vertex's normal.
        nz - Z coordinate of the vertex's normal.
        u - U value of vertex texture coordinate.
        v - V value of vertex texture coordinate.
      • setPosition

        public void setPosition​(long vIndex,
                                double x,
                                double y,
                                double z)
        Description copied from interface: Vertices
        Overwrites a vertex's position.
        Specified by:
        setPosition in interface Vertices
        Parameters:
        vIndex - Index of vertex to overwrite.
        x - X position of the vertex.
        y - Y position of the vertex.
        z - Z position of the vertex.
      • setNormal

        public void setNormal​(long vIndex,
                              double nx,
                              double ny,
                              double nz)
        Description copied from interface: Vertices
        Overwrites a vertex's normal.
        Specified by:
        setNormal in interface Vertices
        Parameters:
        vIndex - Index of vertex to overwrite.
        nx - X coordinate of the vertex's normal.
        ny - Y coordinate of the vertex's normal.
        nz - Z coordinate of the vertex's normal.
      • setTexture

        public void setTexture​(long vIndex,
                               double u,
                               double v)
        Description copied from interface: Vertices
        Overwrites a vertex's texture coordinates.
        Specified by:
        setTexture in interface Vertices
        Parameters:
        vIndex - Index of vertex to overwrite.
        u - U value of vertex texture coordinate.
        v - V value of vertex texture coordinate.
      • xf

        public float xf​(long vIndex)
        Description copied from interface: Vertices
        X position of a vertex, as a float.
        Specified by:
        xf in interface Vertices
      • yf

        public float yf​(long vIndex)
        Description copied from interface: Vertices
        Y position of a vertex, as a float.
        Specified by:
        yf in interface Vertices
      • zf

        public float zf​(long vIndex)
        Description copied from interface: Vertices
        Z position of a vertex, as a float.
        Specified by:
        zf in interface Vertices
      • nxf

        public float nxf​(long vIndex)
        Description copied from interface: Vertices
        X coordinate of vertex normal, as a float.
        Specified by:
        nxf in interface Vertices
      • nyf

        public float nyf​(long vIndex)
        Description copied from interface: Vertices
        Y coordinate of vertex normal, as a float.
        Specified by:
        nyf in interface Vertices
      • nzf

        public float nzf​(long vIndex)
        Description copied from interface: Vertices
        Z coordinate of vertex normal, as a float.
        Specified by:
        nzf in interface Vertices
      • uf

        public float uf​(long vIndex)
        Description copied from interface: Vertices
        U value of vertex texture coordinate, as a float.
        Specified by:
        uf in interface Vertices
      • vf

        public float vf​(long vIndex)
        Description copied from interface: Vertices
        V value of vertex texture coordinate, as a float.
        Specified by:
        vf in interface Vertices
      • addf

        public long addf​(float x,
                         float y,
                         float z,
                         float nx,
                         float ny,
                         float nz,
                         float u,
                         float v)
        Description copied from interface: Vertices
        Adds a vertex.
        Specified by:
        addf in interface Vertices
        Parameters:
        x - X position of the vertex.
        y - Y position of the vertex.
        z - Z position of the vertex.
        nx - X coordinate of the vertex's normal.
        ny - Y coordinate of the vertex's normal.
        nz - Z coordinate of the vertex's normal.
        u - U value of vertex texture coordinate.
        v - V value of vertex texture coordinate.
        Returns:
        Index of newly added vertex.
      • setf

        public void setf​(long vIndex,
                         float x,
                         float y,
                         float z,
                         float nx,
                         float ny,
                         float nz,
                         float u,
                         float v)
        Description copied from interface: Vertices
        Overwrites a vertex's position, normal and texture coordinates.
        Specified by:
        setf in interface Vertices
        Parameters:
        vIndex - Index of vertex to overwrite.
        x - X position of the vertex.
        y - Y position of the vertex.
        z - Z position of the vertex.
        nx - X coordinate of the vertex's normal.
        ny - Y coordinate of the vertex's normal.
        nz - Z coordinate of the vertex's normal.
        u - U value of vertex texture coordinate.
        v - V value of vertex texture coordinate.
      • setPositionf

        public void setPositionf​(long vIndex,
                                 float x,
                                 float y,
                                 float z)
        Description copied from interface: Vertices
        Overwrites a vertex's position.
        Specified by:
        setPositionf in interface Vertices
        Parameters:
        vIndex - Index of vertex to overwrite.
        x - X position of the vertex.
        y - Y position of the vertex.
        z - Z position of the vertex.
      • setNormalf

        public void setNormalf​(long vIndex,
                               float nx,
                               float ny,
                               float nz)
        Description copied from interface: Vertices
        Overwrites a vertex's normal.
        Specified by:
        setNormalf in interface Vertices
        Parameters:
        vIndex - Index of vertex to overwrite.
        nx - X coordinate of the vertex's normal.
        ny - Y coordinate of the vertex's normal.
        nz - Z coordinate of the vertex's normal.
      • setTexturef

        public void setTexturef​(long vIndex,
                                float u,
                                float v)
        Description copied from interface: Vertices
        Overwrites a vertex's texture coordinates.
        Specified by:
        setTexturef in interface Vertices
        Parameters:
        vIndex - Index of vertex to overwrite.
        u - U value of vertex texture coordinate.
        v - V value of vertex texture coordinate.