The SEDRIS Data Representation Model
APPENDIX A - Classes Base Positional Light |
---|
An instance of a concrete class derived from this DRM class is a <Light Source> that radiates in all directions from a specified point in 3D space with a sphere of influence centred at that point, the radius of which is specified by the value of the radius field.
Only objects that are within the sphere of influence of a <Base Positional Light> instance (that is, an instance of one of its concrete subclasses) can be affected by that <Base Positional Light>. Specific subclasses may further restrict the zone of influence to only a portion of the sphere.
The degree to which an object is affected in the zone of influence depends on the attenuation of the <Base Positional Light>, which depends on the values of its attenuation factor fields. If attenuation is not specified - that is, when constant_attenuation_factor = 1.0, linear_attenuation_factor = 0.0, and quadratic_attenuation_factor = 0.0 - the light ends abruptly at the edge of the sphere of influence. Otherwise, the light intensity components (ambient, diffuse, and specular) are attenuated by the reciprocal of the attenuation quadratic (a + bd + cd2), where a, b, c are the attenuation factor field values as noted in their footnotes, and d is the distance from the position of the <Base Positional Light>.
Consequently, the formula for the final attenuation factor is:
1 -------------------------------------------------------------- [ constant_attenuation_factor + (distance * linear_attenuation_factor) + ((distance squared) * quadratic_attenuation_factor) ]
See subclasses for examples.
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) |
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.
This specifies the position of the given <Base Positional Light> instance.
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.
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.
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.
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.
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.
The constant_attenuation_factor field is the constant "a" in the attenuation quadratic (a + bd + cd**2).
The linear_attenuation_factor field is the constant "b" in the attenuation quadratic (a + bd + cd**2).
The quadratic_attenuation_factor field is the constant "c" in the attenuation quadratic (a + bd + cd**2).
|