OpenGLContext.scenegraph.light
Standard Light-node types
Classes
A Directional Light node
Note: this is not scoped according to vrml standard,
instead it affects the entire scene
Abstract base class for all lights
attributes:
pointSource -- whether or not we are a point
light source, stored as a float value, if
false, the light is a directional light
- location
- the object-space location of point-source lights (i.e. non-directional)
or
- direction
- direction a directional or spotlight is shining
- color
- light diffuse color
- ambientIntensity
- ambient light fraction of color
Light(
self
,
lightID
,
mode
= None
)
Render light using given light ID for the given mode
This will check for:
mode.lighting
mode.lightingAmbient
mode.lightingDiffuse
and appropriately enable/disable the various features.
Returns whether or not the light ID has been used,
which allows us to reuse the light ID in case this
light does not actually need it for this particular
rendering pass.
PointLight node
attributes:
attenuation -- 3 values giving the light-attenuation
values for constant, linear and quadratic attenuation
(+ Light attributes)
http://www.web3d.org/x3d/specifications/vrml/ISO-IEC-14772-IS-VRML97WithAmendment1/part1/nodesRef.html#PointLight
SpotLight node
attributes:
cutOffAngle -- spotlight falloff from the center-line
(+ Light attributes)
http://www.web3d.org/x3d/specifications/vrml/ISO-IEC-14772-IS-VRML97WithAmendment1/part1/nodesRef.html#SpotLight