public interface LightSource extends RenderObject
|Modifier and Type||Method and Description|
Get the maximum number of samples that can be taken from this light source.
Gets a photon to emit from this light source by setting each of the arguments.
Get the total power emitted by this light source.
Samples the light source to compute direct illumination.
void getSamples(ShadingState state)
LightSampleclass and added to the current
ShadingState. This method is responsible for the shooting of shadow rays which allows for non-physical lights that don't cast shadows. It is recommended that only a single shadow ray be shot if
ShadingState.getDiffuseDepth()is greater than 0. This avoids an exponential number of shadow rays from being traced.
state- current state, including point to be shaded
void getPhoton(double randX1, double randY1, double randX2, double randY2, Point3 p, Vector3 dir, Color power)
randX1- sampling parameter
randY1- sampling parameter
randX2- sampling parameter
randY2- sampling parameter
p- position to shoot the photon from
dir- direction to shoot the photon in
power- power of the photon