Class ResolvedTriangle

java.lang.Object
ke.ric.renderer.api.ResolvedTriangle

public final class ResolvedTriangle extends Object
One fully baked engine-neutral triangle.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Optional source-face orientation retained for lighting and culling semantics.
  • Constructor Summary

    Constructors
    Constructor
    Description
    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.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the retained source-face orientation, or UNSPECIFIED.
    Returns immutable material and texture evidence.
    float[]
    Returns a copied three-component normal.
    float[]
    Returns nine copied XYZ values, one triplet per local-space vertex.
    int
    Returns texture sampling height in pixels.
    int
    Returns texture sampling width in pixels.
    boolean
    Returns whether directional shading is enabled.
    int
    Returns the source tint index, or -1 when no tint index is supplied.
    float[]
    uvs()
    Returns six copied UV values, one pair per vertex.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 system
      uvs - six UV values: one pair per vertex
      normal - three normal components
      material - non-null exact texture and alpha behavior
      tintIndex - source tint index, or -1 for none
      sampleWidth - texture sampling width in 1..65535 pixels
      sampleHeight - texture sampling height in 1..65535 pixels
      shade - whether directional shading is enabled
      face - 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

      public ResolvedMaterial 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

      public ResolvedTriangle.Face face()
      Returns the retained source-face orientation, or UNSPECIFIED.