Class Name: Positional Light

Superclass - Light Source

Subclasses

Definition

A type of Light Source that radiates in all directions from a specified point in 3D space.

Positional Light specifies a sphere of influence; only objects that are within this sphere can be affected. In addition, as with all Light Sources, only Primitive Geometry that are below the Aggregate Geometry that a Light Source is attached to will be affected if the apply_to_children field is true.

A Positional Light also has attenuation factor fields, used to calculate the attenuation based on distance from the light. Light intensity components (ambient, diffuse, and specular) are attenuated by the reciprocal of the attenuation quadratic (a + bd + cd**2), i.e., the formula for the final attenuation factor is:

                                       1
       --------------------------------------------------------------
       [ constant_attenuation_factor +
            (distance * linear_attenuation_factor) +
                ((distance squared) * quadratic_attenuation_factor) ]
If attenuation is not provided then the default factors (a=1.0, b=0.0, c=0.0) are assumed, resulting in no attenuation; the light ends abruptly at the edge of the sphere of influence.

Primary Page in DRM Diagram:

Example

  1. The ambient light inside a room.

FAQs

--FAQs needed here --

Constraints

None.

Composed of (one-way)(inherited)

Composed of (one-way)

Composed of (two-way)(inherited)

Component of (two-way)(inherited)

Inherited Field Elements

SE_BOOLEAN apply_to_children; (notes)
SE_BOOLEAN override_positional_lights; (notes)
SE_BOOLEAN override_infinite_lights; (notes)
SE_BOOLEAN active_light_value; (notes)

Field Elements

SE_FLOAT32 radius; (notes)
SE_FLOAT64 constant_attenuation_factor; (notes)
SE_FLOAT64 linear_attenuation_factor; (notes)
SE_FLOAT64 quadratic_attenuation_factor; (notes)

Notes

Composed of Notes

Location_3D

 3D position in 3 space.
 This will be affected by hierarchical transformations.

Fields Notes

apply_to_children

 Flag to allow lights to limit their scope to only affecting their children.
 If apply_to_children is False then the light is assumed to apply globally.

override_positional_lights

 Flag to reset the current cumulative definition of local Light_Sources
 If override_positional_lights is True then all Positional Light
 Sources in the current scope are cleared.

override_infinite_lights

 Flag to reset the current cumulative definition of Infinite Light_Sources.
 If override_infinite_lights is True then all Positional Light Sources in
 the current scope are cleared.

active_light_value

 SE_TRUE = on, SE_FALSE = off
 this is the default/active state of the light

radius

 (in meters)
 The radius and position define the sphere of influence.
 This will be affected by hierarchical transformations.

constant_attenuation_factor

 Constant 'a' in the attenuation quadratic (a + bd + cd**2)

linear_attenuation_factor

 Constant 'b' in the attenuation quadratic (a + bd + cd**2)

quadratic_attenuation_factor

 Constant 'c' in the attenuation quadratic (a + bd + cd**2)

Prev: Polygon Control Link. Next: Predefined Function. Up:Index.