Class Quad.Vertex

java.lang.Object
codechicken.lib.model.Quad.Vertex
Enclosing class:
Quad

public static class Quad.Vertex extends Object
  • Field Details

    • vec

      public Vector3 vec
    • uv

      public UV uv
    • normal

      public Vector3 normal
    • color

      public int color
  • Constructor Details

    • Vertex

      public Vertex()
    • Vertex

      public Vertex(Quad.Vertex other)
      Creates a new Vertex using the data inside the other. A copy!
      Parameters:
      other - The other.
  • Method Details

    • dx

      public double dx(int s)
      Gets the 2d X coord for the given axis.
      Parameters:
      s - The axis. side >> 1
      Returns:
      The x coord.
    • dy

      public double dy(int s)
      Gets the 2d Y coord for the given axis.
      Parameters:
      s - The axis. side >> 1
      Returns:
      The y coord.
    • copy

      public Quad.Vertex copy()
      Copies this Vertex to a new one.
      Returns:
      The new Vertex.
    • copyFrom

      public void copyFrom(Quad.Vertex other)
      Copy the data in the given Vertex into this vertex.
      Parameters:
      other - The other vertex.
    • set

      public void set(org.joml.Vector3fc vec, long packedUV, int packedNormal, int packedColor)
      Set the data in this Vertex from the provided packed data.
      Parameters:
      vec - The vector.
      packedUV - The packed UV.
      packedNormal - The packed normals.
      packedColor - The packed color.
    • packUV

      public long packUV()
      Returns:
      The UV repacked into a long.
    • packNormal

      public int packNormal()
      Returns:
      The Normals repacked into an int.