SoNormalBinding(3)

NAME
SoNormalBinding - The SoNormalBinding class is a node for specifying normal vector bindings.

SYNOPSIS

#include <Inventor/nodes/SoNormalBinding.h>

Inherits SoNode.

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

  Public Member Functions
virtual SoType getTypeId (void) const
SoNormalBinding (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 Member Functions
static SoType getClassTypeId (void)
static void initClass (void)
Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system.

  Public Attributes
SoSFEnum value

  Protected Member Functions
virtual const SoFieldData * getFieldData (void) const
virtual ~SoNormalBinding ()
virtual SbBool readInstance (SoInput *in, unsigned short flags)

  Static Protected Member Functions
static const SoFieldData ** getFieldDataPtr (void)

  Additional Inherited Members

Detailed Description

The SoNormalBinding class is a node for specifying normal vector bindings. Use nodes of this type to specify how to map normal vectors from SoNormal nodes in the scene graph to shape nodes.

FILE FORMAT/DEFAULTS:

NormalBinding {
    value PER_VERTEX_INDEXED
}

Member Enumeration Documentation

  enum SoNormalBinding::Binding
Enumeration of available types of mappings. See documentation of SoMaterialBinding node for explanation of the different values.

Note that SoNormalBinding::DEFAULT and SoNormalBinding::NONE have been obsoleted and are both mapped to SoNormalBinding::PER_VERTEX_INDEXED.

Enumerator

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

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

Important portability note: it was previously allowed with the SGI Inventor library to supply too few colors versus the number of parts of the subsequent shapes in the scene graph. Coloring would then cycle through the available colors.

Since SGI Open Inventor v2.1, this was disallowed, though -- enough normals for all parts must be supplied, or behavior will be unspecified (likely to cause a crash, in fact). Note that the Inventor Mentor book contains a description of the old, invalid behavior in Chapter 5, section 'Binding Nodes' (middle of page 128 in the 10th printing).

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

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

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

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

Note that individual faces after tessellation 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 SoNormalBinding::PER_PART for those.

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

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

Note that individual faces after tessellation 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 SoNormalBinding::PER_PART_INDEXED for those.

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

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

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

Normals 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

  SoNormalBinding::SoNormalBinding (void)
Constructor.

  SoNormalBinding::~SoNormalBinding () [protected], [virtual]
Destructor.

Member Function Documentation

  SoType SoNormalBinding::getClassTypeId (void) [static]
This static method returns the SoType object associated with objects of this class.

  SoType SoNormalBinding::getTypeId (void) const [virtual]
Returns the type identification of an object derived from a class inheriting SoBase. This is used for runtime type checking and 'downward' casting.

Implements SoBase.

  const SoFieldData ** SoNormalBinding::getFieldDataPtr (void) [static], [protected]
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.
 Returns the SoFieldData class which holds information about fields in this node.

  const SoFieldData * SoNormalBinding::getFieldData (void) const [protected], [virtual]
Returns a pointer to the class-wide field data storage object for this instance. If no fields are present, returns NULL.

Reimplemented from SoFieldContainer.

  void SoNormalBinding::doAction (SoAction * action) [virtual]
This function performs the typical operation of a node for any action.

Reimplemented from SoNode.

  void SoNormalBinding::GLRender (SoGLRenderAction * action) [virtual]
Action method for the SoGLRenderAction.

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

Reimplemented from SoNode.

  void SoNormalBinding::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 SoNormalBinding::pick (SoPickAction * action) [virtual]
Action method for SoPickAction.

Does common processing for SoPickAction action instances.

Reimplemented from SoNode.

  void SoNormalBinding::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 calculate their primitive count also override this method to change the relevant state variables.

Reimplemented from SoNode.

  SbBool SoNormalBinding::readInstance (SoInput * in, unsigned short flags) [protected], [virtual]
This method is mainly intended for internal use during file import operations.

It reads a definition of an instance from the input stream in. The input stream state points to the start of a serialized / persistent representation of an instance of this class type.

TRUE or FALSE is returned, depending on if the instantiation and configuration of the new object of this class type went OK or not. The import process should be robust and handle corrupted input streams by returning FALSE.

flags is used internally during binary import when reading user extension nodes, group nodes or engines.

Reimplemented from SoNode.

Member Data Documentation

  SoSFEnum SoNormalBinding::value
The normal binding to use for subsequent shape nodes in the scene graph.

Author

Generated automatically by Doxygen for Coin from the source code.