SoVRMLIndexedFaceSet.h Source File

| http://www.sim.no/ http://www.coin3d.org/

- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List
- File Members

SoVRMLIndexedFaceSet.h
1 /**************************************************************************\
2 *
3 * This file is part of the Coin 3D visualization library.
4 * Copyright (C) by Kongsberg Oil & Gas Technologies.
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 Kongsberg Oil & Gas Technologies
15 * about acquiring a Coin Professional Edition License.
16 *
17 * See http://www.coin3d.org/ for more information.
18 *
19 * Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, 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 #ifndef SO_END_FACE_INDEX // also defined in SoIndexedFaceSet.h
33 #define SO_END_FACE_INDEX (-1)
34 #endif // !SO_END_FACE_INDEX
35
36 class SoVRMLIndexedFaceSetP;
37
38 class COIN_DLL_API SoVRMLIndexedFaceSet : public SoVRMLIndexedShape
39 {
40 typedef SoVRMLIndexedShape inherited;
41 SO_NODE_HEADER(SoVRMLIndexedFaceSet);
42
43 public:
44 static void initClass(void);
45 SoVRMLIndexedFaceSet(void);
46
47 SoSFBool ccw;
48 SoSFBool solid;
49 SoSFBool convex;
50 SoSFFloat creaseAngle;
51
52 virtual void GLRender( SoGLRenderAction * action );
53 virtual void getPrimitiveCount( SoGetPrimitiveCountAction * action );
54
55 virtual SbBool generateDefaultNormals(SoState * s, SoNormalBundle * nb );
56 virtual SbBool generateDefaultNormals(SoState * state, SoNormalCache * nc);
57
58 protected:
59 virtual ~SoVRMLIndexedFaceSet();
60
61 virtual void generatePrimitives( SoAction * action );
62
63
64 private:
65
66 enum Binding {
67 OVERALL,
68 NONE = OVERALL,
69 PER_FACE,
70 PER_FACE_INDEXED,
71 PER_VERTEX,
72 PER_VERTEX_INDEXED
73 };
74
75 Binding findMaterialBinding(SoState * state) const;
76 Binding findNormalBinding(SoState * state) const;
77
78 virtual void notify(SoNotList * list);
79
80 SbBool useConvexCache(SoAction * action,
81 const SbVec3f * normals,
82 const int32_t * nindices,
83 const SbBool normalsfromcache);
84
85 SoVRMLIndexedFaceSetP * pimpl;
86 };
87
88 #endif // ! COIN_SOVRMLINDEXEDFACESET_H
SO_NODE_HEADER
#define SO_NODE_HEADER(classname)
SoNormalCache
The SoNormalCache class is used to hold cached normals.As an extension to the original SGI Open Inven...
Definition: SoNormalCache.h:34
SoVRMLIndexedShape
The SoVRMLIndexedShape class is a superclass for geometry that use indexes.
Definition: SoVRMLIndexedShape.h:31
SoNormalBundle
The SoNormalBundle class simplifies normal handling.This class is currently not used in Coin but is p...
Definition: SoNormalBundle.h:33
SoVRMLIndexedFaceSet::creaseAngle
SoSFFloat creaseAngle
Definition: SoVRMLIndexedFaceSet.h:50
SoState
The SoState class manages the Coin scenegraph traversal state data.The SoState class is used by actio...
Definition: SoState.h:35
SoVRMLIndexedFaceSet
The SoVRMLIndexedFaceSet class is used for representing a generic 3D shape.The detailed class documen...
Definition: SoVRMLIndexedFaceSet.h:38
SoSFBool
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
SoShape::getPrimitiveCount
virtual void getPrimitiveCount(SoGetPrimitiveCountAction *action)
Definition: SoShape.cpp:1344
SoAction
The SoAction class is the base class for all traversal actions.Applying actions is the basic mechanis...
Definition: SoAction.h:68
SbVec3f
The SbVec3f class is a 3 dimensional vector with floating point coordinates.This vector class is used...
Definition: SbVec3f.h:40
SoVRMLIndexedFaceSet::ccw
SoSFBool ccw
Definition: SoVRMLIndexedFaceSet.h:47
SoVRMLVertexShape::GLRender
virtual void GLRender(SoGLRenderAction *action)
Definition: VertexShape.cpp:201
SoShape::generatePrimitives
virtual void generatePrimitives(SoAction *action)=0
SoVRMLIndexedShape::notify
virtual void notify(SoNotList *list)
Definition: IndexedShape.cpp:146
SoGetPrimitiveCountAction
The SoGetPrimitiveCountAction class counts the primitives in a scene.Apply this action to a scene if ...
Definition: SoGetPrimitiveCountAction.h:34
SoVRMLIndexedFaceSet::convex
SoSFBool convex
Definition: SoVRMLIndexedFaceSet.h:49
SoSFFloat
The SoSFFloat class is a container for a floating point value.This field is used where nodes...
Definition: SoSFFloat.h:30
SoShape
The SoShape class is the superclass for geometry shapes.The node types which have actual geometry to ...
Definition: SoShape.h:43
SoNotList
The SoNotList class is a list of SoNotRec notification records.
Definition: SoNotification.h:34
SoVRMLIndexedFaceSet::solid
SoSFBool solid
Definition: SoVRMLIndexedFaceSet.h:48
SoVRMLVertexShape::generateDefaultNormals
virtual SbBool generateDefaultNormals(SoState *s, SoNormalBundle *nb)
Definition: VertexShape.cpp:155
SoGLRenderAction
The SoGLRenderAction class renders the scene graph with OpenGL calls.Applying this method at a root n...
Definition: SoGLRenderAction.h:41

Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.