Node that defines the lighting model to use when rendering. More...
#include <Inventor/nodes/SoLightModel.h>
Public Types | |
enum | Model { BASE_COLOR = SoLazyElement::BASE_COLOR, PHONG = SoLazyElement::PHONG } |
Public Member Functions | |
virtual SoType | getTypeId () const |
SoLightModel () | |
virtual void | setOverride (const SbBool state) |
virtual SbBool | isOverride () const |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Public Attributes | |
SoSFEnum | model |
Node that defines the lighting model to use when rendering.
This node defines the lighting model to be used when rendering subsequent shapes. The lighting model is specified in the 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:
model | PHONG |
SoBaseColor, SoEnvironment, SoLight, SoMaterial
enum SoLightModel::Model |
SoLightModel::SoLightModel | ( | ) |
Creates a light model node with default settings.
static SoType SoLightModel::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoNode.
virtual SoType SoLightModel::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from SoNode.
virtual SbBool SoLightModel::isOverride | ( | ) | const [inline, virtual] |
Returns the state of the override field.
Reimplemented from SoNode.
virtual void SoLightModel::setOverride | ( | const SbBool | state | ) | [inline, virtual] |
Lighting model to use Use enum Model.
Default is PHONG.