VisimBox 1.0 VisimBox 3d simulation and visualisation ToolBox

- Main Page
- Packages
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Properties
VisimBox.Renderer.LightManager Class Reference

Abstract light manager. More...

Inheritance diagram for VisimBox.Renderer.LightManager:

List of all members.

## Public Member Functions
override void | Add (string key, ILight value)
abstract void | DeactiveLight (int index)
| Deactivates HW light with specified index.
virtual void | DeactiveLights ()
| Deactivates all lights.
abstract void | EnableLighting (bool value=true)
| Enables (or disables) lighting.
virtual void | ActivateLights (IGeometry area)
| Activates lights for specified area (or all possible if parameter is null)
virtual void | ActivateLights (Vector3 position)
| Activates lights which are active on specified position.
ILight | AddAmbient (string name, ColorByte color)
| Adds new ambient light to the manager and returns pointer to it. Note - all other light types may contain ambient value.
ILight | AddDirectional (string name)
| Adds new directional light to the manager (and returns pointer) without any settings.
ILight | AddDirectional (string name, Vector3 direction, ColorByte color)
| Adds new directional light to the manager (and returns pointer) No specular light.
ILight | AddDirectional (string name, Vector3 direction, ColorByte ambient, ColorByte diffuse)
| Adds new directional light to the manager (and returns pointer) No specular light.
ILight | AddDirectional (string name, Vector3 direction, ColorByte ambient, ColorByte diffuse, ColorByte specular)
| Adds new directional light to the manager (and returns pointer)
ILight | AddSpot (string name)
| Adds uninitalized spot light to manager and returns it's value.
ILight | AddSpot (string name, Vector3 position, Vector3 direction, float angle, ColorByte color)
| Adds spot light to manager and returns its value.
ILight | AddSpot (string name, Vector3 position, Vector3 direction, float angle, ColorByte ambient, ColorByte diffuse, ColorByte specular)
| Adds spot light to manager and returns its value.
ILight | AddPositional (string name)
| Adds uninitalized position light to manager and returns it's value.
ILight | AddPositional (string name, Vector3 position, ColorByte color)
| Adds positional light to manager and returns its value.
ILight | AddPositional (string name, Vector3 position, ColorByte ambient, ColorByte diffuse, ColorByte specular)
| Adds positional light to manager and returns its value.
abstract ILight | ReadFromXml (System.Xml.XmlReader reader)
| Attempts to read light data from xml stream, creates new object and returns it.
abstract ILight | CreateCopy (ILight source)
| Creates exact copy of the light source.
## Protected Member Functions
abstract ILight | CreateAmbient (ColorByte color)
| Creates new ambient light.
abstract ILight | CreateDirectional ()
| Creates new directional light (without setting any parameters)
abstract ILight | CreateDirectional (Vector3 direction, ColorByte ambient, ColorByte diffuse, ColorByte specular)
| Creates new directional light (without setting any parameters)
abstract ILight | CreatePositional ()
| Creates positional light without setting parameters.
abstract ILight | CreatePositional (Vector3 position, ColorByte ambient, ColorByte diffuse, ColorByte specular)
| Creates spot light.
abstract ILight | CreateSpot ()
| Creates parameterless spot light.
abstract ILight | CreateSpot (Vector3 position, Vector3 direction, float angle, ColorByte ambient, ColorByte diffuse, ColorByte specular)
| Creates spot light.
## Properties
abstract int | MaxLights`[get]`
| Maximal number of currently active lights.

## Detailed Description

Abstract light manager.

## Member Function Documentation

virtual void VisimBox.Renderer.LightManager.ActivateLights | ( | IGeometry | area | ) | `[virtual]`

Activates lights for specified area (or all possible if parameter is null)

Parameters:

  area | Geometric area for lights (should be simple bounding object!)

virtual void VisimBox.Renderer.LightManager.ActivateLights | ( | Vector3 | position | ) | `[virtual]`

Activates lights which are active on specified position.

Parameters:

  position |

override void VisimBox.Renderer.LightManager.Add | ( | string | key,
|  | ILight | value
| ) |  |

