cz.cuni.jagrlib
Class PhongMaterial

java.lang.Object
  extended by cz.cuni.jagrlib.DefaultProperty
      extended by cz.cuni.jagrlib.PhongMaterial
All Implemented Interfaces:
Property

public class PhongMaterial
extends DefaultProperty

Material object for Phong shading model (with constant or Schlick K() term).

Since:
0.12
Version:
0.26 $Rev: 476 $ $Date: 2007-06-03 03:11:16 +0200 (ne, 03 VI 2007) $ $Author: pepca $
See Also:
PhongMaterial.java

Field Summary
 double[] color
          Actual color (set by LightModel.setColor(double[], cz.cuni.jagrlib.iface.Property)).
 double cosTotal
          Limit cos-value for total reflection.
 int h
          Specular reflection exponent.
 double ka
          Ambient-light coefficient.
 double kd
          Diffuse reflection coefficient.
 double ks
          Specular reflection coefficient.
 double kt
          Transmission (refraction) coefficient.
 double n
          Relative index of refraction.
 double[] origColor
          Original color of the solid surface.
 double sch
          Schlick blending coefficient (0.0 .. non-Schlick, 1.0 ..
 
Fields inherited from interface cz.cuni.jagrlib.iface.Property
LOGGING, STATISTICS, TEXT_DESCRIPTION
 
Constructor Summary
PhongMaterial()
          Default constructor.
 
Method Summary
 Object get(String key)
          Gets the given property.
 void set(String key, Object value)
          Sets the given property.
 
Methods inherited from class cz.cuni.jagrlib.DefaultProperty
booleanProperty, booleanProperty, colorDoubleProperty, colorProperty, commit, doubleProperty, doubleProperty, doubleProperty, enumProperty, floatProperty, floatProperty, floatProperty, intProperty, intProperty, intProperty, longProperty, longProperty, longProperty, set, stringProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

origColor

public double[] origColor
Original color of the solid surface.


color

public double[] color
Actual color (set by LightModel.setColor(double[], cz.cuni.jagrlib.iface.Property)).


ka

public double ka
Ambient-light coefficient.


kd

public double kd
Diffuse reflection coefficient.


ks

public double ks
Specular reflection coefficient.


h

public int h
Specular reflection exponent.


kt

public double kt
Transmission (refraction) coefficient.


n

public double n
Relative index of refraction.


cosTotal

public double cosTotal
Limit cos-value for total reflection.


sch

public double sch
Schlick blending coefficient (0.0 .. non-Schlick, 1.0 .. Schlick).

Constructor Detail

PhongMaterial

public PhongMaterial()
Default constructor.

Method Detail

set

public void set(String key,
                Object value)
Sets the given property.

Specified by:
set in interface Property
Overrides:
set in class DefaultProperty
Parameters:
key - Key string.
value - The new value.
See Also:
Property.commit()

get

public Object get(String key)
Gets the given property.

Specified by:
get in interface Property
Overrides:
get in class DefaultProperty
Parameters:
key - Key string.
Returns:
The actual value or null.