Table 6.63—DRM_Cone_Directional_Light

Property

Description

Superclass

·         <DRM Directional Light Behaviour>

Class

·         <DRM Cone Directional Light>

Subclass

·         none

Definition

A <DRM Cone Directional Light> is a light whose intensity varies depending on your position 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> can have a plane that divides the light cone into an upper and a lower section along the body of the cone. The upper section receives the primary color while the lower section receives the secondary color, if one is used.

Example(s)

·         The <DRM Cone Directional Light> has a primary color that is a <DRM Colour Index> with an intensity field of 0.8. The minimum_color_intensity is 0.2. The has_plane flag is FALSE and the use_full_intensity flag is FALSE. The <DRM Lobe Data> component has horizontal_width=40 and vertical_width=40.

equation:

final_intensity = minimum_color_intensity + ((((width / 2.0) - degrees_away_from_direction_vector) / (width / 2.0)) * (full_intensity - minimum_color_intensity))

If the viewer position from the light_direction_vector is 15 degrees in the horizontal direction, the final_intensity is 0.35. 0.2 + ((((40.0 / 2.0) - 15.0) / (40.0 / 2.0)) * (0.8 - 0.2))

If the viewer position from the light_direction_vector is 25 degrees in the horizontal direction, the final_intensity is 0.2 because the viewer is outside the horizontal width.

·         The <DRM Cone Directional Light> has a primary color that is an <DRM Inline Colour> (which makes the full intensity 1.0). The minimum_color_intensity is 0.5. The has_plane flag is FALSE and the use_full_intensity flag is TRUE. The <DRM Lobe Data> component has horizontal_width=90 and vertical_width=90.

If the viewer position from the light_direction_vector is 40 degrees in the horizontal direction, the final_intensity is 1.0 since the use_full_intensity flag is TRUE and the viewer is inside the horizontal width.

If the viewer position from the light_direction_vector is 50 degrees in the horizontal direction, the final_intensity is 0.5 since the viewer is outside the horizontal width.

·         The <DRM Cone Directional Light> has both a primary and a secondary color that are <DRM Color Index>s that have intensity fields of 0.8. The minimum_color_intensity is 0.0. The has_plane flag is FALSE and the use_full_intensity flag is TRUE. The <DRM Lobe Data> component has horizontal_width=70 and vertical_width=90.

If the viewer position from the light_direction_vector is 40 degrees in the vertical direction, the viewer sees the primary color with an intensity of 0.8 since the use_full_intensity flag is TRUE and the viewer is inside the vertical width.

If the viewer position from the light_direction_vector is 40 degrees in the horizontal direction, the viewer sees the secondary color with an intensity of 0.8 since the minimum_color_intensity is 0.0 and the viewer is outside the horizontal width.

·         The <DRM Cone Directional Light> has both a primary and a secondary color that are <DRM Color Index>s that have intensity fields of 0.8. The minimum_color_intensity is 0.0. The has_plane flag is TRUE and the plane_angular_offset is 20. The <DRM Lobe Data> component has horizontal_width=70 and vertical_width=90. The minimum_color_intensity value is 0.0.

If the viewer position from the light_direction_vector is 25 degrees in the vertical direction towards the positive end of the lobe_data vertical_axis vector, the viewer sees the primary color with an intensity of 0.8. This is because the minimum_color_intensity value is 0.0 and the viewer is inside the vertical width, in the upper section of the cone.

If the viewer position from the light_direction_vector is 15 degrees in the vertical direction towards the positive end of the lobe_data vertical_axis vector, the viewer sees the secondary color with an intensity of 0.8. This is because the minimum_color_intensity value is 0.0 and the viewer is inside the vertical width, in the lower section of the cone.

Inherited field elements

field_name

range

Field_Data_Type

none

 

 

Field elements

field_name

range

Field_Data_Type

has_plane1

 

Boolean

plane_angular_offset2

 

Long_Float

use_full_intensity3

 

Boolean

minimum_color_intensity4

 

Long_Float

invisible_behind5

 

Boolean

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 Lobe Data>6

·         one <DRM Location>

Composed of (two-way)

·         none

Composed of (two-way metadata) (inherited)

·         none

Composed of (two-way metadata)

·         none

Component of (two-way) (inherited)

·         one or more <DRM Light Rendering Properties>s

Component of (two-way)

·         none

Constraints

·         none

Notes

1 A flag indicating that 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 color. If a secondary color is used, the lower section receives it.

2 This value defines the angular offset of the plane that may divide the light into an upper and a lower section. It is measured in degrees (-180 to 180) from the lobe's light_direction vector, along its vertical_axis vector (in the same way as the vertical_width). The resulting upper section of the light is taken to be between the plane and the positive end of the vertical_axis vector. This value is ignored if has_plane is FALSE.

3 A flag, if TRUE indicates that the full intensity of the light is shown in the cone shaped area. If this flag is FALSE, the intensity of the light decreases (towards the minimum_color_intensity value) as the viewer  moves away from the direction vector.

4 This value (between 0.0 and 1.0) is used in conjunction with the intensity value of the primary color. If the primary color is a <DRM Color_Index>, the full intensity will be the intensity field of that class. If the primary color is a <DRM Inline Color>, the full intensity is 1.0. If the viewer location is in the direct path of the light_direction vector (from lobe_data), the viewer will receive the full (intensity) value. As the viewer moves away from the light_direction vector (but still lies within the horizontal and vertical widths), the intensity decreases toward the minimum_color_intensity value (unless the use_full_intensity flag is TRUE). Once the viewer gets outside the horizontal and vertical width area, the intensity is that of the minimum_color_intensity value. If the minimum_color_intensity value is 0.0 and the viewer is outside the vertical and horizontal widths, the secondary color will be seen. If no secondary color is used, nothing will be seen.

5 If this flag is set, the directional light is not seen if the viewer is behind the plane of the directional light.

6 The lobe definition.

Class diagram

<DRM Cone Directional Light>