

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object javax.vecmath.Tuple3d de.grogra.ray.physics.Spectrum3d
public class Spectrum3d
This class implements a spectrum which is represented by three
double
values which are interpreted as the red,
green and blue part of the spectrum. Specta of this class are
compatible with each other and with spectra
of class Spectrum3f
.
Field Summary 

Fields inherited from class javax.vecmath.Tuple3d 

x, y, z 
Constructor Summary  

Spectrum3d()


Spectrum3d(double x,
double y,
double z)

Method Summary  

void 
add(Spectrum s)
Adds the function spec to this function. 
void 
clampMinZero()

Spectrum3d 
clone()
Returns a clone of this spectrum. 
void 
div(Spectrum s)
Performs an componentwise division of this spectrum by spec . 
void 
div(Tuple3d t)
Performs a pointwise division of this spectrum by the given RGB spectum factor . 
void 
div(Tuple3f t)
Performs a pointwise division of this spectrum by the given RGB spectum factor . 
void 
dot(Spectrum s,
Tuple3d out)
Computes the scalar product of this spectrum with spec ,
i.e., the integral of the pointwise product of both spectra over all
frequencies. 
double 
evaluateDouble(double nu)
Evaluates the spectrum at frequency nu
(measured in Hz). 
void 
get(Tuple3f out)
Computes the RGB spectrum color for this
spectrum. 
double 
getMax()

double 
integrate()
Returns the integral over all frequencies of this spectrum. 
void 
mul(Spectrum s)
Performs an componentwise multiplication of this spectrum by spec . 
void 
mul(Tuple3d t)
Performs a pointwise multiplication of this spectrum by the given RGB spectum factor . 
void 
mul(Tuple3f t)
Performs a pointwise multiplication of this spectrum by the given RGB spectum factor . 
Spectrum3d 
newInstance()
Returns a new instance of the class of this spectrum. 
void 
set(Spectrum s)
Sets this spectrum to spec . 
void 
setIdentity()
Sets this spectrum to the identity, i.e., its value is 1 everywhere. 
void 
setZero()
Sets this spectrum to the zero function. 
void 
sub(Spectrum s)
Subtracts the function spec from this function. 
double 
sum()
Computes the spectrum sum 
Methods inherited from class javax.vecmath.Tuple3d 

absolute, absolute, add, add, clamp, clamp, clampMax, clampMax, clampMin, clampMin, epsilonEquals, equals, equals, get, get, hashCode, interpolate, interpolate, max, min, negate, negate, scale, scale, scaleAdd, scaleAdd, set, set, set, set, sub, sub, toString 
Methods inherited from class java.lang.Object 

finalize, getClass, notify, notifyAll, wait, wait, wait 
Methods inherited from interface de.grogra.ray.physics.Spectrum 

get, scale, set, set 
Constructor Detail 

public Spectrum3d()
public Spectrum3d(double x, double y, double z)
Method Detail 

public void add(Spectrum s)
Spectrum
spec
to this function.
spec
has to
be compatible with this spectrum (usually this means that it has
to be of the same class).
add
in interface Spectrum
s
 the spectrum to addpublic void clampMinZero()
clampMinZero
in interface Spectrum
public Spectrum3d clone()
Spectrum
clone
in interface Spectrum
clone
in class Tuple3d
public void div(Spectrum s)
Spectrum
spec
. spec
has to
be compatible with this spectrum (usually this means that it has
to be of the same class). The result of each component is stored
in this spectrum.
Note that a factor with 0 causes a ArithmeticException
div
in interface Spectrum
s
 the spectrum to divide withpublic void div(Tuple3d t)
Spectrum
factor
.
Note that a factor with 0 causes a ArithmeticException
div
in interface Spectrum
t
 the divisorpublic void div(Tuple3f t)
Spectrum
factor
.
Note that a factor with 0 causes a ArithmeticException
div
in interface Spectrum
t
 the divisorpublic void dot(Spectrum s, Tuple3d out)
Spectrum
spec
,
i.e., the integral of the pointwise product of both spectra over all
frequencies. The integration is split into three parts: The first part
ranges over the red part of the spectrum, its result is stored in
out.x
. The second part ranges over the green part of the
spectrum and is stored in out.y
, the third part ranges
over the blue part and is stored in out.z
.
dot
in interface Spectrum
s
 another spectrumout
 result of dot product, split into three integration domainspublic double evaluateDouble(double nu)
Spectrum
nu
(measured in Hz).
evaluateDouble
in interface Spectrum
evaluateDouble
in interface DoubleToDouble
nu
 frequency in Hz
nu
public void get(Tuple3f out)
Spectrum
color
for this
spectrum.
get
in interface Spectrum
out
 RGB spectrum will be placed in herepublic double getMax()
getMax
in interface Spectrum
public double integrate()
Spectrum
integrate
in interface Spectrum
public void mul(Spectrum s)
Spectrum
spec
. spec
has to
be compatible with this spectrum (usually this means that it has
to be of the same class). The result of each component is stored
in this spectrum.
mul
in interface Spectrum
s
 the spectrum to multiply withpublic void mul(Tuple3d t)
Spectrum
factor
.
mul
in interface Spectrum
t
 the multiplicatorpublic void mul(Tuple3f t)
Spectrum
factor
.
mul
in interface Spectrum
t
 the multiplicatorpublic Spectrum3d newInstance()
Spectrum
newInstance
in interface Spectrum
public void set(Spectrum s)
Spectrum
spec
. spec
has to
be compatible with this spectrum (usually this means that it has
to be of the same class).
set
in interface Spectrum
s
 another spectrumpublic void setIdentity()
Spectrum
setIdentity
in interface Spectrum
public void setZero()
Spectrum
setZero
in interface Spectrum
public void sub(Spectrum s)
Spectrum
spec
from this function.
spec
has to
be compatible with this spectrum (usually this means that it has
to be of the same class).
sub
in interface Spectrum
s
 the spectrum to subtractpublic double sum()
Spectrum
sum
in interface Spectrum


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 