Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.grogra.ray.physics
Interface Collector

All Superinterfaces:
  DoubleToDouble, Spectrum

All Known Implementing Classes:
  Collector3d, Collector3dList, CollectorW3d

    public interface Collector

extends Spectrum

This interface is used to store more information during the computation of the `LightModel`. Its an extension of the `Spectrum` interface, which means, that every Collector - instance can handled as a `Spectrum` instance. Every implementation of this interface is also a certain specialized `Spectrum`.

Author:
  Stephan Rogge

Method Summary
`void` | `add(Collector collector)` This method combines to collectors to one single collector by add every corresponding value.
`void` | `addToStatistic(Tuple3d tuple, Spectrum spectrum, double scaleFactor, boolean isPrimary)` Here the information of `LightModel` computation are stored.
`Collector` | `clone()` Returns a clone of this collector.
`void` | `getCollectedValues(Tuple3d sumDir, Tuple3d sumSquareDir, Tuple3d sumSpec, Tuple3d sumSquareSpec)`
`void` | `getDirectionArithmeticMean(Tuple3d tuple)` Set the arithmetic mean of all directions (not normalized) to `vector`.
`void` | `getDirectionVariance(Tuple3d tuple)` This methods returns the variance of the light-direction (not normalized).
`long` | `getRayCount()` Returns the number of rays, which hits the corresponding object.
`void` | `getSpectrumArithmeticMean(Spectrum spectrum)` Set the arithmetic mean of all spectra to `vector`.
`void` | `getSpectrumVariance(Spectrum spectrum)` This methods returns the variance of the spectra.
`boolean` | `isCollector()` Return the state if this instance working as Collector or just as an `Spectrum`.
`Collector` | `newInstance()` Returns a new instance of the class of this collector.
`void` | `setAsCollector()` The collector works like a `Spectrum` after initializing.

Methods inherited from interface de.grogra.ray.physics.Spectrum
`add, clampMinZero, div, div, div, dot, evaluateDouble, get, get, getMax, integrate, mul, mul, mul, scale, set, set, set, setIdentity, setZero, sub, sum`

Method Detail

### add

    void add(Collector collector)

  This method combines to collectors to one single collector by add every corresponding value.

  Parameters:
    `collector` - which has to be added to the corresponding instance.

### addToStatistic

    void addToStatistic(Tuple3d tuple,
                        Spectrum spectrum,
                        double scaleFactor,
                        boolean isPrimary)

  Here the information of `LightModel` computation are stored.

  Parameters:
    `tuple` - May this contains a certain vector (direction for example).
    `spectrum` - To added `Spectrum`.
    `scaleFactor` - For the added `Spectrum`.
    `isPrimary` - To distinguish from primary or secondary rays.

### clone

    Collector clone()

  Returns a clone of this collector.

  Specified by:
    `clone` in interface `Spectrum`
  Returns:
    clone of this collector

### getCollectedValues

    void getCollectedValues(Tuple3d sumDir,
                            Tuple3d sumSquareDir,
                            Tuple3d sumSpec,
                            Tuple3d sumSquareSpec)

### getDirectionArithmeticMean

    void getDirectionArithmeticMean(Tuple3d tuple)

  Set the arithmetic mean of all directions (not normalized) to `vector`. The parameter `vector` should be initialized before.

  Parameters:
    `vector` - Returns the arithmetic mean of all direction for this Collector-instance.

### getDirectionVariance

    void getDirectionVariance(Tuple3d tuple)

  This methods returns the variance of the light-direction (not normalized). The calculation for this is: sigma^2 = 1/N * ((sum of all directions^2) - (N * x^2)) N ... The number of rays x ... The arithmetic mean of all direction To get the standard deviation, just extract the root of the variance. For more information see .

### getRayCount

    long getRayCount()

  Returns the number of rays, which hits the corresponding object.

  Returns:
    Number of rays.

### getSpectrumArithmeticMean

    void getSpectrumArithmeticMean(Spectrum spectrum)

  Set the arithmetic mean of all spectra to `vector`. The parameter `vector` should be initialized before.

  Parameters:
    `vector` - Returns the arithmetic mean of all spectra for this Collector-instance.

### getSpectrumVariance

    void getSpectrumVariance(Spectrum spectrum)

  This methods returns the variance of the spectra. The calculation for this is: sigma^2 = 1/N * ((sum of all spectra^2) - (N * x^2)) N ... The number of rays x ... The arithmetic mean of all spectra To get the standard deviation, just extract the root of the variance. For more information see .

### isCollector

    boolean isCollector()

  Return the state if this instance working as Collector or just as an `Spectrum`.

  Returns:

### newInstance

    Collector newInstance()

  Returns a new instance of the class of this collector. It is initialized to the zero function.

  Specified by:
    `newInstance` in interface `Spectrum`
  Returns:
    new instance of same class

### setAsCollector

    void setAsCollector()

  The collector works like a `Spectrum` after initializing. Thats useful when this Collector-instance is used for the calculations in `LightModel`.

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD