http://www.sim.no/
http://www.coin3d.org/
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
include
Inventor
caches
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
31
class
SoNormalGenerator
;
32
class
SoNormalCacheP;
33
34
class
COIN_DLL_API
SoNormalCache
:
public
SoCache
{
35
typedef
SoCache
inherited
;
36
37
public
:
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
97
private
:
98
SoNormalCacheP * pimpl;
99
void
clearGenerator(
void
);
100
};
101
102
#endif // !COIN_SONORMALCACHE_H
Copyright © 1998-2010 by
Kongsberg Oil & Gas Technologies
. All rights reserved.
Generated for Coin by
Doxygen
1.8.1.