Table 6.44 — DRM_Cone_Directional_Light

Property

Description

Class

  • <DRM Cone Directional Light>

Superclass

Subclass

  • None.

Definition

An instance of this DRM class specifies a <DRM Directional Light Behaviour> instance, the intensity of which varies depending on the position of the observer relative to the light’s location, direction, and shape. This light takes the shape of a cone, which can be elliptical.

A <DRM Cone Directional Light> instance can specify a plane that divides the light cone into an upper and a lower section along the body of the cone. This occurs when the has_plane field has value TRUE.

If the value of the has_plane field is TRUE, a plane, based at the cone apex and extending along the body of the cone, divides the light cone into an upper and a lower section. The upper section receives the primary colour. If a secondary colour is used, the lower section receives it. If a secondary colour is not used, the lower section also receives the primary colour.

If the value of the has_plane field is FALSE, the cone is not divided and always receives the primary colour.

The value of the plane_angular_offset field defines the angular offset of the plane measured in radians, if the value of the has_plane field is TRUE. The offset is measured from the <DRM Lobe Data> instance’s LIGHT_DIRECTION vector and along its VERTICAL_AXIS vector. The resulting upper section of the light is taken to be between the plane and the positive end of the VERTICAL_AXIS vector.

The value of the plane_angular_offset field is ignored if has_plane is FALSE.

If the value of the use_full_intensity field is TRUE, it indicates that the full intensity of the light is shown in the cone shaped area. Otherwise, the intensity of the light decreases (towards the minimum_colour_intensity value) as one moves away from the LIGHT_DIRECTION vector.

The value of the minimum_colour_intensity value is used in conjunction with the full intensity value of the primary colour. If the primary colour is represented by a <DRM Colour Index> instance, the full intensity is specified by its intensity_level field. If the primary colour is represented by a <DRM Inline Colour> instance, the full intensity is 1,0.

A location in the direct path of the <DRM Lobe Data> instance’s LIGHT_DIRECTION vector receives the full intensity value. If use_full_intensity is FALSE, the intensity decreases with increasing angular distance from the LIGHT_DIRECTION vector, until the boundary specified by the horizontal and vertical <DRM Lobe Data> instance widths is reached. Outside the lobe, the intensity is minimum_colour_intensity. If the minimum_colour_intensity value is 0,0, the secondary colour (if present) will be seen outside the lobe at full intensity. If no secondary colour is present, nothing is visible outside the lobe.

If the value of the invisible_behind field is TRUE, the directional light is invisible when viewed from behind the plane located at the apex and perpendicular to the LIGHT_DIRECTION vector. If the value of the invisible_behind field is FALSE, the directional light is visible when viewed from behind.

Class diagram

Figure 6.48 — DRM_Cone_Directional_Light

Inherited field elements

Field name

Range

Field data type

None

   

Field elements

Field name

Range

Field data type

has_plane

 

Boolean

plane_angular_offset

[-π, π]

Long_Float

use_full_intensity

 

Boolean

minimum_colour_intensity

[0,0, 1,0]

Long_Float

invisible_behind

 

Boolean

Default field values

Default field values for DRM_Cone_Directional_Light

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)

Composed of (two-way)

  • None.

Composed of (two-way metadata) (inherited)

  • None.

Composed of (two-way metadata)

  • None.

Component of (two-way) (inherited)

Component of (two-way)

  • None.

Constraints

Clarifications

1The <DRM Lobe Data> component specifies the lobe shape.

Example(s)

  • A 100 kilometre highway has regularly spaced lampposts. Each lamp is represented using a <DRM Cone Directional Light> instance with a <DRM Lobe Data> component pointing down. If all the lamps use the same <DRM Cone Directional Light> instance, all the directions will be parallel. Due to the curvature of the Earth, very few of the lights will shine directly down; the others will be slightly skewed. If, instead, the set of lamps is divided into smaller contiguous groups, each with its own <DRM Cone Directional Light> instance using a <DRM Location> component near the centre of the group, the skewing effect will be greatly minimized.

  • Consider a <DRM Cone Directional Light> instance with a primary colour that is a <DRM Colour Index> instance with full intensity = intensity_level = 0,8, as depicted in Figure 6.49:

    Cone Directional Light, Example 2

    Figure 6.49 — <DRM Cone Directional Light> primary colour <DRM Colour Index> example

    Since the lobe shape results in a circular cone, the following equation may be used to compute the final intensity for this example:

    final intensity = minimum_colour_intensity +
                            ((((width / 2,0) - observer angular offset) / (width / 2,0)) ×
                             (intensity_level - minimum_colour_intensity))

    where width is the diameter of the cone (either the horizontal_width or the vertical_width).

    At 0,26179 radians (approximately 15 degrees) from the LIGHT_DIRECTION vector in the horizontal direction, the final intensity is 0,35.

    At 0,43633 radians (approximately 25 degrees) from the LIGHT_DIRECTION vector in the horizontal direction, the final intensity is 0,2, because that position lies outside the horizontal width of the lobe.

  • Consider the following <DRM Cone Directional Light> instance, with its primary colour specified by a <DRM Inline Colour> instance, so that the full intensity is 1,0, as depicted in Figure 6.50:

    Cone Directional Light, Example 3

    Figure 6.50 — <DRM Cone Directional Light> primary colour <DRM Inline Colour> example

    At 0,69813 radians (approximately 40 degrees) from the LIGHT_DIRECTION vector in the horizontal direction, the final intensity is 1,0 because use_full_intensity is TRUE and the position lies inside the horizontal width of the lobe.

    At 0,87266 radians (approximately 50 degrees) from the LIGHT_DIRECTION vector in the horizontal direction, the final intensity is 0,5 because the position is outside the horizontal width.

  • Consider a <DRM Cone Directional Light> instance with both a primary and a secondary colour, each of which is a <DRM Colour Index> instance with intensity_level = 0,8, as depicted in Figure 6.51:

    Cone Directional Light, Example 4

    Figure 6.51 — <DRM Cone Directional Light> primary and secondary colour example

    At 0,69813 radians (approximately 40 degrees) from the LIGHT_DIRECTION vector in the vertical direction, the primary colour is in effect with intensity 0,8, because the position is inside the vertical width and use_full_intensity is TRUE.

    At 0,69813 radians (approximately 40 degrees) from the LIGHT_DIRECTION vector in the horizontal direction, the secondary colour is in effect with intensity 0,8, because the position is outside the horizontal width and minimum_colour_intensity = 0,0.

  • Consider a <DRM Cone Directional Light> instance with both a primary and a secondary colour, each of which is a <DRM Colour Index> instance with full intensity = intensity_level = 0,8 as depicted in Figure 6.52:

    Cone Directional Light, Example 5

    Figure 6.52 — <DRM Cone Directional Light> example

    At 0,43633 radians (approximately 25 degrees) from the LIGHT_DIRECTION vector in the vertical direction, towards the positive end of the VERTICAL_AXIS vector, the final intensity is 0,8 since this position lies in the upper section, full intensity of the primary colour is 0,8 and the minimum_colour_intensity is 0,0.

    At 0,26179 radians (approximately 15 degrees) from the LIGHT_DIRECTION vector in the vertical direction, towards the positive end of the VERTICAL_AXIS vector, the full intensity of the secondary colour is 0,8, because this position lies in the lower section of the cone and the minimum_colour_intensity is 0,0.