Table 6.33—DRM_Base_Positional_Light

Property

Description

Superclass

·         <DRM Light Source>

Class

·         <DRM Base Positional Light>

Subclass

·         <DRM Positional Light>

·          <DRM Spot Light>

Definition

An instance of one of the concrete subclasses of this abstract DRM class is a <DRM Light Source> that radiates in all directions from a specified point in 3D space with a sphere of influence centred at that point, the radius of which is specified by the value of the radius field.

Only objects that are within the sphere of influence of a <DRM Base Positional Light> instance (that is, an instance of one of its concrete subclasses) can be affected by that <DRM Base Positional Light>. Specific subclasses may further restrict the zone of influence to only a portion of the sphere.

The degree to which an object is affected in the zone of influence depends on the attenuation of the <DRM Base Positional Light>, which depends on the values of its attenuation factor fields. If attenuation is not specified (that is, when constant_attenuation_factor has value 1.0, linear_attenuation_factor = 0.0, and quadratic_attenuation_factor = 0.0), the light ends abruptly at the edge of the sphere of influence. Otherwise, the light intensity components (ambient, diffuse, and specular) are attenuated by the reciprocal of the attenuation quadratic (a + bd + cd**2), where a, b, c are the attenuation factor field values as noted in their footnotes, and d is the distance from the position of the <DRM Base Positional Light>.

Consequently, the formula for the final attenuation factor is:

__________________________1__________________________
 (constant_attenuation_factor +
   (distance × linear_attenuation_factor) +
   (distance_squared × quadratic_attenuation_factor))

Example(s)

·         See subclasses for examples.

Inherited field elements

field_name

range

Field_Data_Type

apply_to_children1

 

Boolean

override_positional_lights2

 

Boolean

override_infinite_lights3

 

Boolean

active_light_value4

 

Boolean

Field elements

field_name

range

Field_Data_Type

radius5

> 0.0

Float

constant_attenuation_factor6

 

Long_Float

linear_attenuation_factor7

 

Long_Float

quadratic_attenuation_factor8

 

Long_Float

Associated to (one-way) (inherited)

·         none

Associated to (one-way)

·         none

Associated by (one-way) (inherited)

·         none

Associated by (one-way)

·         none

Associated with (two-way) (inherited)

·         none

Associated with (two-way)

·         none

Composed of (two-way) (inherited)

·         one <DRM Ambient Colour>

·         one <DRM Diffuse Colour>

·         zero or one <DRM Light Source Control Link>

·         one <DRM Specular Colour>

Composed of (two-way)

·         one <DRM Location_3D>9

Composed of (two-way metadata) (inherited)

·         none

Composed of (two-way metadata)

·         none

Component of (inherited)

·         one or more <DRM Aggregate Geometry>s

Component of

·         none

Constraints

·         none

Notes

1Flag 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.

2Flag to reset the current cumulative definition of local <DRM Light_Source>s If override_positional_lights is TRUE, all positional light sources in the current scope are cleared.

3Flag to reset the current cumulative definition of <DRM Infinite Light Source>s. If override_infinite_lights is TRUE, all infintie light sources in the current scope are cleared.

4This is the default/active state of the light, indicating whether it is on (TRUE) or off.

5The radius, which is specified in metres, and which, with the <DRM Location 3D> component, defines the zone of influence of this <DRM Light Source>.

6This is the constant 'a' in the attenuation quadratic (a + bd + cd2).

7This is the constant 'b' in the attenuation quadratic (a + bd + cd2).

8This is the constant 'c' in the attenuation quadratic (a + bd + cd2).

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

Class diagram

<DRM Base Positional Light>