|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sunflow.core.LightSample
public class LightSample
Represents a sample taken from a light source that faces a point being shaded.
Constructor Summary | |
---|---|
LightSample()
Creates a new light sample object (invalid by default). |
Method Summary | |
---|---|
float |
dot(Vector3 v)
Compute a dot product between the current shadow ray direction and the specified vector. |
Color |
getDiffuseRadiance()
Get diffuse radiance. |
Ray |
getShadowRay()
Get the sample's shadow ray. |
Color |
getSpecularRadiance()
Get specular radiance. |
void |
setRadiance(Color d,
Color s)
Set the diffuse and specular radiance emitted by the current light source. |
void |
setShadowRay(Ray shadowRay)
Set the current shadow ray. |
void |
traceShadow(ShadingState state)
Trace the shadow ray, attenuating the sample's color by the opacity of intersected objects. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LightSample()
Method Detail |
---|
public void setShadowRay(Ray shadowRay)
shadowRay
- shadow ray from the point being shaded towards the lightpublic final void traceShadow(ShadingState state)
state
- shading state representing the point to be shadedpublic Ray getShadowRay()
public Color getDiffuseRadiance()
public Color getSpecularRadiance()
public void setRadiance(Color d, Color s)
d
- diffuse radiances
- specular radiancepublic float dot(Vector3 v)
v
- direction vector
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |