|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Spectrum
This interface represents a spectrum, i.e., a function f(ν) of frequency ν of a wave.
Method Summary | |
---|---|
void |
add(Spectrum spec)
Adds the function spec to this function. |
void |
clampMinZero()
|
Spectrum |
clone()
Returns a clone of this spectrum. |
void |
div(Spectrum factor)
Performs an componentwise division of this spectrum by spec . |
void |
div(Tuple3d factor)
Performs a pointwise division of this spectrum by the given RGB spectum factor . |
void |
div(Tuple3f factor)
Performs a pointwise division of this spectrum by the given RGB spectum factor . |
void |
dot(Spectrum spec,
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(Tuple3d color)
Computes the RGB spectrum color for this
spectrum. |
void |
get(Tuple3f color)
Computes the RGB spectrum color for this
spectrum. |
double |
getMax()
|
double |
integrate()
Returns the integral over all frequencies of this spectrum. |
void |
mul(Spectrum factor)
Performs an componentwise multiplication of this spectrum by spec . |
void |
mul(Tuple3d factor)
Performs a pointwise multiplication of this spectrum by the given RGB spectum factor . |
void |
mul(Tuple3f factor)
Performs a pointwise multiplication of this spectrum by the given RGB spectum factor . |
Spectrum |
newInstance()
Returns a new instance of the class of this spectrum. |
void |
scale(double factor)
Scales this spectrum by the given factor . |
void |
set(Spectrum spec)
Sets this spectrum to spec . |
void |
set(Tuple3d color)
Sets this spectrum to the spectrum of the specified RGB color . |
void |
set(Tuple3f color)
Sets this spectrum to the spectrum of the specified RGB color . |
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 spec)
Subtracts the function spec from this function. |
double |
sum()
Computes the spectrum sum |
Method Detail |
---|
void add(Spectrum spec)
spec
to this function.
spec
has to
be compatible with this spectrum (usually this means that it has
to be of the same class).
spec
- the spectrum to addvoid clampMinZero()
Spectrum clone()
void div(Spectrum factor)
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
factor
- the spectrum to divide withvoid div(Tuple3d factor)
factor
.
Note that a factor with 0 causes a ArithmeticException
factor
- the divisorvoid div(Tuple3f factor)
factor
.
Note that a factor with 0 causes a ArithmeticException
factor
- the divisorvoid dot(Spectrum spec, Tuple3d out)
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
.
spec
- another spectrumout
- result of dot product, split into three integration domainsdouble evaluateDouble(double nu)
nu
(measured in Hz).
evaluateDouble
in interface DoubleToDouble
nu
- frequency in Hz
nu
void get(Tuple3d color)
color
for this
spectrum.
color
- RGB spectrum will be placed in herevoid get(Tuple3f color)
color
for this
spectrum.
color
- RGB spectrum will be placed in heredouble getMax()
double integrate()
void mul(Spectrum factor)
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.
factor
- the spectrum to multiply withvoid mul(Tuple3d factor)
factor
.
factor
- the multiplicatorvoid mul(Tuple3f factor)
factor
.
factor
- the multiplicatorSpectrum newInstance()
void scale(double factor)
factor
.
factor
- scaling factorvoid set(Spectrum spec)
spec
. spec
has to
be compatible with this spectrum (usually this means that it has
to be of the same class).
spec
- another spectrumvoid set(Tuple3d color)
color
.
color
- RGB colorvoid set(Tuple3f color)
color
.
color
- RGB colorvoid setIdentity()
void setZero()
void sub(Spectrum spec)
spec
from this function.
spec
has to
be compatible with this spectrum (usually this means that it has
to be of the same class).
spec
- the spectrum to subtractdouble sum()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |