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 the reference page for SoLightKit
.
Lighting is enabled by default (default model is 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 OpenGL only computes lighting for the "front" face 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
.
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
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, 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, getEXTERNPROTO, getName, getPROTO, isDisposable, isSynchronizable, setName, setSynchronizable
getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
public final SoSFBool on
public final SoSFFloat intensity
public final SoSFColor color
Generated on August 20, 2019, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com