Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

SoMaterialBinding Class Reference

The SoMaterialBinding class is a node for setting up how materials are mapped to shapes. More...

#include <Inventor/nodes/SoMaterialBinding.h>

Inheritance diagram for SoMaterialBinding::

SoNode SoFieldContainer SoBase List of all members.

Public Types

enum  Binding {
  OVERALL = SoMaterialBindingElement::OVERALL, PER_PART = SoMaterialBindingElement::PER_PART, PER_PART_INDEXED = SoMaterialBindingElement::PER_PART_INDEXED, PER_FACE = SoMaterialBindingElement::PER_FACE,
  PER_FACE_INDEXED = SoMaterialBindingElement::PER_FACE_INDEXED, PER_VERTEX = SoMaterialBindingElement::PER_VERTEX, PER_VERTEX_INDEXED = SoMaterialBindingElement::PER_VERTEX_INDEXED, DEFAULT = OVERALL,
  NONE = OVERALL
}

Public Methods

 SoMaterialBinding (void)
virtual void doAction (SoAction *action)
virtual void GLRender (SoGLRenderAction *action)
virtual void callback (SoCallbackAction *action)
virtual void pick (SoPickAction *action)
virtual void getPrimitiveCount (SoGetPrimitiveCountAction *action)

Static Public Methods

void initClass (void)

Public Attributes

SoSFEnum value

Protected Methods

virtual ~SoMaterialBinding ()

Detailed Description

The SoMaterialBinding class is a node for setting up how materials are mapped to shapes.

The material binding specified in nodes of this type decides how the material values of SoMaterial nodes are mapped on the builtin geometry shape nodes.

The exact meaning of a binding depends on what particular shape type a material or a set of materials are applied to.

See also:
SoMaterial


Member Enumeration Documentation

enum SoMaterialBinding::Binding
 

Enumeration of available types of material binding.

Enumeration values:
OVERALL   Apply the same material to the complete shape.
PER_PART   Get a new material from the pool of material values for each part of the shape, where the definition of a part depends on the shape type.

Materials are fetched from index 0 and onwards, incrementing the index into the material pool by 1 for each new part in the order defined by the particular shape type.

PER_PART_INDEXED   Get a new material from the pool of material values for each part of the shape, where the definition of a part depends on the shape type.

Materials are fetched by the index value settings of the shape.

PER_FACE   Get a new material from the pool of material values for each polygon face of the shape.

Materials are fetched from index 0 and onwards, incrementing the index into the material pool by 1 for each new face of the shape node.

Note that individual faces after tesselation of complex shapes (like SoCylinder nodes) are not considered to be separate entities, and so this binding will be treated in the same manner as SoMaterialBinding::PER_PART for those.

PER_FACE_INDEXED   Get a new material from the pool of material values for each polygon face of the shape.

Materials are fetched by the index value settings of the shape.

Note that individual faces after tesselation of complex shapes (like SoCylinder nodes) are not considered to be separate entities, and so this binding will be treated in the same manner as SoMaterialBinding::PER_PART_INDEXED for those.

PER_VERTEX   Get a new material from the pool of material values for each polygon, line or point vertex of the shape.

Materials are fetched from index 0 and onwards, incrementing the index into the material pool by 1 for each new vertex of the shape node.

PER_VERTEX_INDEXED   Get a new material from the pool of material values for each polygon, line or point vertex of the shape.

Materials are fetched by the index value settings of the shape.

DEFAULT   Obsolete. Don't use this value.
NONE   Obsolete. Don't use this value.


Constructor & Destructor Documentation

SoMaterialBinding::SoMaterialBinding void
 

Constructor.

SoMaterialBinding::~SoMaterialBinding [protected, virtual]
 

Destructor.


Member Function Documentation

void SoMaterialBinding::initClass void [static]
 

Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system.

Reimplemented from SoNode.

void SoMaterialBinding::doAction SoAction * action [virtual]
 

This function performs the typical operation of a node for any action.

Reimplemented from SoNode.

void SoMaterialBinding::GLRender SoGLRenderAction * action [virtual]
 

Action method for the SoGLRenderAction.

This is called during rendering traversals. Nodes influencing the rendering state in any way or who wants to throw geometry primitives at OpenGL overrides this method.

Reimplemented from SoNode.

void SoMaterialBinding::callback SoCallbackAction * action [virtual]
 

Action method for SoCallbackAction.

Simply updates the state according to how the node behaves for the render action, so the application programmer can use the SoCallbackAction for extracting information about the scene graph.

Reimplemented from SoNode.

void SoMaterialBinding::pick SoPickAction * action [virtual]
 

Action method for SoPickAction.

Does common processing for SoPickAction action instances.

Reimplemented from SoNode.

void SoMaterialBinding::getPrimitiveCount SoGetPrimitiveCountAction * action [virtual]
 

Action method for the SoGetPrimitiveCountAction.

Calculates the number of triangle, line segment and point primitives for the node and adds these to the counters of the action.

Nodes influencing how geometry nodes calculates their primitive count also overrides this method to change the relevant state variables.

Reimplemented from SoNode.


Member Data Documentation

SoSFEnum SoMaterialBinding::value
 

The material binding to use for subsequent shape nodes in the scene graph. The default binding is SoMaterialBinding::OVERALL.


The documentation for this class was generated from the following files:
Generated at Tue Mar 5 03:31:26 2002 for Coin by doxygen1.2.9 written by Dimitri van Heesch, © 1997-2001