cz.cuni.jagrlib.iface
Interface LightMap

All Known Implementing Classes:
PhotonMap

public interface LightMap

General interface for light storing. It can recieve light as a photon, ray, pencils or radiosity. Also it can compute illumination at some point (in some direction or all-directional) or at some element.

Since:
0.26

Method Summary
 void addPencil(double[] center, double[][] dir, float[] radiance, double distance)
          Add single pencil.
 void addPhoton(double[] origin, double[] dir, float[] power)
          Add single photon.
 void addRadiosity(int handle, float[] amount)
          Add single contribution of energy to the some element.
 void addRays(double[] origin, double[] dir)
          Add single ray.
 int getNumberElements()
          Returns number of saved elements.
 int getNumberPencils()
          Returns number of saved pencils.
 int getNumberPhotons()
          Returns number of saved photons.
 int getNumberRays()
          Returns number of saved rays.
 double[] irradiance(double[] position, double[] normal, double[] irrad)
          Computes irradiance at some point.
 boolean isFull()
          Is light map full?
 double[] radiance(double[] position, double[] dir, double[] rad)
          Computes irradiance at some point.
 float[] radiosity(int handle)
          Computes the radiosity of the single element.
 void scalePhotonPower(float scale)
          Scales the power of all photons in the once they have been emitted from the light source.
 

Method Detail

addPhoton

void addPhoton(double[] origin,
               double[] dir,
               float[] power)
Add single photon.


addRays

void addRays(double[] origin,
             double[] dir)
Add single ray.


addPencil

void addPencil(double[] center,
               double[][] dir,
               float[] radiance,
               double distance)
Add single pencil.


addRadiosity

void addRadiosity(int handle,
                  float[] amount)
Add single contribution of energy to the some element.


scalePhotonPower

void scalePhotonPower(float scale)
Scales the power of all photons in the once they have been emitted from the light source.


radiance

double[] radiance(double[] position,
                  double[] dir,
                  double[] rad)
Computes irradiance at some point.

Parameters:
position - Position of point in which is irradiance computing.
direction -
rad - Pre-allocated array to hold resulting irradiance.
Returns:
Resulting irradiance.

irradiance

double[] irradiance(double[] position,
                    double[] normal,
                    double[] irrad)
Computes irradiance at some point.

Parameters:
position - Position of point in which is irradiance computing.
irrad - Pre-allocated array to hold resulting irradiance.
Returns:
Resulting irradiance.

radiosity

float[] radiosity(int handle)
Computes the radiosity of the single element.


getNumberPhotons

int getNumberPhotons()
Returns number of saved photons.


getNumberRays

int getNumberRays()
Returns number of saved rays.


getNumberPencils

int getNumberPencils()
Returns number of saved pencils.


getNumberElements

int getNumberElements()
Returns number of saved elements.


isFull

boolean isFull()
Is light map full?