The SEDRIS Data Representation Model
APPENDIX A - Classes
Cone Directional Light

Class Name: Cone Directional Light

Superclass - <Directional Light Behaviour>

Subclasses

This DRM class is concrete and has no subclasses.

Definition

An instance of this DRM class specifies a <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 <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 SE_TRUE.

Primary Page in DRM Diagram:

Secondary Pages in DRM Diagram:

This class appears on only one page of the DRM class diagram.

Example

  1. A 100 kilometre highway has regularly spaced lampposts. Each lamp is represented using a <Cone Directional Light> instance with a <Lobe Data> component pointing down. If all the lamps use the same <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 <Cone Directional Light> instance using a <Location> component near the centre of the group, the skewing effect will be greatly minimized.

  2. Consider a <Cone Directional Light> instance with a primary colour that is a <Colour Index> instance with full intensity = intensity_level = 0.8, as depicted in Figure 6.6:

    Cone Directional Light, Example 2

    Figure 6 — <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 SE_REFVEC_LIGHT_DIRECTION vector in the horizontal direction, the final intensity is 0.35.

    At 0.43633 radians (approximately 25 degrees) from the SE_REFVEC_LIGHT_DIRECTION vector in the horizontal direction, the final intensity is 0.2, because that position lies outside the horizontal width of the lobe.

  3. Consider the following <Cone Directional Light> instance, with its primary colour specified by an <Inline Colour> instance, so that the full intensity is 1.0, as depicted in Figure 6.7:

    Cone Directional Light, Example 3

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

    At 0.69813 radians (approximately 40 degrees) from the SE_REFVEC_LIGHT_DIRECTION vector in the horizontal direction, the final intensity is 1.0 because use_full_intensity is SE_TRUE and the position lies inside the horizontal width of the lobe.

    At 0.87266 radians (approximately 50 degrees) from the SE_REFVEC_LIGHT_DIRECTION vector in the horizontal direction, the final intensity is 0.5 because the position is outside the horizontal width.

  4. Consider a <Cone Directional Light> instance with both a primary and a secondary colour, each of which is a <Colour Index> instance with intensity_level = 0.8, as depicted in Figure 6.8:

    Cone Directional Light, Example 4

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

    At 0.69813 radians (approximately 40 degrees) from the SE_REFVEC_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 SE_TRUE.

    At 0.69813 radians (approximately 40 degrees) from the SE_REFVEC_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.

  5. Consider a <Cone Directional Light> instance with both a primary and a secondary colour, each of which is a <Colour Index> instance with full intensity = intensity_level = 0.8 as depicted in Figure 6.9:

    Cone Directional Light, Example 5

    Figure 9 — <DRM Cone Directional Light> example

    At 0.43633 radians (approximately 25 degrees) from the SE_REFVEC_LIGHT_DIRECTION vector in the vertical direction, towards the positive end of the SE_REFVEC_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 SE_REFVEC_LIGHT_DIRECTION vector in the vertical direction, towards the positive end of the SE_REFVEC_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.

FAQs

No FAQs supplied.

Constraints

Composed of (two-way) (inherited)

Component of (two-way) (inherited)

Inherited Field Elements

This class has no inherited field elements.

Field Elements

SE_Boolean has_plane; 2
SE_Long_Float plane_angular_offset; 3
SE_Boolean use_full_intensity; 4
SE_Long_Float minimum_colour_intensity; 5
SE_Boolean invisible_behind; 6

Notes

Composed of Notes


Lobe_Data

The <Lobe Data> component specifies the lobe shape.

Fields Notes

has_plane

If the value of the has_plane field is SE_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 SE_FALSE, the cone is not divided and always receives the primary colour.

plane_angular_offset

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 SE_TRUE. The offset is measured from the <Lobe Data> instance's SE_REFVEC_LIGHT_DIRECTION vector and along its SE_REFVEC_VERTICAL_AXIS vector. The resulting upper section of the light is taken to be between the plane and the positive end of the SE_REFVEC_VERTICAL_AXIS vector.

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

use_full_intensity

If the value of the use_full_intensity field is SE_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 SE_REFVEC_LIGHT_DIRECTION vector.

minimum_colour_intensity

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 <Colour Index> instance, the full intensity is specified by its intensity_level field. If the primary colour is represented by an <Inline Colour> instance, the full intensity is 1.0.

A location in the direct path of the <Lobe Data> instance's SE_REFVEC_LIGHT_DIRECTION vector receives the full intensity value. If use_full_intensity is SE_FALSE, the intensity decreases with increasing angular distance from the SE_REFVEC_LIGHT_DIRECTION vector, until the boundary specified by the horizontal and vertical <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.

invisible_behind

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


Prev: Colour Table Library. Next: Conformal Behaviour. Up:Index.

Last updated: July 26, 2006 Copyright © 2006 SEDRIS