|
JPBRT 0.5 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jpbrt.core.Light
org.jpbrt.lights.DistantLight
public class DistantLight
DistantLight
.
References:
M. Pharr, G. Humphreys. (2004). Physically Based Rendering. Morgan Kaufmann.
Field Summary |
---|
Fields inherited from class org.jpbrt.core.Light |
---|
lightToWorld, nSamples, worldToLight |
Constructor Summary | |
---|---|
DistantLight(Transform l2w,
Spectrum radiance,
Vector dir)
|
Method Summary | |
---|---|
boolean |
isDeltaLight()
Indicates whether the light is described by a delta distribution. |
float |
pdf(Point p,
Vector wi)
The probability density function PDF describes the relative probability of a random variable taking on a particular value, page 634. |
Spectrum |
power(Scene scene)
Returns the total emitted power of the light into the scene. |
Spectrum |
sampleL(Point p,
float pEpsilon,
LightSample ls,
float time,
Vector wi,
float[] pdf,
VisibilityTester vis)
Returns the incident radiance from the light at a point p and also returns the direction vector wi that gives the direction from which radiance is arriving, assuming that there are no occluding objects between them. |
Spectrum |
sampleL(Scene scene,
LightSample ls,
float u1,
float u2,
float time,
Ray ray,
Normal Ns,
float[] pdf)
|
java.lang.String |
toString()
|
Methods inherited from class org.jpbrt.core.Light |
---|
getNumSamples, Le, SHProject |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DistantLight(Transform l2w, Spectrum radiance, Vector dir)
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public Spectrum sampleL(Point p, float pEpsilon, LightSample ls, float time, Vector wi, float[] pdf, VisibilityTester vis)
Light
For some types of lights (usually area lights), light may arrive at p from many directions. For these types of lights, the sampleL method must randomly sample a poin on the light source's surface, so that Monte Carlo integration can be used to find the reflected light at p due to illumination from the light.
Page 598.
sampleL
in class Light
p
- A point in world coordinates.wi
- Output parameter. A direction vector giving the incident
direction of the light. Pointing from p to a randomly selected point on
the surface of the light source.vis
- Output parameter. The VisibilityTester
is only initialized
if the returned spectrum is not black. The visibility tester must be
traced to verify that there are no occluding objects between the light
source and p.
public Spectrum sampleL(Scene scene, LightSample ls, float u1, float u2, float time, Ray ray, Normal Ns, float[] pdf)
sampleL
in class Light
public Spectrum power(Scene scene)
Light
power
in class Light
public boolean isDeltaLight()
Light
Light.sampleL(org.jpbrt.core.Point, float, org.jpbrt.core.LightSample, float, org.jpbrt.core.Vector, float[], org.jpbrt.core.VisibilityTester)
methods. It is impossible to
randomly choose a direction from a point p that happens to find such
a light source.
isDeltaLight
in class Light
public float pdf(Point p, Vector wi)
Light
pdf
in class Light
|
Copyright 2010 © by the authors and contributors of the JPBRT project. Some rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |