|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Light
A Light
instance represents a light source.
The interface specializes the common methods of the Emitter
interface for light sources.
Field Summary | |
---|---|
static int |
AMBIENT
This return value for getLightType() indicates an
ambient light. |
static int |
AREA
This return value for getLightType() indicates an
area light. |
static int |
DIRECTIONAL
This return value for getLightType() indicates a
directional light. |
static int |
NO_LIGHT
This return value for getLightType() indicates that
this light should actually be ignored. |
static int |
POINT
This return value for getLightType() indicates a
point light, i.e., a light source whose rays emanate from a
single point. |
static int |
SKY
This return value for getLightType() indicates a
sky light. |
Fields inherited from interface de.grogra.ray.physics.Scattering |
---|
DELTA_FACTOR, IS_NON_OPAQUE, MIN_UNUSED_FLAG, NEEDS_NORMAL, NEEDS_POINT, NEEDS_TANGENTS, NEEDS_TRANSFORMATION, NEEDS_UV, RANDOM_RAYS_GENERATE_ORIGINS |
Method Summary | |
---|---|
int |
getLightType()
Determines the type of light source which is represented by this light. |
double |
getTotalPower(Environment env)
Computes the total power of this light source which is emitted to the region defined by env.bounds . |
boolean |
isIgnoredWhenHit()
Determines whether the light source shall be ignored when a shot ray happens to hit the geometry of the light source. |
boolean |
isShadowless()
Determines whether the light source casts shadows or not. |
Methods inherited from interface de.grogra.ray.physics.Emitter |
---|
completeRay, computeExitance, generateRandomOrigins |
Methods inherited from interface de.grogra.ray.physics.Scattering |
---|
computeBSDF, generateRandomRays, getAverageColor, getFlags |
Field Detail |
---|
static final int AMBIENT
getLightType()
indicates an
ambient light. Ambient lights have no physically plausible counterpart
in the real world and, thus, should not be considered in physically
based rendering at all.
static final int AREA
getLightType()
indicates an
area light.
static final int DIRECTIONAL
getLightType()
indicates a
directional light.
static final int NO_LIGHT
getLightType()
indicates that
this light should actually be ignored.
static final int POINT
getLightType()
indicates a
point light, i.e., a light source whose rays emanate from a
single point.
This includes the usual point lights
which radiate equally in all directions, but also more general lights
with a direction-dependent radiant intensity, e.g., spot lights.
static final int SKY
getLightType()
indicates a
sky light.
Method Detail |
---|
int getLightType()
NO_LIGHT
, POINT
, AREA
,
DIRECTIONAL
, SKY
, AMBIENT
.double getTotalPower(Environment env)
env.bounds
. Note that the computed
value is not necessarily exact: It should be used just as a hint, e.g.,
when one of a set of lights has to be chosen randomly on the basis of
their relative power.
env
- environment which defines the bounds of the scene
env.bounds
boolean isIgnoredWhenHit()
true
iff the light source shall be ignoredboolean isShadowless()
true
iff the light source does not cast shadows
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |