raja.shape
Class LocalTexture

java.lang.Object
  |
  +--raja.shape.LocalTexture
All Implemented Interfaces:
Serializable, Writable

public class LocalTexture
extends Object
implements Serializable, Writable

A class to encapsulate the local physical properties of a form's boundary. This class provides methods to get the following local physical properties of a form's boundary: the diffuse (kd), reflection (krl, krg) and transmission (ktl, ktg) coefficients, the reflection power index (ns) and the transmission power index (nt).

See Also:
Texture, TexturedForm, TexturedLocalGeometry, RGB, Serialized Form

Constructor Summary
LocalTexture(double kd, double krl, double krg, double ktl, double ktg, int ns, int nt, RGB color)
           
LocalTexture(double kd, double kr, double kt, int ns, int nt, RGB color)
           
LocalTexture(RGB kd, RGB krg, double krl, RGB ktg, double ktl, int ns, int nt)
           
LocalTexture(RGB kd, RGB kr, RGB kt, int ns, int nt)
           
LocalTexture(RGB kd, RGB krl, RGB krg, RGB ktl, RGB ktg, int ns, int nt)
           
 
Method Summary
static Object build(ObjectReader reader)
          Builds the object LocalTexture from a StreamLexer.
 RGB getKd()
          Returns the diffuse coefficient.
 RGB getKrg()
          Returns the global reflection coefficient.
 RGB getKrl()
          Returns the local reflection coefficient.
 RGB getKtg()
          Returns the global transmission coefficient.
 RGB getKtl()
          Returns the local transmission coefficient.
 int getNs()
          Returns the reflection power index.
 int getNt()
          Returns the transmission power index.
 String toString()
           
 void write(ObjectWriter writer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocalTexture

public LocalTexture(RGB kd,
                    RGB kr,
                    RGB kt,
                    int ns,
                    int nt)

LocalTexture

public LocalTexture(RGB kd,
                    RGB krl,
                    RGB krg,
                    RGB ktl,
                    RGB ktg,
                    int ns,
                    int nt)

LocalTexture

public LocalTexture(RGB kd,
                    RGB krg,
                    double krl,
                    RGB ktg,
                    double ktl,
                    int ns,
                    int nt)

LocalTexture

public LocalTexture(double kd,
                    double krl,
                    double krg,
                    double ktl,
                    double ktg,
                    int ns,
                    int nt,
                    RGB color)

LocalTexture

public LocalTexture(double kd,
                    double kr,
                    double kt,
                    int ns,
                    int nt,
                    RGB color)
Method Detail

build

public static Object build(ObjectReader reader)
                    throws IOException
Builds the object LocalTexture from a StreamLexer.

getKd

public RGB getKd()
Returns the diffuse coefficient.
Returns:
an instance of RGB that is the diffuse coefficient.

getKrl

public RGB getKrl()
Returns the local reflection coefficient.
Returns:
an instance of RGB that is the local reflection coefficient.

getKrg

public RGB getKrg()
Returns the global reflection coefficient.
Returns:
an instance of RGB that is the global reflection coefficient.

getKtl

public RGB getKtl()
Returns the local transmission coefficient.
Returns:
an instance of RGB that is the local transmission coefficient.

getKtg

public RGB getKtg()
Returns the global transmission coefficient.
Returns:
an instance of RGB that is the global transmission coefficient.

getNs

public int getNs()
Returns the reflection power index.

getNt

public int getNt()
Returns the transmission power index.

toString

public String toString()
Overrides:
toString in class Object

write

public void write(ObjectWriter writer)
           throws IOException
Specified by:
write in interface Writable