Coin  4.0.3
Coin3D core library
Loading...
Searching...
No Matches
SoSceneTexture2.h
1#ifndef COIN_SOSCENETEXTURE2_H
2#define COIN_SOSCENETEXTURE2_H
3
4/**************************************************************************\
5 * Copyright (c) Kongsberg Oil & Gas Technologies AS
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions are
10 * met:
11 *
12 * Redistributions of source code must retain the above copyright notice,
13 * this list of conditions and the following disclaimer.
14 *
15 * Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 *
19 * Neither the name of the copyright holder nor the names of its
20 * contributors may be used to endorse or promote products derived from
21 * this software without specific prior written permission.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34\**************************************************************************/
35
36#include <Inventor/fields/SoSFVec2s.h>
37#include <Inventor/fields/SoSFEnum.h>
38#include <Inventor/fields/SoSFColor.h>
39#include <Inventor/fields/SoSFNode.h>
40#include <Inventor/fields/SoSFVec4f.h>
41#include <Inventor/nodes/SoNode.h>
42#include <Inventor/nodes/SoSubNode.h>
43#include <Inventor/elements/SoMultiTextureImageElement.h>
44
45class SoSceneTexture2P;
46
48 typedef SoNode inherited;
49
50 SO_NODE_HEADER(SoSceneTexture2);
51
52public:
53 static void initClass(void);
54 SoSceneTexture2(void);
55
56 enum Model {
57 MODULATE = SoMultiTextureImageElement::MODULATE,
58 DECAL = SoMultiTextureImageElement::DECAL,
59 BLEND = SoMultiTextureImageElement::BLEND,
60 REPLACE = SoMultiTextureImageElement::REPLACE
61 };
62
63 enum Wrap {
64 REPEAT = SoMultiTextureImageElement::REPEAT,
65 CLAMP = SoMultiTextureImageElement::CLAMP,
66 CLAMP_TO_BORDER = SoMultiTextureImageElement::CLAMP_TO_BORDER
67 };
68
74
75 enum Type {
77 RGBA8, // normal unsigned byte rgba
79 RGB32F,
80 RGBA16F,
81 RGB16F,
82
83 // FIXME: consider how many of these we should have here
84 R3_G3_B2,
85 RGB,
86 RGB4,
87 RGB5,
88 RGB8,
89 RGB10,
90 RGB12,
91 RGB16,
92 RGBA,
93 RGBA2,
94 RGBA4,
95 RGB5_A1,
96 RGB10_A2,
97 RGBA12,
98 RGBA16
99 };
100
105
111
113
114 virtual void notify(SoNotList * list);
115 virtual void write(SoWriteAction * action);
116
117 virtual void doAction(SoAction * action);
118 virtual void GLRender(SoGLRenderAction * action);
119 virtual void callback(SoCallbackAction * action);
120 virtual void rayPick(SoRayPickAction * action);
121
122protected:
123 virtual ~SoSceneTexture2(void);
124
125private:
126 SoSceneTexture2P * pimpl;
127};
128
129#endif // !COIN_SOSCENETEXTURE2_H
The SbList class is a template container class for lists.
Definition SbList.h:70
The SoAction class is the base class for all traversal actions.
Definition SoAction.h:77
The SoCallbackAction class invokes callbacks at specific nodes.
Definition SoCallbackAction.h:80
The SoGLRenderAction class renders the scene graph with OpenGL calls.
Definition SoGLRenderAction.h:50
The SoNode class is the base class for nodes used in scene graphs.
Definition SoNode.h:56
The SoNotList class is a list of SoNotRec notification records.
Definition SoNotification.h:43
The SoRayPickAction class does ray intersection with scene graphs.
Definition SoRayPickAction.h:50
The SoSFColor class is a container for an SbColor value.
Definition SoSFColor.h:40
The SoSFEnum class is a container for an enum value.
Definition SoSFEnum.h:40
The SoSFNode class is a container for a single node.
Definition SoSFNode.h:47
The SoSFVec2s class is a container for an SbVec2s vector.
Definition SoSFVec2s.h:40
The SoSFVec4f class is a container for an SbVec4f vector.
Definition SoSFVec4f.h:40
The SoSceneTexture2 class is used to create a 2D texture from a Coin scene graph.
Definition SoSceneTexture2.h:47
TransparencyFunction
Definition SoSceneTexture2.h:69
@ ALPHA_BLEND
Definition SoSceneTexture2.h:71
@ NONE
Definition SoSceneTexture2.h:70
SoSFEnum type
Definition SoSceneTexture2.h:112
SoSFEnum wrapS
Definition SoSceneTexture2.h:101
Model
Definition SoSceneTexture2.h:56
SoSFColor blendColor
Definition SoSceneTexture2.h:104
SoSFVec4f backgroundColor
Definition SoSceneTexture2.h:106
SoSFEnum model
Definition SoSceneTexture2.h:103
SoSFEnum wrapT
Definition SoSceneTexture2.h:102
Wrap
Definition SoSceneTexture2.h:63
SoSFNode scene
Definition SoSceneTexture2.h:108
Type
Definition SoSceneTexture2.h:75
@ RGBA8
Definition SoSceneTexture2.h:77
@ DEPTH
Definition SoSceneTexture2.h:76
@ RGBA32F
Definition SoSceneTexture2.h:78
SoSFNode sceneTransparencyType
Definition SoSceneTexture2.h:109
SoSFEnum transparencyFunction
Definition SoSceneTexture2.h:110
SoSFVec2s size
Definition SoSceneTexture2.h:107
The SoWriteAction class writes a scene graph to file.
Definition SoWriteAction.h:42