Class SVertex

  • All Implemented Interfaces:
    Vertex, Vert2fImmutable, Vert3fImmutable, Cloneable

    public class SVertex
    extends Object
    implements Vertex
    A Simple Vertex Implementation. Where the coordinates, and other attributes are float based, and the coordinates and texture coordinates are saved in two float arrays.
    • Constructor Detail

      • SVertex

        public SVertex()
      • SVertex

        public SVertex​(Vertex src)
      • SVertex

        public SVertex​(int id,
                       boolean onCurve,
                       float[] texCoordsBuffer)
      • SVertex

        public SVertex​(float x,
                       float y,
                       float z,
                       boolean onCurve)
      • SVertex

        public SVertex​(float[] coordsBuffer,
                       int offset,
                       int length,
                       boolean onCurve)
    • Method Detail

      • setCoord

        public final void setCoord​(float x,
                                   float y,
                                   float z)
        Specified by:
        setCoord in interface Vertex
      • setX

        public final void setX​(float x)
        Specified by:
        setX in interface Vertex
      • setY

        public final void setY​(float y)
        Specified by:
        setY in interface Vertex
      • setZ

        public final void setZ​(float z)
        Specified by:
        setZ in interface Vertex
      • isOnCurve

        public final boolean isOnCurve()
        Specified by:
        isOnCurve in interface Vertex
      • setOnCurve

        public final void setOnCurve​(boolean onCurve)
        Specified by:
        setOnCurve in interface Vertex
      • getId

        public final int getId()
        Specified by:
        getId in interface Vertex
      • setId

        public final void setId​(int id)
        Specified by:
        setId in interface Vertex
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface Vertex
        Overrides:
        equals in class Object
        Parameters:
        obj - the Object to compare this Vertex with
        Returns:
        true if obj is a Vertex and not null, on-curve flag is equal and has same vertex- and tex-coords.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • getTexCoord

        public final float[] getTexCoord()
        Specified by:
        getTexCoord in interface Vertex
      • setTexCoord

        public final void setTexCoord​(float s,
                                      float t,
                                      float p)
        Specified by:
        setTexCoord in interface Vertex
      • clone

        public SVertex clone()
        Specified by:
        clone in interface Vertex
        Returns:
        deep clone of this Vertex elements