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

SoVertexShape.h
1 #ifndef COIN_SOVERTEXSHAPE_H
2 #define COIN_SOVERTEXSHAPE_H
3
4 /**************************************************************************\
5 *
6 * This file is part of the Coin 3D visualization library.
7 * Copyright (C) by Kongsberg Oil & Gas Technologies.
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * ("GPL") version 2 as published by the Free Software Foundation.
12 * See the file LICENSE.GPL at the root directory of this source
13 * distribution for additional information about the GNU GPL.
14 *
15 * For using Coin with software that can not be combined with the GNU
16 * GPL, and for taking advantage of the additional benefits of our
17 * support services, please contact Kongsberg Oil & Gas Technologies
18 * about acquiring a Coin Professional Edition License.
19 *
20 * See http://www.coin3d.org/ for more information.
21 *
22 * Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY.
23 * http://www.sim.no/ sales@sim.no coin-support@coin3d.org
24 *
25 \**************************************************************************/
26
27 #include <Inventor/nodes/SoSubNode.h>
28 #include <Inventor/nodes/SoShape.h>
29 #include <Inventor/fields/SoSFNode.h>
30 #ifndef COIN_INTERNAL
31 // For Open Inventor compatibility.
32 #include <Inventor/nodes/SoVertexProperty.h>
33 #endif // !COIN_INTERNAL
34
35 class SoNormalBundle;
36 class SoNormalCache;
37 class SbVec3f;
38 class SoTextureCoordinateElement;
39 class SoCoordinateElement;
40 class SoVertexShapeP;
41
42 class COIN_DLL_API SoVertexShape : public SoShape {
43 typedef SoShape inherited;
44
45 SO_NODE_ABSTRACT_HEADER(SoVertexShape);
46
47 public:
48 static void initClass(void);
49
50 SoSFNode vertexProperty;
51
52 virtual void notify(SoNotList * nl);
53 virtual SbBool generateDefaultNormals(SoState * state,
54 SoNormalBundle * bundle);
55 virtual SbBool generateDefaultNormals(SoState * state,
56 SoNormalCache * cache);
57 virtual void write(SoWriteAction * action);
58
59 protected:
60 SoVertexShape(void);
61 virtual ~SoVertexShape();
62
63 virtual SbBool shouldGLRender(SoGLRenderAction * action);
64
65 void setNormalCache(SoState * const state,
66 const int num, const SbVec3f * normals);
67 SoNormalCache * getNormalCache(void) const;
68
69 SoNormalCache * generateAndReadLockNormalCache(SoState * const state);
70 void getVertexData(SoState * state,
71 const SoCoordinateElement *& coords,
72 const SbVec3f *& normals,
73 const SbBool neednormals);
74
75 void readLockNormalCache(void);
76 void readUnlockNormalCache(void);
77
78 private:
79 void writeLockNormalCache(void);
80 void writeUnlockNormalCache(void);
81 SoVertexShapeP * pimpl;
82 };
83
84 #endif // !COIN_SOVERTEXSHAPE_H
SoBase
The SoBase class is the top-level superclass for a number of class-hierarchies.SoBase provides the ba...
Definition: SoBase.h:36
SoNormalCache
The SoNormalCache class is used to hold cached normals.As an extension to the original SGI Open Inven...
Definition: SoNormalCache.h:34
SoNormalBundle
The SoNormalBundle class simplifies normal handling.This class is currently not used in Coin but is p...
Definition: SoNormalBundle.h:33
SoState
The SoState class manages the Coin scenegraph traversal state data.The SoState class is used by actio...
Definition: SoState.h:35
SoCoordinateElement
The SoCoordinateElement class is yet to be documented.FIXME: write doc.
Definition: SoCoordinateElement.h:31
SoSFNode
The SoSFNode class is a container for a single node.This field container stores a pointer to a Coin n...
Definition: SoSFNode.h:38
SoVertexShape::vertexProperty
SoSFNode vertexProperty
Definition: SoVertexShape.h:50
SbVec3f
The SbVec3f class is a 3 dimensional vector with floating point coordinates.This vector class is used...
Definition: SbVec3f.h:40
SoShape::shouldGLRender
virtual SbBool shouldGLRender(SoGLRenderAction *action)
Definition: SoShape.cpp:547
SoTextureCoordinateElement
The SoTextureCoordinateElement class is yet to be documented.FIXME: write doc.
Definition: SoTextureCoordinateElement.h:41
SoShape::notify
virtual void notify(SoNotList *nl)
Definition: SoShape.cpp:1416
SoWriteAction
The SoWriteAction class writes a scene graph to file.When applied to a scene, this action writes its ...
Definition: SoWriteAction.h:33
SoVertexShape
The SoVertexShape class is the superclass for all vertex based shapes.Basically, every polygon-...
Definition: SoVertexShape.h:42
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
SoNode::write
virtual void write(SoWriteAction *action)
Definition: SoNode.cpp:1217
SO_NODE_ABSTRACT_HEADER
#define SO_NODE_ABSTRACT_HEADER(classname)
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.