SoLight Class Reference
[Lights & colors]

Abstract base class for all light source nodes. More...

#include <Inventor/nodes/SoLight.h>

Inheritance diagram for SoLight:
SoNode SoFieldContainer SoBase SoRefCounter SoTypedObject SoDirectionalLight SoPointLight SoSpotLight SoDirectionalLightManip SoPointLightManip SoSpotLightManip

List of all members.

Classes

struct  Members

Public Member Functions

virtual SoType getTypeId () const

Static Public Member Functions

static SoType getClassTypeId ()

Public Attributes

SoSFBool on
SoSFFloat intensity
SoSFColor color

Detailed Description

Abstract base class for all light source nodes.

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

ACTION BEHAVIOR

SEE ALSO

SoDirectionalLight, SoEnvironment, SoLightKit, SoLightModel, SoMaterial, SoPointLight, SoSpotLight


Member Function Documentation

static SoType SoLight::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoNode.

Reimplemented in SoDirectionalLightManip, SoPointLightManip, SoSpotLightManip, SoDirectionalLight, SoPointLight, and SoSpotLight.

virtual SoType SoLight::getTypeId (  )  const [virtual]

Returns the type identifier for this specific instance.

Reimplemented from SoNode.

Reimplemented in SoDirectionalLightManip, SoPointLightManip, SoSpotLightManip, SoDirectionalLight, SoPointLight, and SoSpotLight.


Member Data Documentation

Light source illumination color.

Illumination intensity of light source.

Valid values range from 0.0 (no illumination) to 1.0 (maximum illumination).

Determines whether the source is active or inactive.

When inactive, the source does not illuminate at all.


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/