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 | Protected Attributes | Properties
VisimBox.Renderer.Light Class Reference
Inheritance diagram for VisimBox.Renderer.Light:

List of all members.

## Public Member Functions
abstract void | Activate (int light)
| Activates light on specified HW position.
| Light ()
virtual bool | IsActive (IGeometry area)
| Returns true, if light is active in the specified area.
virtual bool | IsActive (Vector3 pos)
| Returns true if light is active on specified position.
abstract ILight | GetCopy ()
virtual void | AddReference (IResourceConsumer consumer)
| Adds reference to this resource.
virtual void | RemoveReference (IResourceConsumer consumer)
| Removes reference to this resource.
virtual bool | ReplaceReferences (IResource newresource)
| Manager wants to replace this resource by another - resource should inform all of it's consumers that it's being replaced and update references based on their response It should also check if new resource is of compatible type.
virtual void | Dispose ()
System.Xml.Schema.XmlSchema | GetSchema ()
| Reqired by IXMLserializable.
abstract void | ReadXml (System.Xml.XmlReader reader)
| Deserializes object from XML.
virtual void | WriteXml (System.Xml.XmlWriter writer)
| Serializes object to XML.
## Protected Member Functions
virtual void | DisposeConsumers ()
## Protected Attributes
string | _Name
bool | _typeChanged = false
LightTypes | _lType
List< IResourceConsumer > | Consumers = new List<IResourceConsumer>()
## Properties
ColorByte | Ambient`[get, set]`
| Ambient light.
ColorByte | Diffuse`[get, set]`
| Difuse light color.
ColorByte | Specular`[get, set]`
| Specular light color.
LightTypes | LightType`[get, set]`
| type of the light
Vector3 | Position`[get, set]`
| Position of the light, used for positional and spot light and for radius calculation.
Vector3 | Direction`[get, set]`
| Normalized direction of the light for spot and directional.
float | SpotAngle`[get, set]`
| Angle of the cone light for spot lighting.
float | SpotIntensity`[get, set]`
| Spot light intensity distribution. Must be 0 - 128. 0 is uniformly distributed light, 128 focused beam.
Vector3 | Attenuation`[get, set]`
| Light attenuation (X = constant, Y = linear, Z = quadratic), defines how the light weakens with distance. Default value is (1,0,0) meaning no attenuation (note - using attenuation induces slowdowns)
string | Name`[get, set]`
| name of the light in manager
float | Radius`[get, set]`
| SQUARED radius of the light where it's active (0 everywhere). Used if active area is null (required set position!)
IGeometry | ActiveArea`[get, set]`
| Area where the light is active (can be null, then it's active everywhere)
ResourceType | ResourceType`[get]`
| Generic type of the resource.
ResourceUsage | Usage`[get]`
| Type of the resource usage (static/dynamic)
string | FileName`[get, set]`
| File used to create the resource (if it was loaded from the disk)
virtual bool | AlwaysStay`[get, set]`
| If true, resource will stay in memory even if it's not referenced.
int | References`[get]`
| Number of current references.
int | NullReferences`[get]`
| Returns number of null generic references.

## Constructor & Destructor Documentation

VisimBox.Renderer.Light.Light | ( |  | ) |

## Member Function Documentation

abstract void VisimBox.Renderer.Light.Activate | ( | int | light | ) | `[pure virtual]`

Activates light on specified HW position.

Parameters:

  light | light index

Implements VisimBox.Renderer.ILight.

Implemented in VisimRenderGL.GLLight.

virtual void VisimBox.Renderer.Light.AddReference | ( | IResourceConsumer | consumer | ) | `[virtual]`

Adds reference to this resource.

Parameters:

  consumer | Consumer of resource

Implements VisimBox.Resources.IResource.

virtual void VisimBox.Renderer.Light.Dispose | ( |  | ) | `[virtual]`

virtual void VisimBox.Renderer.Light.DisposeConsumers | ( |  | ) | `[protected, virtual]`

abstract ILight VisimBox.Renderer.Light.GetCopy | ( |  | ) | `[pure virtual]`

Implements VisimBox.Renderer.ILight.

Implemented in VisimRenderGL.GLLight.

System.Xml.Schema.XmlSchema VisimBox.Renderer.Light.GetSchema | ( |  | ) |

Reqired by IXMLserializable.

Returns:
  Null

virtual bool VisimBox.Renderer.Light.IsActive | ( | IGeometry | area | ) | `[virtual]`

Returns true, if light is active in the specified area.

Parameters:

  area | Geometry area (use bounding boxes!)

Returns:
  True if light is active in the area (and should be set for all objects there)

Implements VisimBox.Renderer.ILight.

virtual bool VisimBox.Renderer.Light.IsActive | ( | Vector3 | pos | ) | `[virtual]`

Returns true if light is active on specified position.

Parameters:

  pos | Position

Returns:
  True if light is active in the area (and should be set for all objects there)

Implements VisimBox.Renderer.ILight.

abstract void VisimBox.Renderer.Light.ReadXml | ( | System.Xml.XmlReader | reader | ) | `[pure virtual]`

Deserializes object from XML.

Parameters:

  reader | XML reader

Implemented in VisimRenderGL.GLLight.

virtual void VisimBox.Renderer.Light.RemoveReference | ( | IResourceConsumer | consumer | ) | `[virtual]`

Removes reference to this resource.

Parameters:

  consumer | Consumer of resource

Implements VisimBox.Resources.IResource.

virtual bool VisimBox.Renderer.Light.ReplaceReferences | ( | IResource | newresource | ) | `[virtual]`

Manager wants to replace this resource by another - resource should inform all of it's consumers that it's being replaced and update references based on their response It should also check if new resource is of compatible type.

Parameters:

  newresource | New resource

Returns:
  True if resource is compatible type and all consumers accepted resource changing, false otherwise

Implements VisimBox.Resources.IResource.

virtual void VisimBox.Renderer.Light.WriteXml | ( | System.Xml.XmlWriter | writer | ) | `[virtual]`

Serializes object to XML.

Parameters:

  writer | XML writer to save values

## Member Data Documentation

LightTypes VisimBox.Renderer.Light._lType`[protected]`

string VisimBox.Renderer.Light._Name`[protected]`

bool VisimBox.Renderer.Light._typeChanged = false`[protected]`

List<IResourceConsumer> VisimBox.Renderer.Light.Consumers = new List<IResourceConsumer>()`[protected]`

## Property Documentation

IGeometry VisimBox.Renderer.Light.ActiveArea`[get, set]`

Area where the light is active (can be null, then it's active everywhere)

Implements VisimBox.Renderer.ILight.

virtual bool VisimBox.Renderer.Light.AlwaysStay`[get, set]`

If true, resource will stay in memory even if it's not referenced.

Implements VisimBox.Resources.IResource.

ColorByte VisimBox.Renderer.Light.Ambient`[get, set]`

Ambient light.

Implements VisimBox.Renderer.ILight.

Vector3 VisimBox.Renderer.Light.Attenuation`[get, set]`

Light attenuation (X = constant, Y = linear, Z = quadratic), defines how the light weakens with distance. Default value is (1,0,0) meaning no attenuation (note - using attenuation induces slowdowns)

Implements VisimBox.Renderer.ILight.

ColorByte VisimBox.Renderer.Light.Diffuse`[get, set]`

Difuse light color.

Implements VisimBox.Renderer.ILight.

Vector3 VisimBox.Renderer.Light.Direction`[get, set]`

Normalized direction of the light for spot and directional.

Implements VisimBox.Renderer.ILight.

string VisimBox.Renderer.Light.FileName`[get, set]`

File used to create the resource (if it was loaded from the disk)

Implements VisimBox.Resources.IResource.

LightTypes VisimBox.Renderer.Light.LightType`[get, set]`

type of the light

Implements VisimBox.Renderer.ILight.

string VisimBox.Renderer.Light.Name`[get, set]`

name of the light in manager

Implements VisimBox.Renderer.ILight.

int VisimBox.Renderer.Light.NullReferences`[get]`

Returns number of null generic references.

Implements VisimBox.Resources.IResource.

Vector3 VisimBox.Renderer.Light.Position`[get, set]`

Position of the light, used for positional and spot light and for radius calculation.

Implements VisimBox.Renderer.ILight.

float VisimBox.Renderer.Light.Radius`[get, set]`

SQUARED radius of the light where it's active (0 everywhere). Used if active area is null (required set position!)

Implements VisimBox.Renderer.ILight.

int VisimBox.Renderer.Light.References`[get]`

Number of current references.

Implements VisimBox.Resources.IResource.

ResourceType VisimBox.Renderer.Light.ResourceType`[get]`

Generic type of the resource.

Implements VisimBox.Resources.IResource.

ColorByte VisimBox.Renderer.Light.Specular`[get, set]`

Specular light color.

Implements VisimBox.Renderer.ILight.

float VisimBox.Renderer.Light.SpotAngle`[get, set]`

Angle of the cone light for spot lighting.

Implements VisimBox.Renderer.ILight.

float VisimBox.Renderer.Light.SpotIntensity`[get, set]`

Spot light intensity distribution. Must be 0 - 128. 0 is uniformly distributed light, 128 focused beam.

Implements VisimBox.Renderer.ILight.

ResourceUsage VisimBox.Renderer.Light.Usage`[get]`

Type of the resource usage (static/dynamic)

Implements VisimBox.Resources.IResource.

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

- Lights.cs

All Classes Namespaces Files Functions Variables Enumerations Properties Events