H3D::PointLight Class Reference
[X3D node classes.]

The PointLight node specifies a point light source at a 3D location in the local coordinate system. More...

#include <H3D/PointLight.h>

Inheritance diagram for H3D::PointLight:

Inheritance graph

List of all members.

Public Member Functions

 PointLight (Inst< SFNode > _metadata=0, Inst< SFFloat > _ambientIntensity=0, Inst< SFColor > _color=0, Inst< SFFloat > _intensity=0, Inst< SFBool > _on=0, Inst< SFVec3f > _attenuation=0, Inst< SFVec3f > _location=0, Inst< SFBool > _global=0, Inst< SFFloat > _radius=0)
 Constructor.
virtual void enableGraphicsState ()
 Turn the light on.

Public Attributes

auto_ptr< SFVec3fattenuation
 The attenuation field defines how the PointLight node's illumination falls off with distance from the light.
auto_ptr< SFVec3flocation
 The location of the light source.
auto_ptr< SFFloatradius
 This field is not supported by H3DAPI.

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.


Detailed Description

The PointLight node specifies a point light source at a 3D location in the local coordinate system.

A point light source emits light equally in all directions; that is, it is omnidirectional. PointLight nodes are specified in the local coordinate system and are affected by ancestor transformations.

See X3DLightNode for a description of the ambientIntensity, color, and intensity fields.

Location is affected by ancestors' transformations (scales affect and transformations affect location).

PointLight node's illumination falls off with distance as specified by three attenuation coefficients. The attenuation factor is:

1/max(attenuation[0] + attenuation[1] r + attenuation[2] r2, 1)

where r is the distance from the light to the surface being illuminated. The default is no attenuation. An attenuation value of (0, 0, 0) is identical to (1, 0, 0). Attenuation values shall be greater than or equal to zero.

Internal routes:
PointLight.dot

Member Data Documentation

The attenuation field defines how the PointLight node's illumination falls off with distance from the light.

The attenuation factor is:

1/max(attenuation[0] + attenuation[1] r + attenuation[2] r2, 1)

where r is the distance from the light to the surface being illuminated.

Access type: inputOutput
Default value: 1 0 0
Valid range: [0-inf]

PointLight_attenuation.dot

Referenced by enableGraphicsState(), and PointLight().

The location of the light source.

Access type: inputOutput
Default value: 0 0 0

PointLight_location.dot

Referenced by enableGraphicsState(), and PointLight().


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

Generated on Fri Nov 7 10:30:45 2008 for H3D API by  doxygen 1.5.7