ILight VisimBox.Renderer.LightManager.AddAmbient | ( | string | name,
|  | ColorByte | color
| ) |  |

Adds new ambient light to the manager and returns pointer to it. Note - all other light types may contain ambient value.

Parameters:

  name | Name for the light (may be changed if not unique)
  color |

Returns:

ILight VisimBox.Renderer.LightManager.AddDirectional | ( | string | name | ) |

Adds new directional light to the manager (and returns pointer) without any settings.

Parameters:

  name | Name for the light (may be changed if not unique)

Returns:
  New light

ILight VisimBox.Renderer.LightManager.AddDirectional | ( | string | name,
|  | Vector3 | direction,
|  | ColorByte | color
| ) |  |

Adds new directional light to the manager (and returns pointer) No specular light.

Parameters:

  name | Name for the light (may be changed if not unique)
  color | Diffuse color
  direction | Directional (normalized!)vector

Returns:
  New light

ILight VisimBox.Renderer.LightManager.AddDirectional | ( | string | name,
|  | Vector3 | direction,
|  | ColorByte | ambient,
|  | ColorByte | diffuse
| ) |  |

Adds new directional light to the manager (and returns pointer) No specular light.

Parameters:

  name | Name for the light (may be changed if not unique)
  diffuse | Diffuse color
  ambient | Ambient light color
  direction | Directional (normalized!)vector

Returns:
  New light

ILight VisimBox.Renderer.LightManager.AddDirectional | ( | string | name,
|  | Vector3 | direction,
|  | ColorByte | ambient,
|  | ColorByte | diffuse,
|  | ColorByte | specular
| ) |  |

Adds new directional light to the manager (and returns pointer)

Parameters:

  name | Name for the light (may be changed if not unique)
  diffuse | Diffuse color
  ambient | Ambient light color
  specular | Specular light color
  direction | Directional (normalized!)vector

Returns:
  New light

ILight VisimBox.Renderer.LightManager.AddPositional | ( | string | name,
|  | Vector3 | position,
|  | ColorByte | color
| ) |  |

Adds positional light to manager and returns its value.

Parameters:

  name | Name for the light (may be changed if not unique)
  position | Position of the light
  color | Color used for both diffuse and specular

Returns:
  New Light

ILight VisimBox.Renderer.LightManager.AddPositional | ( | string | name,
|  | Vector3 | position,
|  | ColorByte | ambient,
|  | ColorByte | diffuse,
|  | ColorByte | specular
| ) |  |

Adds positional light to manager and returns its value.

Parameters:

  name | Name for the light (may be changed if not unique)
  position | Position of the light
  ambient | Ambient light
  diffuse | Diffuse light
  specular | Specular light

Returns:
  New Light

ILight VisimBox.Renderer.LightManager.AddPositional | ( | string | name | ) |

Adds uninitalized position light to manager and returns it's value.

Parameters:

  name | Name for the light (may be changed if not unique)

Returns:
  New Light

ILight VisimBox.Renderer.LightManager.AddSpot | ( | string | name | ) |

Adds uninitalized spot light to manager and returns it's value.

Parameters:

  name | Name for the light (may be changed if not unique)

Returns:
  New Light

ILight VisimBox.Renderer.LightManager.AddSpot | ( | string | name,
|  | Vector3 | position,
|  | Vector3 | direction,
|  | float | angle,
|  | ColorByte | color
| ) |  |

Adds spot light to manager and returns its value.

Parameters:

  name | Name for the light (may be changed if not unique)
  position | Position of the light
  direction | Normalized direction of the light
  angle | Viewing angle in degrees (default is 180 meaning light shining in all directions)
  color | Color used for both diffuse and specular

Returns:
  New Light

ILight VisimBox.Renderer.LightManager.AddSpot | ( | string | name,
|  | Vector3 | position,
|  | Vector3 | direction,
|  | float | angle,
|  | ColorByte | ambient,
|  | ColorByte | diffuse,
|  | ColorByte | specular
| ) |  |

Adds spot light to manager and returns its value.

Parameters:

  name | Name for the light (may be changed if not unique)
  position | Position of the light
  direction | Normalized direction of the light
  angle | Viewing angle in degrees (default is 180 meaning light shining in all directions)
  ambient | Ambient light
  diffuse | Diffuse light
  specular | Specular light

