Struct opengex::structure::LightObject [] [src]

pub struct LightObject {
    pub light_type: LightType,
    pub casts_shadows: bool,
    pub colors: HashMap<String, Color>,
    pub params: ParamMap,
    pub textures: HashMap<String, Texture>,
    pub attenuations: Atten,
}

The LightObject struture contains data for a light object. Multiple LightNode structures may reference a single LightObject. This allows a scene to contain multiple instances of the same light, with different transformations.

Fields

The type of light emitted by this LightObject.

Whether this LightObject casts shadows. This can be overiden by the LightNode referencing this LightObject.

The colors associated with this LightObject.

The OpenGEX specification only references one type of color: "light". This is the main color of light emitted by the light souArce. This defaults to an RGB value of (1.0, 1.0, 1.0).

There can be any other number of colors in this HashMap, for application-specific kinds.

The parameters associated with this LightObject.

The OpenGEX specification only references one type of parameter: "intensity". This is the intensity of the light emitted by the light souArce. This defaults to 0.

There can be any other number of parameters in this HashMap, for application-specific kinds.

The textures associated with this LightObject.

The OpenGEX specification only references one type of texture: "projection". This is an optional texture projection of this LightObject. The texture map should be oriented so that the right direction is aligned to the object-space positive x-axis, and the up direction is aligned to the object-space positive y-axis.

There can be any other number of textures in this HashMap, for application-specific kinds.

Any number of attenuation functions to be applied to the LightObject. The values produced by all of them are multiplied together to determine the intensity of the light reaching any particular point in space.