50#ifndef  _SO_NORMAL_BUNDLE 
   51#define  _SO_NORMAL_BUNDLE 
   53#include <Inventor/bundles/SoBundle.h> 
   54#include <Inventor/elements/SoNormalElement.h> 
   55#include <Inventor/elements/SoNormalBindingElement.h> 
   56#include <Inventor/misc/SoNormalGenerator.h> 
   86  virtual ~SoNormalBundle();
 
   89  SbBool              shouldGenerate(
int numNeeded);
 
   93  void                initGenerator(
int initialNum = 100);
 
  105    { generator->beginPolygon(); }
 
  106  void                polygonVertex(
const SbVec3f &point)
 
  107    { generator->polygonVertex(point); }
 
  109    { generator->endPolygon(); }
 
  112  void                triangle(
const SbVec3f &p1,
 
  115    { generator->triangle(p1, p2, p3); }
 
  118  void setupIndexedVertexArray(
const SbVec3f* pointArray)
 
  119  { generator->setupIndexedVertexArray(pointArray); }
 
  120  void polygonVertex(
const int32_t index)
 
  121    { generator->polygonVertex(index); }
 
  122  void triangle(
const int32_t index1,
const int32_t index2,
const int32_t index3)
 
  123    { generator->triangle(index1,index2,index3); }
 
  124  void setupIndexedConnectivity(
const int32_t* connectivityArray)
 
  125    { generator->setupIndexedConnectivity(connectivityArray); }
 
  126  void setupApproxShapeSize(
const int32_t numVert,
const int32_t numFace)
 
  127  { generator->setupApproxShapeSize(numVert,numFace); }
 
  144  void                generate(
int startIndex = 0,
 
  148  const SbVec3f *     getGeneratedNormals()
 const 
  149    { 
return generator->getNormals(); }
 
  150  int                 getNumGeneratedNormals()
 const 
  151    { 
return generator->getNumNormals(); }
 
  154    if (m_isIndexedNormal)
 
  171    const int startIndex = 0
 
  175  void set(SoNormalCache* nc);
 
  179  const SbVec3f& get(
int index)
 const 
  180  { 
return normElt->getNum() != 0 ? normElt->get(index - m_startIndex) : s_zVers; }
 
  183  virtual void send(
int index) 
const;
 
  187  int numNormalCrack()
 const 
  188  { 
return generator->numNormalCrack(); }
 
  190  int getStartIndex()
 const 
  191  { 
return m_startIndex; }
 
  195  SoNormalGenerator   *generator;     
 
  205  bool                                    m_isIndexedNormal;
 
Abstract base  class for all actions.
Abstract base class for all database nodes.
Binding
The choice of values is for compatibility with Open Inventor 2.0 binary format files:
@ PER_VERTEX
One normal for each vertex.
@ PER_VERTEX_INDEXED
One normal for each vertex, indexed.
Allows read-only access to the top element in the state.