de.grogra.ray.physics
public interface Light extends Emitter
Light instance represents a light source.
The interface specializes the common methods of the Emitter
interface for light sources.| Modifier and Type | Field and Description |
|---|---|
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. |
DELTA_FACTOR, IS_NON_OPAQUE, MIN_UNUSED_FLAG, NEEDS_NORMAL, NEEDS_POINT, NEEDS_TANGENTS, NEEDS_TRANSFORMATION, NEEDS_UV, RANDOM_RAYS_GENERATE_ORIGINS| Modifier and Type | Method and Description |
|---|---|
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.
|
completeRay, computeExitance, generateRandomOriginscomputeBSDF, generateRandomRays, getAverageColor, getFlagsstatic 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.int getLightType()
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 sceneenv.boundsboolean isIgnoredWhenHit()
true iff the light source shall be ignoredboolean isShadowless()
true iff the light source does not cast shadows