SoTextureUnitElement Class Reference
[Elements]

VSG extension Stores the current texture unit identifier. More...

#include <Inventor/elements/SoTextureUnitElement.h>

Inheritance diagram for SoTextureUnitElement:
SoAccumulatedElement SoElement SoTypedObject SoGLTextureUnitElement

List of all members.

Public Types

enum  MappingMethod {
  BUMP_MAPPING,
  IMAGE_MAPPING
}

Public Member Functions

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

Static Public Member Functions

static SoType getClassTypeId ()
static int getClassStackIndex ()
static void set (SoState *state, SoNode *node, int unit, MappingMethod mappingMethod)
static SbBool activateTextureUnit (SoState *state, int unit)
static const SbIntList & getTextureUnits (SoState *state)
static const MappingMethodgetMappingMethods (SoState *state)
static int getActiveTextureUnit (SoState *state)
static MappingMethod getActiveMappingMethod (SoState *state)
static int getMaxTextureUnit (SoState *state=NULL)
static SbBool isMultiTexturing (SoState *state, SbIntList &imageTexUnitList)
static SbBool shouldSendGLData (SoState *state)
static int isImageMapping (SoState *state)
static int isBumpMapping (SoState *state)

Detailed Description

VSG extension Stores the current texture unit identifier.

This element stores the the current texture unit identifier.

SEE ALSO

SoTextureUnit


Member Enumeration Documentation

MappingMethod.

Enumerator:
BUMP_MAPPING 

BUMP_MAPPING.

IMAGE_MAPPING 

IMAGE_MAPPING.


Member Function Documentation

static SbBool SoTextureUnitElement::activateTextureUnit ( SoState state,
int  unit 
) [static]

Activates the current texture if it exists.

Returned value indicates if it is successful.

static MappingMethod SoTextureUnitElement::getActiveMappingMethod ( SoState state  )  [static]

Returns the current active mapping method according to the current texture unit.

static int SoTextureUnitElement::getActiveTextureUnit ( SoState state  )  [static]

Returns the current active texture unit (the last texture unit set).

static int SoTextureUnitElement::getClassStackIndex (  )  [static]

Returns the stack id for this element.

Reimplemented from SoAccumulatedElement.

Reimplemented in SoGLTextureUnitElement.

static SoType SoTextureUnitElement::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoAccumulatedElement.

Reimplemented in SoGLTextureUnitElement.

static const MappingMethod* SoTextureUnitElement::getMappingMethods ( SoState state  )  [static]

Returns the mapping method associated with each texture unit.

static int SoTextureUnitElement::getMaxTextureUnit ( SoState state = NULL  )  [static]

Returns the maximum texture units.

static const SbIntList& SoTextureUnitElement::getTextureUnits ( SoState state  )  [static]

Returns the current list texture units.

static int SoTextureUnitElement::isBumpMapping ( SoState state  )  [static]

Indicate if one unit among the current unit list corresponds to an BUMP_MAPPING.

The first corresponding unit found is returned, -1 otherwise.

static int SoTextureUnitElement::isImageMapping ( SoState state  )  [static]

Indicate if one unit among the current unit list corresponds to an IMAGE_MAPPING.

The first corresponding unit found is returned, -1 otherwise.

static SbBool SoTextureUnitElement::isMultiTexturing ( SoState state,
SbIntList &  imageTexUnitList 
) [static]

Returns TRUE if the multi-texturing is active: i.e., at least 2 texture units are defined with a mapping method equal to IMAGE_MAPPING.

Returns also the list of units where the mapping method is equal to IMAGE_MAPPING.

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

Pop method.

Reimplemented in SoGLTextureUnitElement.

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

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

Reimplemented from SoAccumulatedElement.

static void SoTextureUnitElement::set ( SoState state,
SoNode node,
int  unit,
MappingMethod  mappingMethod 
) [static]

Sets the current texture unit and mapping method.

static SbBool SoTextureUnitElement::shouldSendGLData ( SoState state  )  [static]

Indicate according to the current mapping method if GL data must be sent or not.


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

Open Inventor by FEI reference manual, generated on 19 Aug 2019
Copyright © FEI S.A.S. All rights reserved.
http://www.openinventor.com/