Open Inventor Reference
SoLightModel Class Reference

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

#include <Inventor/nodes/SoLightModel.h>

Inheritance diagram for SoLightModel:
SoNode SoFieldContainer SoBase

List of all members.

Public Types

enum  Model { BASE_COLOR = SoLazyElement::BASE_COLOR, PHONG = SoLazyElement::PHONG }
 Lighting model: More...

Public Member Functions

 SoLightModel ()
 Creates a light model node with default settings.
virtual void doAction (SoAction *action)
 This method performs the "typical" operation of a node for any action.
virtual void GLRender (SoGLRenderAction *action)
 These virtual functions implement all of the actions for nodes, Most of the default implementations do nothing.
virtual void callback (SoCallbackAction *action)

Static Public Member Functions

static void initClass ()
 Initializes base node class.

Public Attributes

Fields
SoSFEnum model
 Lighting model to use.

Protected Member Functions

virtual ~SoLightModel ()

Detailed Description

This node defines the lighting model to be used when rendering subsequent shapes. The lighting model is specified in the model field. When the default model (Phong lighting) is used, light sources are required in a scene for objects to be easily visible.

File Format/Default
LightModel {
  model PHONG
}
Action Behavior
SoGLRenderAction, SoCallbackAction
Sets the current lighting model in the state.
See Also
SoBaseColor, SoEnvironment, SoLight, SoMaterial

Definition at line 92 of file SoLightModel.h.


Member Enumeration Documentation

Enumerator:
BASE_COLOR 

Just use base color.

PHONG 

Phong lighting.

Definition at line 98 of file SoLightModel.h.


Constructor & Destructor Documentation

SoLightModel::SoLightModel ( )
virtual SoLightModel::~SoLightModel ( ) [protected, virtual]

Member Function Documentation

virtual void SoLightModel::callback ( SoCallbackAction action) [virtual]

Reimplemented from SoNode.

virtual void SoLightModel::doAction ( SoAction action) [virtual]

The default implementation does nothing.

Reimplemented from SoNode.

virtual void SoLightModel::GLRender ( SoGLRenderAction action) [virtual]

Reimplemented from SoNode.

static void SoLightModel::initClass ( ) [static]

Reimplemented from SoNode.


Member Data Documentation

Definition at line 107 of file SoLightModel.h.


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