Package primitives

Class Material

java.lang.Object
primitives.Material

public class Material
extends java.lang.Object
This class contains all the configurations which affect how light interacts with some surface.
  • Field Summary

    Fields
    Modifier and Type Field Description
    Factors ambient
    The ambient coefficients of the material
    Factors diffuse
    The diffuse coefficients of the material.
    Colour emission
    The emission light colour of the material.
    Factors reflectivity
    The reflective coefficients of the material.
    double shine
    The shine exponent of the material.
    Factors specular
    The specular coefficients of the material.
    Factors transparency
    The transparency coefficients of the material
  • Constructor Summary

    Constructors
    Constructor Description
    Material​(Colour emission, double shine, Factors ambient, Factors diffuse, Factors specular, Factors reflectivity, Factors transparency)
    Material constructor.
  • Method Summary

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • emission

      public final Colour emission
      The emission light colour of the material.
    • shine

      public final double shine
      The shine exponent of the material.
    • ambient

      public final Factors ambient
      The ambient coefficients of the material
    • diffuse

      public final Factors diffuse
      The diffuse coefficients of the material.
    • specular

      public final Factors specular
      The specular coefficients of the material.
    • reflectivity

      public final Factors reflectivity
      The reflective coefficients of the material.
    • transparency

      public final Factors transparency
      The transparency coefficients of the material
  • Constructor Details

    • Material

      public Material​(Colour emission, double shine, Factors ambient, Factors diffuse, Factors specular, Factors reflectivity, Factors transparency)
      Material constructor.
      Parameters:
      emission - The emission light colour of the material.
      shine - The shine exponent of the material. Should be non-negative.
      ambient - The ambient coefficient of the material. Should be between 0 and 1.
      diffuse - The diffuse coefficient of the material. Should be between 0 and 1.
      specular - The specular coefficient of the material. Should be between 0 and 1.
      reflectivity - The reflectivity coefficient of the material. Should be between 0 and 1.
      transparency - The transparent coefficient of the material. Should be between 0 and 1.