SoGLLightIdElement Class Reference
[Elements]

Stores the id of the current light. More...

#include <Inventor/elements/SoGLLightIdElement.h>

Inheritance diagram for SoGLLightIdElement:
SoInt32Element SoElement SoTypedObject

List of all members.

Public Member Functions

virtual void push (SoState *state)
virtual void pop (SoState *state, const SoElement *prevTopElement)
virtual void print (FILE *fp) const

Static Public Member Functions

static SoType getClassTypeId ()
static int getClassStackIndex ()
static int increment (SoState *state)
static int increment (SoState *state, SoNode *)
static int get (SoState *state)
static int getDefault ()
static int getMaxGLSources ()

Detailed Description

Stores the id of the current light.

This element stores the id of the current light. The first light active in a scene has id 0, the next has 1, and so on. This element can be used to determine how many lights are currently active. The initial value of this element is -1 to indicate that there are no lights active.

NOTE: This class does not exist in Open Inventor 10.0 and later.

Note that even though the effects of this element accumulate (each light source increments the id), it is derived from SoInt32Element. This is because each call to increment() effectively does a "get" of the current top instance, so caching knows about the dependency of each instance on the previous one.

SEE ALSO

SoDirectionalLight, SoPointLight, SoSpotLight, SoVRMLDirectionalLight, SoVRMLPointLight, SoVRMLSpotLight

Deprecated:

Deprecated since Open Inventor 9620
SoGLLightIdElement are no longer supported. See section http://oivdoc96.vsg3d.com/content/compatibility-notes-4#Deprecation of the Reference Manual.

Member Function Documentation

static int SoGLLightIdElement::get ( SoState state  )  [inline, static]

Returns current light id from the state.

static int SoGLLightIdElement::getClassStackIndex (  )  [static]

Returns the stack id for this element.

Reimplemented from SoInt32Element.

static SoType SoGLLightIdElement::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoInt32Element.

static int SoGLLightIdElement::getDefault (  )  [inline, static]

Returns the default light id.

static int SoGLLightIdElement::getMaxGLSources (  )  [static]

Returns the maximum number of concurrent light sources supported by GL implementation.

static int SoGLLightIdElement::increment ( SoState state,
SoNode  
) [inline, static]

Increments the current light id.

This should be called when a light source becomes active. This returns the new id, or -1 if the maximum number of GL light sources has been exceeded. Otherwise, enables light source.

static int SoGLLightIdElement::increment ( SoState state  )  [static]

Increments the current light id.

This should be called when a light source becomes active. This returns the new id, or -1 if the maximum number of GL light sources has been exceeded. Otherwise, enables light source.

virtual void SoGLLightIdElement::pop ( SoState state,
const SoElement prevTopElement 
) [virtual]

Overrides pop() method so side effects can occur in GL.

virtual void SoGLLightIdElement::print ( FILE *  fp  )  const [virtual]

Prints element (for debugging).

Reimplemented from SoInt32Element.

virtual void SoGLLightIdElement::push ( SoState state  )  [virtual]

Overrides push() method to copy values from next instance in the stack.

Reimplemented from SoElement.


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

Open Inventor Toolkit reference manual, generated on 15 May 2022
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/