The SEDRIS Data Representation Model
APPENDIX A - Classes
Spot Light

Class Name: Spot Light

Superclass - <Base Positional Light>

Subclasses

This DRM class is concrete and has no subclasses.

Definition

An instance of this DRM class is a <Base Positional Light> instance that specifies an elliptic cone of influence, the tip of which is the specified <Location 3D> component. The cone is bounded where it intersects the sphere centred at the tip, the radius of which 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.

The intensity dropoff 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 <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.0 < horizontal_drop_off_rate, 0.0 < vertical_drop_off_rate
I = I0 * (1.0 - |Ah| * horizontal_drop_off_rate) * (1.0 - |Av| * vertical_drop_off_rate)

case: 0.0 = horizontal_drop_off_rate, 0.0 < vertical_drop_off_rate
I = I0 * (1.0 - |Av| * vertical_drop_off_rate)

case: 0.0 < horizontal_drop_off_rate, 0.0 = vertical_drop_off_rate
I = I0 * (1.0 - |Ah| * horizontal_drop_off_rate)

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

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

FAQs

How does <Spot Light> differ from the OpenGL concept of a spot light?

<Spot Light> can losslessly represent an OpenGL spot light.

<Spot Light>, however, has the additional capability of specifying that the light is to spread horizontally and vertically, while in an OpenGL <Spot Light>, the horizontal and vertical lobe angles shall be identical, as shall the fall off angles.

Constraints

Composed of (two-way) (inherited)

Composed of (two-way)

Component of (two-way) (inherited)

Inherited Field Elements

SE_Boolean apply_to_children; (notes)
SE_Boolean override_positional_lights; (notes)
SE_Boolean override_infinite_lights; (notes)
SE_Boolean active_light_value; (notes)
SE_Float radius; (notes)
SE_Long_Float constant_attenuation_factor; (notes)
SE_Long_Float linear_attenuation_factor; (notes)
SE_Long_Float quadratic_attenuation_factor; (notes)

Field Elements

SE_Long_Float horizontal_drop_off_rate; (notes)
SE_Long_Float vertical_drop_off_rate; (notes)

Notes

Composed of Notes


Light_Source_Control_Link

 If a <Light Source> instance is subject to dynamic control -
 that is, if it can be turned on and off - it will have a
 <Light Source Control Link> component to express that
 control mechanism.

Location_3D

 This specifies the position of the given <Base Positional Light>
 instance.

Lobe_Data

 This specifies the lobe shape.

Fields Notes


apply_to_children

 For a <Light Source> instance (that is, an instance of one of the
 concrete classes descended from the class) that is a component of
 some <Aggregate Geometry>, apply_to_children provides a mechanism
 for limiting the scope of the <Light Source>. If apply_to_children
 is SE_TRUE, only <Primitive Geometry> in the component tree of those
 <Aggregate Geometry> instances are affected by the given
 <Light Source>. If apply_to_children is SE_FALSE, the <Light Source>
 is not limited to the scope of those <Aggregate Geometry> instances
 and thus applies globally.

override_positional_lights

 For a <Light Source> instance that is a component of some
 <Aggregate Geometry>, override_positional_lights provides a
 mechanism to indicate with a value of SE_TRUE that the effect of the
 given <Light Source> overrides that of any <Base Positional Light>
 instances that would have otherwise applied to that
 <Aggregate Geometry> - for example, if the given <Light Source> is
 so close to the affected <Geometry Representation> that the
 <Base Positional Light> effects would be negligible. If
 override_positional_lights = SE_FALSE, the effect of the
 given <Light Source> is combined with that
 of any <Base Positional Light> instances that are already in effect.

override_infinite_lights

 For a <Light Source> instance (that is, an instance of one of the
 concrete classes descended from the class) that is a component of
 some <Aggregate Geometry>, override_infinite_lights provides a
 mechanism to indicate with a value of SE_TRUE that the effect of the
 given <Light Source> overrides that of any <Infinite Light>
 instances that would have otherwise applied to that
 <Aggregate Geometry>. If override_infinite_lights = SE_FALSE,
 the effect of the given <Light Source> is combined with that
 of any <Infinite Light> instances that are already in effect.

active_light_value

 A value of SE_TRUE for the active_light_value field indicates
 that the light is on, while a value of
 SE_FALSE indicates that the light is off. For a <Light Source>
 with a <Light Source Control Link> instance as a component,
 this is the default state of the light.

radius

 The radius field, which is specified in metres, together with
 the <Location 3D> component specifies the zone of influence
 of the given <Base Positional Light> instance.

constant_attenuation_factor

 The constant_attenuation_factor field is the constant "a"
 in the attenuation quadratic (a + bd + cd**2).

linear_attenuation_factor

 The linear_attenuation_factor field is the constant "b"
 in the attenuation quadratic (a + bd + cd**2).

quadratic_attenuation_factor

 The quadratic_attenuation_factor field is the constant "c"
 in the attenuation quadratic (a + bd + cd**2).

horizontal_drop_off_rate

 The horizontal_drop_off_rate field specifies, in radians, 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.

vertical_drop_off_rate

 The vertical_drop_off_rate field specifies, in radians, 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.

Prev: Spherical Volume Extent. Next: SRF Summary. Up:Index.

Last updated: July 16, 2004 Copyright © 2004 SEDRIS