Class SVertex

java.lang.Object
com.jogamp.graph.geom.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 Details

    • 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 Details

    • factory

      public static SVertex.Factory factory()
    • setCoord

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

      public final void setCoord(float[] coordsBuffer, int offset, int length)
      Specified by:
      setCoord in interface Vertex
      See Also:
    • getCoordCount

      public int getCoordCount()
      Specified by:
      getCoordCount in interface Vert2fImmutable
    • getCoord

      public final float[] getCoord()
      Specified by:
      getCoord in interface Vert2fImmutable
    • 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
    • getX

      public final float getX()
      Specified by:
      getX in interface Vert2fImmutable
    • getY

      public final float getY()
      Specified by:
      getY in interface Vert2fImmutable
    • getZ

      public final float getZ()
      Specified by:
      getZ in interface Vert3fImmutable
    • 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
    • setTexCoord

      public final void setTexCoord(float[] texCoordsBuffer, int offset, int length)
      Specified by:
      setTexCoord in interface Vertex
      See Also:
    • clone

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

      public String toString()
      Overrides:
      toString in class Object