Class ObjMaterial

java.lang.Object
eu.svjatoslav.aukio.e3d.renderer.raster.shapes.composite.obj.ObjMaterial

public class ObjMaterial extends Object
A single material from a Wavefront MTL library.

Only the subset of MTL attributes relevant to the rasterizer is captured: diffuse color (Kd) and opacity (d, or Tr transparency) — combined into the engine's Color (alpha 255 = opaque, lower = translucent). Specular/ambient/texture-map attributes (Ks, Ka, Ns, illum, map_*) are parsed past and ignored.

  • Field Details

    • DEFAULT

      public static final ObjMaterial DEFAULT
      Fallback material for faces whose usemtl is unknown or missing.
  • Constructor Details

    • ObjMaterial

      public ObjMaterial(String name, Color color)
  • Method Details

    • getName

      public String getName()
      Material name from the newmtl statement.
    • getColor

      public Color getColor()
      Diffuse color (Kd) with alpha taken from d (1.0 → alpha 255 opaque, lower values → translucent).