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

SoNormalCache.h
1#ifndef COIN_SONORMALCACHE_H
2#define COIN_SONORMALCACHE_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/SbVec3f.h>
28#include <Inventor/caches/SoCache.h>
29#include <Inventor/system/inttypes.h>
30
32class SoNormalCacheP;
33
34class COIN_DLL_API SoNormalCache : public SoCache {
35 typedef SoCache inherited;
36
37public:
38 SoNormalCache(SoState * const state);
39 virtual ~SoNormalCache();
40
41 void set(const int num, const SbVec3f * const normals);
42 void set(SoNormalGenerator *generator);
43
44 int getNum(void) const;
45 const SbVec3f *getNormals(void) const;
46
47 int getNumIndices(void) const;
48 const int32_t *getIndices(void) const;
49
50 void generatePerVertex(const SbVec3f * const coords,
51 const unsigned int numcoords,
52 const int32_t *coordindices,
53 const int numcoordindices,
54 const float crease_angle,
55 const SbVec3f *facenormals = NULL,
56 const int numfacenormals = -1,
57 const SbBool ccw = TRUE,
58 const SbBool tristrip = FALSE);
59
60
61 void generatePerFace(const SbVec3f * const coords,
62 const unsigned int numcoords,
63 const int32_t *coordindices,
64 const int numcoorindices,
65 const SbBool ccw);
66
67 void generatePerFaceStrip(const SbVec3f * const coords,
68 const unsigned int numcoords,
69 const int32_t *coordindices,
70 const int numcoorindices,
71 const SbBool ccw);
72
73 void generatePerStrip(const SbVec3f * const coords,
74 const unsigned int numcoords,
75 const int32_t *coordindices,
76 const int numcoorindices,
77 const SbBool ccw);
78
79 void generatePerVertexQuad(const SbVec3f * const coords,
80 const unsigned int numcoords,
81 const int vPerRow,
82 const int vPerColumn,
83 const SbBool ccw);
84
85 void generatePerFaceQuad(const SbVec3f * const coords,
86 const unsigned int numcoords,
87 const int vPerRow,
88 const int vPerColumn,
89 const SbBool ccw);
90
91 void generatePerRowQuad(const SbVec3f * const coords,
92 const unsigned int numcoords,
93 const int vPerRow,
94 const int vPerColumn,
95 const SbBool ccw);
96
97private:
98 SoNormalCacheP * pimpl;
99 void clearGenerator(void);
100};
101
102#endif // !COIN_SONORMALCACHE_H
The SbVec3f class is a 3 dimensional vector with floating point coordinates.
Definition SbVec3f.h:40
SoCache(SoState *const state)
Definition SoCache.cpp:143
int getNumIndices(void) const
Definition SoNormalCache.cpp:171
void generatePerRowQuad(const SbVec3f *const coords, const unsigned int numcoords, const int vPerRow, const int vPerColumn, const SbBool ccw)
Definition SoNormalCache.cpp:1047
void set(const int num, const SbVec3f *const normals)
Definition SoNormalCache.cpp:119
SoNormalCache(SoState *const state)
Definition SoNormalCache.cpp:81
void generatePerStrip(const SbVec3f *const coords, const unsigned int numcoords, const int32_t *coordindices, const int numcoorindices, const SbBool ccw)
Definition SoNormalCache.cpp:757
const SbVec3f * getNormals(void) const
Definition SoNormalCache.cpp:158
void generatePerFaceQuad(const SbVec3f *const coords, const unsigned int numcoords, const int vPerRow, const int vPerColumn, const SbBool ccw)
Definition SoNormalCache.cpp:961
int getNum(void) const
Definition SoNormalCache.cpp:146
void generatePerFace(const SbVec3f *const coords, const unsigned int numcoords, const int32_t *coordindices, const int numcoorindices, const SbBool ccw)
Definition SoNormalCache.cpp:443
const int32_t * getIndices(void) const
Definition SoNormalCache.cpp:180
void generatePerVertex(const SbVec3f *const coords, const unsigned int numcoords, const int32_t *coordindices, const int numcoordindices, const float crease_angle, const SbVec3f *facenormals=NULL, const int numfacenormals=-1, const SbBool ccw=TRUE, const SbBool tristrip=FALSE)
Definition SoNormalCache.cpp:235
void generatePerVertexQuad(const SbVec3f *const coords, const unsigned int numcoords, const int vPerRow, const int vPerColumn, const SbBool ccw)
Definition SoNormalCache.cpp:894
void generatePerFaceStrip(const SbVec3f *const coords, const unsigned int numcoords, const int32_t *coordindices, const int numcoorindices, const SbBool ccw)
Definition SoNormalCache.cpp:598
The SoNormalGenerator class is used to generate normals.
Definition SoNormalGenerator.h:32
The SoState class manages the Coin scenegraph traversal state data.
Definition SoState.h:35

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

Generated on Wed Jul 23 2025 for Coin by Doxygen 1.14.0.