http://www.sim.no/
http://www.coin3d.org/
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
include
Inventor
bundles
SoTextureCoordinateBundle.h
1
#ifndef COIN_SOTEXTURECOORDINATEBUNDLE_H
2
#define COIN_SOTEXTURECOORDINATEBUNDLE_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/SbBasic.h>
29
#include <Inventor/system/inttypes.h>
30
#include <Inventor/elements/SoGLTextureCoordinateElement.h>
31
32
#include <Inventor/SbVec4f.h>
33
34
class
SoTextureCoordinateElement
;
35
class
SoGLTextureCoordinateElement
;
36
class
SoTextureCoordinateCache
;
37
class
SoShape
;
38
39
40
class
COIN_DLL_API
SoTextureCoordinateBundle
:
public
SoBundle
{
41
typedef
SoBundle
inherited
;
42
public
:
43
SoTextureCoordinateBundle
(
SoAction
*
const
action,
44
const
SbBool forRendering,
45
const
SbBool setUpDefault = TRUE);
46
~
SoTextureCoordinateBundle
();
47
48
SbBool needCoordinates(
void
)
const
;
49
SbBool isFunction(
void
)
const
;
50
51
const
SbVec4f
&
get
(
const
int
index);
52
const
SbVec4f
&
get
(
const
SbVec3f
&point,
const
SbVec3f
&normal);
53
54
void
send
(
const
int
index)
const
{
55
glElt->send(index);
56
}
57
void
send(
const
int
index,
const
SbVec3f
&point,
58
const
SbVec3f
&normal)
const
{
59
glElt->send(index, point, normal);
60
}
61
62
SbBool needIndices(
void
)
const
;
63
64
private
:
65
const
SoTextureCoordinateElement
*coordElt;
66
const
SoGLTextureCoordinateElement
*glElt;
67
unsigned
int
flags;
68
69
// misc stuff for default texture coordinate mappping
70
static
const
SbVec4f
& defaultCB(
void
* userdata,
71
const
SbVec3f
& point,
72
const
SbVec3f
& normal);
73
static
const
SbVec4f
& defaultCBMulti(
void
* userdata,
74
const
SbVec3f
& point,
75
const
SbVec3f
& normal);
76
SoShape
* shapenode;
77
SbVec3f
defaultorigo;
78
SbVec3f
defaultsize;
79
SbVec4f
dummyInstance;
80
int
defaultdim0, defaultdim1;
81
void
initDefaultCallback(
SoAction
* action);
82
void
initDefault(
SoAction
*
const
action,
const
SbBool forRendering);
83
void
initDefaultMulti(
SoAction
* action,
const
int
unit);
84
};
85
86
87
#endif // !COIN_SOTEXTURECOORDINATEBUNDLE_H
Copyright © 1998-2010 by
Kongsberg Oil & Gas Technologies
. All rights reserved.
Generated for Coin by
Doxygen
1.8.2.