Coin: SoSceneTexture2.h Source File

| Coin3D is Free Software, published under the BSD 3-clause license. | https://coin3d.github.io https://www.kongsberg.com/en/kogt/

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
47 class COIN_DLL_API SoSceneTexture2 : public SoNode {
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
69 enum TransparencyFunction {
70 NONE,
71 ALPHA_BLEND,
72 ALPHA_TEST
73 };
74
75 enum Type {
76 DEPTH,
77 RGBA8, // normal unsigned byte rgba
78 RGBA32F,
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
101 SoSFEnum wrapS;
102 SoSFEnum wrapT;
103 SoSFEnum model;
104 SoSFColor blendColor;
105
106 SoSFVec4f backgroundColor;
107 SoSFVec2s size;
108 SoSFNode scene;
109 SoSFNode sceneTransparencyType;
110 SoSFEnum transparencyFunction;
111
112 SoSFEnum type;
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
SoAction
The SoAction class is the base class for all traversal actions.
Definition SoAction.h:77
SoCallbackAction
The SoCallbackAction class invokes callbacks at specific nodes.
Definition SoCallbackAction.h:80
SoGLRenderAction
The SoGLRenderAction class renders the scene graph with OpenGL calls.
Definition SoGLRenderAction.h:50
SoNode
The SoNode class is the base class for nodes used in scene graphs.
Definition SoNode.h:56
SoNode::notify
virtual void notify(SoNotList *l)
Definition SoNode.cpp:506
SoNode::doAction
virtual void doAction(SoAction *action)
Definition SoNode.cpp:858
SoNode::callback
virtual void callback(SoCallbackAction *action)
Definition SoNode.cpp:1075
SoNode::rayPick
virtual void rayPick(SoRayPickAction *action)
Definition SoNode.cpp:1188
SoNode::write
virtual void write(SoWriteAction *action)
Definition SoNode.cpp:1290
SoNode::initClass
static void initClass(void)
Sets up initialization for data common to all instances of this class, like submitting necessary info...
Definition SoNode.cpp:573
SoNode::GLRender
virtual void GLRender(SoGLRenderAction *action)
Definition SoNode.cpp:1003
SoNotList
The SoNotList class is a list of SoNotRec notification records.
Definition SoNotification.h:43
SoRayPickAction
The SoRayPickAction class does ray intersection with scene graphs.
Definition SoRayPickAction.h:50
SoSFColor
The SoSFColor class is a container for an SbColor value.
Definition SoSFColor.h:40
SoSFEnum
The SoSFEnum class is a container for an enum value.
Definition SoSFEnum.h:40
SoSFNode
The SoSFNode class is a container for a single node.
Definition SoSFNode.h:47
SoSFVec2s
The SoSFVec2s class is a container for an SbVec2s vector.
Definition SoSFVec2s.h:40
SoSFVec4f
The SoSFVec4f class is a container for an SbVec4f vector.
Definition SoSFVec4f.h:40
SoSceneTexture2
The SoSceneTexture2 class is used to create a 2D texture from a Coin scene graph.
Definition SoSceneTexture2.h:47
SoSceneTexture2::TransparencyFunction
TransparencyFunction
Definition SoSceneTexture2.h:69
SoSceneTexture2::ALPHA_BLEND
@ ALPHA_BLEND
Definition SoSceneTexture2.h:71
SoSceneTexture2::NONE
@ NONE
Definition SoSceneTexture2.h:70
SoSceneTexture2::wrapS
SoSFEnum wrapS
Definition SoSceneTexture2.h:101
SoSceneTexture2::Model
Model
Definition SoSceneTexture2.h:56
SoSceneTexture2::blendColor
SoSFColor blendColor
Definition SoSceneTexture2.h:104
SoSceneTexture2::backgroundColor
SoSFVec4f backgroundColor
Definition SoSceneTexture2.h:106
SoSceneTexture2::type
SoSFEnum type
Definition SoSceneTexture2.h:112
SoSceneTexture2::model
SoSFEnum model
Definition SoSceneTexture2.h:103
SoSceneTexture2::wrapT
SoSFEnum wrapT
Definition SoSceneTexture2.h:102
SoSceneTexture2::Wrap
Wrap
Definition SoSceneTexture2.h:63
SoSceneTexture2::scene
SoSFNode scene
Definition SoSceneTexture2.h:108
SoSceneTexture2::Type
Type
Definition SoSceneTexture2.h:75
SoSceneTexture2::RGBA32F
@ RGBA32F
Definition SoSceneTexture2.h:78
SoSceneTexture2::DEPTH
@ DEPTH
Definition SoSceneTexture2.h:76
SoSceneTexture2::RGBA8
@ RGBA8
Definition SoSceneTexture2.h:77
SoSceneTexture2::sceneTransparencyType
SoSFNode sceneTransparencyType
Definition SoSceneTexture2.h:109
SoSceneTexture2::transparencyFunction
SoSFEnum transparencyFunction
Definition SoSceneTexture2.h:110
SoSceneTexture2::size
SoSFVec2s size
Definition SoSceneTexture2.h:107
SoWriteAction
The SoWriteAction class writes a scene graph to file.
Definition SoWriteAction.h:42