Coin Logo http://www.sim.no
http://www.coin3d.org

SoVRMLIndexedFaceSet.h
1 /**************************************************************************\
2  *
3  * This file is part of the Coin 3D visualization library.
4  * Copyright (C) 1998-2007 by Systems in Motion. All rights reserved.
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * ("GPL") version 2 as published by the Free Software Foundation.
9  * See the file LICENSE.GPL at the root directory of this source
10  * distribution for additional information about the GNU GPL.
11  *
12  * For using Coin with software that can not be combined with the GNU
13  * GPL, and for taking advantage of the additional benefits of our
14  * support services, please contact Systems in Motion about acquiring
15  * a Coin Professional Edition License.
16  *
17  * See http://www.coin3d.org/ for more information.
18  *
19  * Systems in Motion, Postboks 1283, Pirsenteret, 7462 Trondheim, NORWAY.
20  * http://www.sim.no/ sales@sim.no coin-support@coin3d.org
21  *
22 \**************************************************************************/
23 
24 #ifndef COIN_SOVRMLINDEXEDFACESET_H
25 #define COIN_SOVRMLINDEXEDFACESET_H
26 
27 #include <Inventor/nodes/SoSubNode.h>
28 #include <Inventor/VRMLnodes/SoVRMLIndexedShape.h>
29 #include <Inventor/fields/SoSFBool.h>
30 #include <Inventor/fields/SoSFFloat.h>
31 
32 #undef SO_END_FACE_INDEX
33 #define SO_END_FACE_INDEX -1
34 
35 class SoVRMLIndexedFaceSetP;
36 
37 class COIN_DLL_API SoVRMLIndexedFaceSet : public SoVRMLIndexedShape
38 {
40  SO_NODE_HEADER(SoVRMLIndexedFaceSet);
41 
42 public:
43  static void initClass(void);
45 
50 
51  virtual void GLRender( SoGLRenderAction * action );
52  virtual void getPrimitiveCount( SoGetPrimitiveCountAction * action );
53 
54  virtual SbBool generateDefaultNormals(SoState * s, SoNormalBundle * nb );
55  virtual SbBool generateDefaultNormals(SoState * state, SoNormalCache * nc);
56 
57 protected:
58  virtual ~SoVRMLIndexedFaceSet();
59 
60  virtual void generatePrimitives( SoAction * action );
61 
62 
63 private:
64 
65  enum Binding {
66  OVERALL,
67  NONE = OVERALL,
68  PER_FACE,
69  PER_FACE_INDEXED,
70  PER_VERTEX,
71  PER_VERTEX_INDEXED
72  };
73 
74  Binding findMaterialBinding(SoState * state) const;
75  Binding findNormalBinding(SoState * state) const;
76 
77  virtual void notify(SoNotList * list);
78 
79  SbBool useConvexCache(SoAction * action,
80  const SbVec3f * normals,
81  const int32_t * nindices,
82  const SbBool normalsfromcache);
83 
84  SoVRMLIndexedFaceSetP * pimpl;
85 };
86 
87 #endif // ! COIN_SOVRMLINDEXEDFACESET_H
The SoBase class is the top-level superclass for a number of class-hierarchies.SoBase provides the ba...
Definition: SoBase.h:41
The SoVRMLIndexedShape class is a superclass for geometry that use indexes.
Definition: SoVRMLIndexedShape.h:31
SoSFFloat creaseAngle
Definition: SoVRMLIndexedFaceSet.h:49
The SoState class manages the Coin scenegraph traversal state data.The SoState class is used by actio...
Definition: SoState.h:35
The SoVRMLIndexedFaceSet class is used for representing a generic 3D shape.The detailed class documen...
Definition: SoVRMLIndexedFaceSet.h:37
The SoSFBool class is a container for an SbBool value.This field is used where nodes, engines or other field containers needs to store a boolean on/off or TRUE/FALSE value, like for instance as the "on" field of the SoPointLight, SoSpotLight and SoDirectionalLight node classes.
Definition: SoSFBool.h:30
virtual void getPrimitiveCount(SoGetPrimitiveCountAction *action)
Definition: SoShape.cpp:1439
The SoAction class is the base class for all traversal actions.Applying actions is the basic mechanis...
Definition: SoAction.h:67
The SbVec3f class is a 3 dimensional vector with floating point coordinates.
Definition: SbVec3f.h:37
SoSFBool ccw
Definition: SoVRMLIndexedFaceSet.h:46
virtual void GLRender(SoGLRenderAction *action)
Definition: VertexShape.cpp:200
virtual void generatePrimitives(SoAction *action)=0
virtual void notify(SoNotList *list)
Definition: IndexedShape.cpp:144
The SoGetPrimitiveCountAction class counts the primitives in a scene.Apply this action to a scene if ...
Definition: SoGetPrimitiveCountAction.h:32
SoSFBool convex
Definition: SoVRMLIndexedFaceSet.h:48
The SoSFFloat class is a container for a floating point value.This field is used where nodes...
Definition: SoSFFloat.h:30
The SoNotList class is a list of SoNotRec notification records.
Definition: SoNotification.h:34
SoSFBool solid
Definition: SoVRMLIndexedFaceSet.h:47
virtual SbBool generateDefaultNormals(SoState *s, SoNormalBundle *nb)
Definition: VertexShape.cpp:154
The SoGLRenderAction class renders the scene graph with OpenGL calls.Applying this method at a root n...
Definition: SoGLRenderAction.h:39

Copyright © 1998-2007 by Systems in Motion AS. All rights reserved.

Generated on Fri Feb 17 2017 for Coin by Doxygen. 1.8.13