Package codechicken.lib.model
Class Quad.Vertex
java.lang.Object
codechicken.lib.model.Quad.Vertex
- Enclosing class:
Quad
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionVertex()Vertex(Quad.Vertex other) Creates a new Vertex using the data inside the other. -
Method Summary
Modifier and TypeMethodDescriptioncopy()Copies this Vertex to a new one.voidcopyFrom(Quad.Vertex other) Copy the data in the given Vertex into this vertex.doubledx(int s) Gets the 2d X coord for the given axis.doubledy(int s) Gets the 2d Y coord for the given axis.intlongpackUV()voidset(org.joml.Vector3fc vec, long packedUV, int packedNormal, int packedColor) Set the data in this Vertex from the provided packed data.
-
Field Details
-
vec
-
uv
-
normal
-
color
public int color
-
-
Constructor Details
-
Vertex
public Vertex() -
Vertex
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
Copies this Vertex to a new one.- Returns:
- The new Vertex.
-
copyFrom
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.
-