http://www.sim.no/
http://www.coin3d.org/
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
include
Inventor
elements
SoTextureCoordinateElement.h
1
#ifndef COIN_SOTEXTURECOORDINATEELEMENT_H
2
#define COIN_SOTEXTURECOORDINATEELEMENT_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/elements/SoReplacedElement.h>
28
#include <Inventor/SbVec2f.h>
29
#include <Inventor/SbVec3f.h>
30
#include <Inventor/SbVec4f.h>
31
32
/*
33
* TODO
34
* - conversion between 2D and 4D (like Open Inventor)
35
*/
36
37
typedef
const
SbVec4f
& SoTextureCoordinateFunctionCB(
void
* userdata,
38
const
SbVec3f
& point,
39
const
SbVec3f
& normal);
40
41
class
COIN_DLL_API
SoTextureCoordinateElement
:
public
SoReplacedElement
{
42
typedef
SoReplacedElement
inherited
;
43
44
SO_ELEMENT_HEADER(
SoTextureCoordinateElement
);
45
public
:
46
static
void
initClass(
void
);
47
protected
:
48
virtual
~
SoTextureCoordinateElement
();
49
50
public
:
51
52
enum
CoordType
{
53
NONE = 0,
54
TEXGEN = 0,
55
EXPLICIT = 1,
56
FUNCTION = 2,
57
DEFAULT = 3
58
};
59
60
virtual
void
init
(
SoState
* state);
61
62
static
void
setDefault(
SoState
*
const
state,
SoNode
*
const
node);
63
static
void
setFunction(
SoState
*
const
state,
SoNode
*
const
node,
64
SoTextureCoordinateFunctionCB *
const
func,
65
void
*
const
userdata);
66
67
static
void
set2(
SoState
*
const
state,
SoNode
*
const
node,
68
const
int32_t numCoords,
const
SbVec2f
*
const
coords);
69
static
void
set3(
SoState
*
const
state,
SoNode
*
const
node,
70
const
int32_t numCoords,
const
SbVec3f
*
const
coords);
71
static
void
set4(
SoState
*
const
state,
SoNode
*
const
node,
72
const
int32_t numCoords,
const
SbVec4f
*
const
coords);
73
74
static
CoordType getType(
SoState
*
const
state);
75
virtual
CoordType getType(
void
)
const
;
76
77
static
const
SoTextureCoordinateElement
*getInstance(
SoState
*
const
state);
78
79
const
SbVec4f
&
get
(
const
SbVec3f
& point,
80
const
SbVec3f
& normal)
const
;
81
int32_t getNum(
void
)
const
;
82
SbBool is2D(
void
)
const
;
83
int32_t getDimension(
void
)
const
;
84
85
const
SbVec2f
&get2(
const
int
index)
const
;
86
const
SbVec3f
&get3(
const
int
index)
const
;
87
const
SbVec4f
&get4(
const
int
index)
const
;
88
89
const
SbVec2f
*getArrayPtr2(
void
)
const
;
90
const
SbVec3f
*getArrayPtr3(
void
)
const
;
91
const
SbVec4f
*getArrayPtr4(
void
)
const
;
92
93
protected
:
94
CoordType
whatKind
;
95
SoTextureCoordinateFunctionCB *
funcCB
;
96
void
*
funcCBData
;
97
int32_t
numCoords
;
98
const
SbVec2f
*
coords2
;
99
const
SbVec3f
*
coords3
;
100
const
SbVec4f
*
coords4
;
101
SbBool
coordsDimension
;
102
SbVec2f
convert2
;
103
SbVec3f
convert3
;
104
SbVec4f
convert4
;
105
};
106
107
#endif // !COIN_SOTEXTURECOORDINATEELEMENT_H
Copyright © 1998-2010 by
Kongsberg Oil & Gas Technologies
. All rights reserved.
Generated for Coin by
Doxygen
1.8.2.