SoLightModel Class Reference
[Lights & colors]

Node that defines the lighting model to use when rendering. More...

#include <Inventor/nodes/SoLightModel.h>

Inheritance diagram for SoLightModel:
SoNode SoFieldContainer SoBase SoRefCounter SoTypedObject

List of all members.

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

Detailed Description

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:

FILE FORMAT/DEFAULT

ACTION BEHAVIOR

SEE ALSO

SoBaseColor, SoEnvironment, SoLight, SoMaterial


Member Enumeration Documentation

Lighting model.

Enumerator:
BASE_COLOR 

Use only the base (diffuse) object color.

PHONG 

Use Phong lighting model.


Constructor & Destructor Documentation

SoLightModel::SoLightModel (  ) 

Creates a light model node with default settings.


Member Function Documentation

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]

Set the state of the override field.

see SoNode::setOverride doc.

Reimplemented from SoNode.


Member Data Documentation

Lighting model to use Use enum Model.

Default is PHONG.


The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 12 Feb 2024
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/