DisplaySetLightSource Method |
Set the properties of one of the display's light sources for real-time lighting effects.
Namespace: (Default Namespace)Assembly: Default (in Default.exe) Version: 1.0.0.0
Syntax public void SetLightSource(
int index,
Vector2 windowCoordinate,
Vector3 falloff,
Color color,
float aimX,
float aimY,
float aimZ,
float lightZ,
float apertureFocus,
float apertureSoftness,
Vector3[] walls,
int wallCoordCount
)
Parameters
- index
- Type: SystemInt32
Indicates which light source to set. Must be between 0 and MAX_LIGHTS - 1, inclusive - windowCoordinate
- Type: Vector2
Coordinate within the display at which the light should be positioned with the origin at the top left corner - falloff
- Type: Vector3
Constant, linear and quadratic falloff of the light intensity. Google linear light falloff for details. - color
- Type: System.DrawingColor
Color and intensity of the light source. Alpha channel indicates intensity. - aimX
- Type: SystemSingle
Relative horizontal offset of direction in which the light points. - aimY
- Type: SystemSingle
Relative vertical offset of direction in which the light points. - aimZ
- Type: SystemSingle
Relative depth offset of direction in which the light points. - lightZ
- Type: SystemSingle
Z position of light source relative to map layer. Positive moves from layer toward viewer. - apertureFocus
- Type: SystemSingle
Determines how focused the light source is. 1 is an invisibly narrow beam and 0 covers a 180-degree arc. - apertureSoftness
- Type: SystemSingle
Determines how soft the edges of the light beam are. - walls
- Type: Vector3
Array of Vector3 structures specifying the endpoints of walls (in pairs) - wallCoordCount
- Type: SystemInt32
Number of applicable (non-zero) elements in walls. This should be a multiple of 2.
See Also