public class SoLight extends SoNode
SoLight
is the abstract base class for all light nodes. A light node defines an illumination source that may affect subsequent shapes in the scene graph, depending on the current lighting style. Light sources are affected by the current transformation. A light node under a separator does not affect any objects outside that separator.
You can also use a node kit to create a light. See SoLightKit
.
An SoEnvironment
node can be used to specify additional options related to lighting:
SoPointLight
and SoSpotLight
nodes.
Lighting is enabled by default (default model is PER_VERTEX_PHONG). When lighting is enabled, there must be light nodes (e.g. SoDirectionalLight
) in the scene graph for objects to be easily visible. When using the Open Inventor viewer classes (e.g. SoWinExaminerViewer
), the viewer will create a "headlight" (directional light attached to the camera) if no other light nodes exist when setSceneGraph() is called.
By default, lighting is only computed for the "front" faces of geometry, so the back face of the geometry will be dark. The front face is determined by the normal vector, if specified, or by the vertex ordering (see SoShapeHints
) if normals are computed by Open Inventor. To enable "two sided" lighting (lighting both front and back faces) see SoShapeHints
.
The maximum number of lights depends on the hardware, but at least eight simultaneous lights are supported.
File format/default:
This is an abstract class. See the reference page of a derived class for the format and default values.
Action behavior:
SoGLRenderAction
Activates this light (if so specified) during traversal. All shape nodes that come after this light in the scene graph are illuminated by this light.
See also:
SoDirectionalLight
, SoEnvironment
, SoLightKit
, SoLightModel
, SoMaterial
, SoPointLight
, SoSpotLight
SoNode.RenderModes
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
SoSFColor |
color
Light source illumination color.
|
SoSFFloat |
intensity
Illumination intensity of light source.
|
SoSFBool |
on
Determines whether the source is active or inactive.
|
VERBOSE_LEVEL, ZeroHandle
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
getNativeResourceHandle
public final SoSFBool on
public final SoSFFloat intensity
public final SoSFColor color
Generated on July 31, 2019, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com