Table 6.274—DRM_Spot_Light

Property

Description

Superclass

·         <DRM Base Positional Light>

Class

·         <DRM Spot Light>

Subclass

·         none

Definition

An object of this DRM class specifies a <DRM Base Positional Light> that defines an elliptic cone of influence, whose tip is the specified <DRM Location 3D>. The cone is bounded where it intersects the sphere centred at the tip, whose radius is given by the radius field. This results in a a cone-shaped volume of influence, possibly smashed in one direction. Only objects located within this cone can be affected. In addition, apply_to_children is true, then (as with all <DRM Light Source>s) only <DRM Primitive Geometry> which are below the <DRM Aggregate Geometry> to which the <DRM Spot Light> is attached will be affected.

The intensity drop-off is computed as follows:

Given a point on a ray in the cone at fixed distance D from the cone apex, if:

I0 = intensity on the <DRM Lobe Data> direction axis at distance D
Ah = the horizontal angle of the ray in degrees from direction vector
Av = the vertical angle of the ray in degrees from direction vector

then the intensity I at the point is:

case: 0 < horizontal_drop_off_rate, 0 < vertical_drop_off_rate:

I= I0*(1-|Ah|*horizontal_drop_off_rate)*(1-|Av|*vertical_drop_off_rate)

case: 0 = horizontal_drop_off_rate, 0 < vertical_drop_off_rate:

I= I0*(1-|Av|*vertical_drop_off_rate)

case: 0 < horizontal_drop_off_rate, 0 = vertical_drop_off_rate:

I= I0*(1-|Ah|*horizontal_drop_off_rate)

Example(s)

·         A <DRM Model> of a lighthouse has a <DRM Geometry Model> with a <DRM Union Of Geometry Hierarchy>, to which is attached an <DRM Spot Light> representing the lighthouse's light. The <DRM Spot Light> has a <DRM Light Source Control Link> that turns the light on or off, depending on the time of day and the weather.

·         A headlight that actually emits light could have a <DRM Positional Light> source with a direction located at the light, directed out from the headlight.

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

radius5

 

Float

constant_attenuation_factor6

 

Long_Float

linear_attenuation_factor7

 

Long_Float

quadratic_attenuation_factor8

 

Long_Float

Field elements

field_name

range

Field_Data_Type

horizontal_drop_off_rate9

 

Long_Float

vertical_drop_off_rate10

 

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 Location 3D>11

·         one <DRM Specular Colour

Composed of (two-way)

·         one <DRM Lobe Data>12

Composed of (two-way metadata) (inherited)

·         none

Composed of (two-way metadata)

·         none

Component of (two-way) (inherited)

·         one or more <DRM Aggregate Geometry>s

Component of (two-way)

·         none

Constraints

·         none

Notes

1 Flag to allow lights to limit their scope to only affecting their children. If apply_to_children is FALSE, the light is assumed to apply globally.

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

3 Flag to reset the current cumulative definition of Infinite Light_Sources. If override_infinite_lights is TRUE, all infinite light sources in the current scope are cleared.

4 A value of TRUE indicates the light is on while a value of FALSE indicates the light is off. This is the default/active state of the light.

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

6 Constant 'a' in the attenuation quadratic (a + bd + cd2).

7 Constant 'b' in the attenuation quadratic (a + bd + cd2).

8 Constant 'c' in the attenuation quadratic (a + bd + cd2).

9 Specifies, in terms of degrees of arc, the horizontal angular intensity distribution of the light. The higher this value, the more focused the light. A value of 0,0 specifies a light that equally illuminates all objects within the cone of influence, and instantly falls to an intensity of 0.0 at the edge of the cone of light.

10 Specifies, in terms of degrees of arc, the vertical angular intensity distribution of the light. The higher this value, the more focused the light. A value of 0,0 specifies a light that equally illuminates all objects within the cone of influence, and instantly falls to an intensity of 0,0 at the edge of the cone of light.

11 Position in three-space. This will be affected by hierarchical transformations.

12 Specifies the lobe shape. The direction and axes will be affected by hierarchical transformations.

Class diagram

<DRM Spot Light>