de.grogra.imp3d.objects
public class SpotLight extends PointLight implements Raytraceable
innerAngle have a maximal intensity, the intensity falls
off to zero when the angle reaches outerAngle. The fall-off
is governed by a cubic spline: Let
outerAngle)
/ (cos innerAngle - cos outerAngle)
| Modifier and Type | Class and Description |
|---|---|
static class |
SpotLight.Type |
| Modifier and Type | Field and Description |
|---|---|
static SpotLight.Type |
$TYPE |
static SCOType.Field |
innerAngle$FIELD |
static SCOType.Field |
outerAngle$FIELD |
attenuationDistance$FIELD, attenuationExponent$FIELD, power$FIELDcolor$FIELD, numberofrays, numberofrays$FIELD, raylength, raylength$FIELD, shadowless$FIELD, visualize, visualize$FIELDAMBIENT, AREA, DIRECTIONAL, NO_LIGHT, POINT, SKYDELTA_FACTOR, IS_NON_OPAQUE, MIN_UNUSED_FLAG, NEEDS_NORMAL, NEEDS_POINT, NEEDS_TANGENTS, NEEDS_TRANSFORMATION, NEEDS_UV, RANDOM_RAYS_GENERATE_ORIGINS| Constructor and Description |
|---|
SpotLight() |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(LightVisitor visitor) |
RaytracerLeaf |
createRaytracerLeaf(java.lang.Object object,
boolean asNode,
long pathId,
GraphState gs) |
protected void |
draw(Tuple3f color,
RenderState rs) |
void |
generateRandomRays(Environment env,
Vector3f out,
Spectrum specOut,
RayList rays,
boolean photon,
java.util.Random rnd)
Pseudorandomly generates, for the given input,
a set of scattered rays.
|
protected float |
getDensityAt(Vector3f direction) |
float |
getInnerAngle() |
ManageableType |
getManageableType() |
float |
getOuterAngle() |
void |
setInnerAngle(float value) |
void |
setOuterAngle(float value) |
computeBSDF, computeExitance, generateRandomOrigins, getAttenuationDistance, getAttenuationExponent, getLightType, getPower, getTotalPower, setAttenuationDistance, setAttenuationExponent, setPowercompleteRay, getAverageColor, getColor, getFlags, getNumberofrays, getRaylength, isIgnoredWhenHit, isShadowless, isVisualize, resolveLight, setNumberofrays, setRaylength, setShadowless, setVisualizeaddReference, appendReferencesTo, fieldModified, getProvider, getStamp, initProvider, manageableReadResolve, manageableWriteReplace, removeReferencepublic static final SpotLight.Type $TYPE
public static final SCOType.Field innerAngle$FIELD
public static final SCOType.Field outerAngle$FIELD
public void accept(LightVisitor visitor)
accept in class PointLightpublic RaytracerLeaf createRaytracerLeaf(java.lang.Object object, boolean asNode, long pathId, GraphState gs)
createRaytracerLeaf in interface RaytraceablecreateRaytracerLeaf in class PointLightprotected void draw(Tuple3f color, RenderState rs)
draw in class PointLightpublic void generateRandomRays(Environment env, Vector3f out, Spectrum specOut, RayList rays, boolean photon, java.util.Random rnd)
Scatteringadjoint is false,
out = ωo describes
the direction of an outgoing light ray.
In this case, the integration is with respect to ωi.
Let g(ω, ν; out, μ)
= BSDF(ω, ν; out, μ)
adjoint is true. In this case,
out = ωi describes
the direction of an outgoing importance ray (an inverse light ray).
Now the integration is with respect to ωo.
Let g(ω, ν; out, μ)
= BSDF(out, μ; ω, ν)
rays.size). Then, for every
frequency ν the sum
out, μ)
specOut(μ) dμ dω
If this Scattering instance is in fact a
Light source, adjoint is true,
and the BSDF is defined as BSDF(out, μ; ω, ν)
= L1(ω, ν) δ(μ - ν),
i.e., the directional distribution
of the emitted radiance at env.point, see Emitter.
In this case, out is not used.
If this Scattering instance is in fact a
Sensor, adjoint is false,
and the BSDF is defined as BSDF(ω, ν; out, μ)
= W1(ω, ν) δ(μ - ν),
i.e., the directional distribution
of the emitted importance at env.point, see Emitter.
In this case, out is not used.
Let pω be the probability density
used for the ray direction (measured with respect to
solid angle ω),
then the field directionDensity of the ray i
is set to pω(di).
For ideal specular reflection or transmission, or for directional
lights or sensors, pω is not
a regular function, the value directionDensity will
be set to a multiple of Scattering.DELTA_FACTOR.
The ray properties which are not mentioned in the given formulas are neither used nor modified. These are the origin and its density.
generateRandomRays in interface ScatteringgenerateRandomRays in class PointLightenv - the environment for scatteringout - the direction unit vector of the outgoing ray
(i.e., pointing away from the surface)specOut - the spectrum of the outgoing rayrays - the rays to be generatedphoton - represents out a light ray or an importance ray?rnd - pseudorandom generatorScattering.computeBSDF(de.grogra.ray.physics.Environment, javax.vecmath.Vector3f, de.grogra.ray.physics.Spectrum, javax.vecmath.Vector3f, boolean, de.grogra.ray.physics.Spectrum)protected float getDensityAt(Vector3f direction)
getDensityAt in class PointLightpublic float getInnerAngle()
public ManageableType getManageableType()
getManageableType in interface ManageablegetManageableType in class PointLightpublic float getOuterAngle()
public void setInnerAngle(float value)
public void setOuterAngle(float value)