SoNormalBundle.h Source File

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

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

- File List
- File Members

SoNormalBundle.h
1 #ifndef COIN_SONORMALBUNDLE_H
2 #define COIN_SONORMALBUNDLE_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/bundles/SoBundle.h>
28 #include <Inventor/misc/SoNormalGenerator.h>
29 #include <Inventor/elements/SoGLNormalElement.h>
30
31 class SoNormalBundleP;
32
33 class COIN_DLL_API SoNormalBundle : public SoBundle {
34 public:
35 SoNormalBundle(SoAction * action, SbBool forrendering);
36 ~SoNormalBundle();
37
38 SbBool shouldGenerate(int numneeded);
39 void initGenerator(int initnum = 100);
40 void beginPolygon(void);
41 void polygonVertex(const SbVec3f & v);
42 void endPolygon(void);
43
44 void triangle(const SbVec3f & p1,
45 const SbVec3f & p2,
46 const SbVec3f & p3);
47 void generate(int startindex = 0,
48 SbBool addtostate = TRUE);
49 const SbVec3f * getGeneratedNormals(void) const;
50 int getNumGeneratedNormals(void) const;
51 void set(int32_t num, const SbVec3f * normals);
52 const SbVec3f & get(int index) const;
53 void send(int index) const;
54
55 SoNormalGenerator * generator; // SoINTERNAL public
56
57 private:
58 const SoNormalElement * elem;
59 const SoGLNormalElement * glelem;
60 SoNode * node;
61 SoNormalBundleP * pimpl; // for future use
62 };
63
64
65 #endif // !COIN_SONORMALBUNDLE_H
SoGLNormalElement
The SoGLNormalElement class is yet to be documented.FIXME: write doc.
Definition: SoGLNormalElement.h:29
SoNode
The SoNode class is the base class for nodes used in scene graphs.Coin is a retained mode 3D visualiz...
Definition: SoNode.h:47
SoNormalBundle
The SoNormalBundle class simplifies normal handling.This class is currently not used in Coin but is p...
Definition: SoNormalBundle.h:33
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
SoBundle
The SoBundle class is the superclass for all bundle classes.
Definition: SoBundle.h:33
SoNormalElement
The SoNormalElement class is yet to be documented.FIXME: write doc.
Definition: SoNormalElement.h:31
SoNormalGenerator
The SoNormalGenerator class is used to generate normals.FIXME: document properly. ...
Definition: SoNormalGenerator.h:32

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