public class SoLightModel extends SoNode
model
field.
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.
When model
is set to BASE_COLOR, the OpenGL lighting computation is disabled for subsequent shapes. This can be useful for annotation, data visualization and other special cases.
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
.
VolumeViz:
SoLightModel
controls lighting for most VolumeViz shapes, but
not for SoVolumeRender
. Lighting for volume rendering is controlled by the SoVolumeRenderingQuality
node.
SoOrthoSlice
.
File format/default:
LightModel {
model | PHONG |
Action behavior:
SoGLRenderAction
, SoCallbackAction
Sets the current lighting model in the state.
See also:
Modifier and Type | Class and Description |
---|---|
static class |
SoLightModel.Models
Lighting model.
|
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
static int |
BASE_COLOR
Deprecated.
Use
SoLightModel.Models.BASE_COLOR instead. |
SoSFEnum<SoLightModel.Models> |
model
Lighting model to use .
|
static int |
PHONG
Deprecated.
Use
SoLightModel.Models.PHONG instead. |
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoLightModel()
Creates a light model node with default settings.
|
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
@Deprecated public static final int BASE_COLOR
SoLightModel.Models.BASE_COLOR
instead.@Deprecated public static final int PHONG
SoLightModel.Models.PHONG
instead.public final SoSFEnum<SoLightModel.Models> model
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com