Returns:
  New Light

abstract ILight VisimBox.Renderer.LightManager.CreateAmbient | ( | ColorByte | color | ) | `[protected, pure virtual]`

Creates new ambient light.

Parameters:

  color | Required color

Returns:
  New light

abstract ILight VisimBox.Renderer.LightManager.CreateCopy | ( | ILight | source | ) | `[pure virtual]`

Creates exact copy of the light source.

Parameters:

  source | Source light object

Returns:
  Copy of the light source

Implemented in VisimRenderGL.GLLightMan.

abstract ILight VisimBox.Renderer.LightManager.CreateDirectional | ( |  | ) | `[protected, pure virtual]`

Creates new directional light (without setting any parameters)

Returns:
  New light

Implemented in VisimRenderGL.GLLightMan.

abstract ILight VisimBox.Renderer.LightManager.CreateDirectional | ( | Vector3 | direction,
|  | ColorByte | ambient,
|  | ColorByte | diffuse,
|  | ColorByte | specular
| ) |  | `[protected, pure virtual]`

Creates new directional light (without setting any parameters)

Parameters:

  ambient | Ambient light
  diffuse | Diffuse light
  specular | Specular light
  direction | Normalized Direction

Returns:
  New light

abstract ILight VisimBox.Renderer.LightManager.CreatePositional | ( |  | ) | `[protected, pure virtual]`

Creates positional light without setting parameters.

Returns:
  New light

Implemented in VisimRenderGL.GLLightMan.

abstract ILight VisimBox.Renderer.LightManager.CreatePositional | ( | Vector3 | position,
|  | ColorByte | ambient,
|  | ColorByte | diffuse,
|  | ColorByte | specular
| ) |  | `[protected, pure virtual]`

Creates spot light.

Parameters:

  position | Position
  direction | Normalized direction
  angle | Angle of spot light in degrees
  ambient | Ambient color
  diffuse | Diffuse color
  specular | Specular color

Returns:
  New light

abstract ILight VisimBox.Renderer.LightManager.CreateSpot | ( |  | ) | `[protected, pure virtual]`

Creates parameterless spot light.

Returns:

Implemented in VisimRenderGL.GLLightMan.

abstract ILight VisimBox.Renderer.LightManager.CreateSpot | ( | Vector3 | position,
|  | Vector3 | direction,
|  | float | angle,
|  | ColorByte | ambient,
|  | ColorByte | diffuse,
|  | ColorByte | specular
| ) |  | `[protected, pure virtual]`

Creates spot light.

Parameters:

  position | Position
  direction | Normalized direction
  angle | Angle of spot light in degrees
  ambient | Ambient color
  diffuse | Diffuse color
  specular | Specular color

Returns:
  New light

abstract void VisimBox.Renderer.LightManager.DeactiveLight | ( | int | index | ) | `[pure virtual]`

Deactivates HW light with specified index.

Parameters:

  index |

Implemented in VisimRenderGL.GLLightMan.

virtual void VisimBox.Renderer.LightManager.DeactiveLights | ( |  | ) | `[virtual]`

Deactivates all lights.

abstract void VisimBox.Renderer.LightManager.EnableLighting | ( | bool | value = `true` | ) | `[pure virtual]`

Enables (or disables) lighting.

Parameters:

  value | Lighting

Implemented in VisimRenderGL.GLLightMan.

abstract ILight VisimBox.Renderer.LightManager.ReadFromXml | ( | System.Xml.XmlReader | reader | ) | `[pure virtual]`

Attempts to read light data from xml stream, creates new object and returns it.

Parameters:

  reader | XML reader

Returns:
  Valid light object or null

Implemented in VisimRenderGL.GLLightMan.

## Property Documentation

abstract int VisimBox.Renderer.LightManager.MaxLights`[get]`

Maximal number of currently active lights.

Reimplemented in VisimRenderGL.GLLightMan.

The documentation for this class was generated from the following file:

- Lights.cs

All Classes Namespaces Files Functions Variables Enumerations Properties Events