VO LightSource
Add a new light source
Syntax
VO <ScenarioPath> LightSource {Add | Delete | Modify | DeleteAll} [{LightOption} <Parameter>]...
Related commands
Description
The VO LightSource command enables you to add a new light source, define its position, and specify its type as supported by OpenGL. You can also attach the light source to any object and apply it to any coordinate frame.
If DeleteAll is entered, the only valid {LightOption} is WindowID, specifying any other option will cause a Nack.
{LightOption} <Parameter> | Description |
---|---|
Name <LightSourceName> | User-defined name of the light source. This option must be included if Add, Modify or Delete is selected. This option is required if Add, Delete or Modify is entered. |
Show {On | Off} | Uses the light source to illuminate the 3D Graphics window. Default if On. |
PosOffSet <Xvalue> <Yvalue> <Zvalue> | Specifies the distance offsets from the origin at which the light source displays. The offset is maintained in the specified reference system. Values are entered in Connect distance units. Default value is 0.0, 0.0, 0.0. |
Color {Color} | Specifies the color of the light. Default color is white. For valid {Color} options see Common Options. |
SpotCutOff <Value> | Specifies the maximum spread angle of a light source. Valid range is 0 through 90 degrees. This option is valid only for spotlights. |
Intensity <Value> | Controls the intensity of the light source. Default value is 100.0. |
NegativeDirection {On | Off} | Reverses the direction of the light source. Valid only for directional and spotlights. Default is Off. |
Type {Directional | Positional | Spotlight} | Indicates the type of light source:
|
SystemDef "<TruncObjectPath> <SystemName> [System]" | Defines the position of the light source. The default system definition is relative to the specified CB fixed frame.
The <TruncObjectPath> can either be a truncated object path (Satellite/Satellite1) or a Central Body path (CentralBody/Earth). |
CrdnDef "<TruncObjectPath> <VectorName> [Vector]" | Defines the direction of the light source. The default vector is from the sun to the earth.
The <TruncObjectPath> can either be a truncated object path (Satellite/Satellite1) or a Central Body path (CentralBody/Earth). |
ConstantAtten <Value> | Set the Constant attenuation value. <Value> must be greater or equal to 0.0. |
LinearAtten <Value> | Set the Linear attenuation value. <Value> must be greater or equal to 0.0. |
QuadraticAtten <Value> | Set the Quadratic attenuation value. <Value> must be greater or equal to 0.0. |
WindowID <WinNumber> | Specifies the 3D Graphics window where the light source is displayed. |
Examples
To create a default directional light source:
To create a directional light source with a color specified:
To create a spotlight with a cone angle of 0.25 and direct it towards the moon:
To modify a spotlight in window 1, change its color to green, change the cone angle to 0.5, and direct it towards the moon:
To modify the LightSrc0 spotlight to point to a facility on the globe:
To add a spotlight to window 1 with a spotcutoff of 90.0, a color of yellow, an intensity of 400, its position changed to a Satellite, and pointing to a facility on the globe:
To delete all lightsources from VO window 2:
To add a spotlight and set its attenuation values:
Return message
Group membership
This command belongs to the following group(s):
Version
9.0