- All Superinterfaces:
Emitter
,Scattering
- All Known Subinterfaces:
Light
- All Known Implementing Classes:
AmbientLight
,DirectionalLight
,LightBase
,Parallelogram
,PhysicalLight
,PointLight
,Sky
,SpectralLight
,SpotLight
,SunSkyLight
,SunSkyToDirectionalLightWrapper
A
Light
instance represents a light source.
The interface specializes the common methods of the Emitter
interface for light sources.- Author:
- Ole Kniemeyer
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
This return value forgetLightType()
indicates an ambient light.static final int
This return value forgetLightType()
indicates an area light.static final int
This return value forgetLightType()
indicates a directional light.static final int
This return value forgetLightType()
indicates that this light should actually be ignored.static final int
This return value forgetLightType()
indicates a point light, i.e., a light source whose rays emanate from a single point.static final int
This return value forgetLightType()
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
Modifier and TypeMethodDescriptionint
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 byenv.bounds
.boolean
Determines whether the light source shall be ignored when a shot ray happens to hit the geometry of the light source.boolean
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 Details
-
NO_LIGHT
static final int NO_LIGHTThis return value forgetLightType()
indicates that this light should actually be ignored.- See Also:
-
POINT
static final int POINTThis return value forgetLightType()
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.- See Also:
-
AREA
static final int AREAThis return value forgetLightType()
indicates an area light.- See Also:
-
DIRECTIONAL
static final int DIRECTIONALThis return value forgetLightType()
indicates a directional light.- See Also:
-
SKY
static final int SKYThis return value forgetLightType()
indicates a sky light.- See Also:
-
AMBIENT
static final int AMBIENTThis return value forgetLightType()
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.- See Also:
-
-
Method Details
-
getLightType
int getLightType()Determines the type of light source which is represented by this light. -
isShadowless
boolean isShadowless()Determines whether the light source casts shadows or not.- Returns:
true
iff the light source does not cast shadows
-
isIgnoredWhenHit
boolean isIgnoredWhenHit()Determines whether the light source shall be ignored when a shot ray happens to hit the geometry of the light source.- Returns:
true
iff the light source shall be ignored
-
getTotalPower
Computes the total power of this light source which is emitted to the region defined byenv.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.- Parameters:
env
- environment which defines the bounds of the scene- Returns:
- total power emitted to the region
env.bounds
-