Package ke.ric.renderer.api
Class ResolvedTriangle
java.lang.Object
ke.ric.renderer.api.ResolvedTriangle
One fully baked engine-neutral triangle.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumOptional source-face orientation retained for lighting and culling semantics. -
Constructor Summary
ConstructorsConstructorDescriptionResolvedTriangle(float[] positions, float[] uvs, float[] normal, ResolvedMaterial material, int tintIndex, int sampleWidth, int sampleHeight, boolean shade, ResolvedTriangle.Face face) Creates a triangle with copied finite vertex/UV/normal arrays and immutable material evidence. -
Method Summary
Modifier and TypeMethodDescriptionface()Returns the retained source-face orientation, or UNSPECIFIED.material()Returns immutable material and texture evidence.float[]normal()Returns a copied three-component normal.float[]Returns nine copied XYZ values, one triplet per local-space vertex.intReturns texture sampling height in pixels.intReturns texture sampling width in pixels.booleanshade()Returns whether directional shading is enabled.intReturns the source tint index, or -1 when no tint index is supplied.float[]uvs()Returns six copied UV values, one pair per vertex.
-
Constructor Details
-
ResolvedTriangle
public ResolvedTriangle(float[] positions, float[] uvs, float[] normal, ResolvedMaterial material, int tintIndex, int sampleWidth, int sampleHeight, boolean shade, ResolvedTriangle.Face face) Creates a triangle with copied finite vertex/UV/normal arrays and immutable material evidence.- Parameters:
positions- nine XYZ values: three baked vertices in the target's local coordinate systemuvs- six UV values: one pair per vertexnormal- three normal componentsmaterial- non-null exact texture and alpha behaviortintIndex- source tint index, or -1 for nonesampleWidth- texture sampling width in 1..65535 pixelssampleHeight- texture sampling height in 1..65535 pixelsshade- whether directional shading is enabledface- non-null source-face orientation, or UNSPECIFIED
-
-
Method Details
-
positions
public float[] positions()Returns nine copied XYZ values, one triplet per local-space vertex. -
uvs
public float[] uvs()Returns six copied UV values, one pair per vertex. -
normal
public float[] normal()Returns a copied three-component normal. -
material
Returns immutable material and texture evidence. -
tintIndex
public int tintIndex()Returns the source tint index, or -1 when no tint index is supplied. -
sampleWidth
public int sampleWidth()Returns texture sampling width in pixels. -
sampleHeight
public int sampleHeight()Returns texture sampling height in pixels. -
shade
public boolean shade()Returns whether directional shading is enabled. -
face
Returns the retained source-face orientation, or UNSPECIFIED.
-