Coin Logo Coin3D is Free Software,
published under the BSD 3-clause license.
https://bitbucket.org/Coin3D/
http://www.kongsberg.com/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 
45 class SoSceneTexture2P;
46 
47 class COIN_DLL_API SoSceneTexture2 : public SoNode {
48  typedef SoNode inherited;
49 
51 
52 public:
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 
72  ALPHA_TEST
73  };
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 
122 protected:
123  virtual ~SoSceneTexture2(void);
124 
125 private:
126  SoSceneTexture2P * pimpl;
127 };
128 
129 #endif // !COIN_SOSCENETEXTURE2_H
The SoBase class is the top-level superclass for a number of class-hierarchies.
Definition: SoBase.h:45
SoSFEnum wrapS
Definition: SoSceneTexture2.h:101
The SoSFVec2s class is a container for an SbVec2s vector.
Definition: SoSFVec2s.h:40
SoSFNode scene
Definition: SoSceneTexture2.h:108
SoSFVec2s size
Definition: SoSceneTexture2.h:107
The SoRayPickAction class does ray intersection with scene graphs.
Definition: SoRayPickAction.h:50
virtual void notify(SoNotList *l)
Definition: SoNode.cpp:461
#define SO_NODE_HEADER(classname)
SoSFVec4f backgroundColor
Definition: SoSceneTexture2.h:106
The SoSceneTexture2 class is used to create a 2D texture from a Coin scene graph. ...
Definition: SoSceneTexture2.h:47
The SoSFVec4f class is a container for an SbVec4f vector.
Definition: SoSFVec4f.h:40
SoSFEnum type
Definition: SoSceneTexture2.h:112
TransparencyFunction
Definition: SoSceneTexture2.h:69
Wrap
Definition: SoSceneTexture2.h:63
Definition: SoSceneTexture2.h:76
Definition: SoSceneTexture2.h:71
The SoSFColor class is a container for an SbColor value.
Definition: SoSFColor.h:40
The SoNode class is the base class for nodes used in scene graphs.
Definition: SoNode.h:56
SoSFEnum model
Definition: SoSceneTexture2.h:103
The SoSFEnum class is a container for an enum value.
Definition: SoSFEnum.h:40
SoSFNode sceneTransparencyType
Definition: SoSceneTexture2.h:109
virtual void rayPick(SoRayPickAction *action)
Definition: SoNode.cpp:1139
The SoSFNode class is a container for a single node.
Definition: SoSFNode.h:47
The SoAction class is the base class for all traversal actions.
Definition: SoAction.h:77
Definition: SoSceneTexture2.h:78
SoSFColor blendColor
Definition: SoSceneTexture2.h:104
virtual void doAction(SoAction *action)
Definition: SoNode.cpp:809
Type
Definition: SoSceneTexture2.h:75
Model
Definition: SoSceneTexture2.h:56
The SoCallbackAction class invokes callbacks at specific nodes.
Definition: SoCallbackAction.h:80
Definition: SoSceneTexture2.h:77
SoSFEnum transparencyFunction
Definition: SoSceneTexture2.h:110
The SoWriteAction class writes a scene graph to file.
Definition: SoWriteAction.h:42
virtual void GLRender(SoGLRenderAction *action)
Definition: SoNode.cpp:954
The SoNotList class is a list of SoNotRec notification records.
Definition: SoNotification.h:43
virtual void write(SoWriteAction *action)
Definition: SoNode.cpp:1241
virtual void callback(SoCallbackAction *action)
Definition: SoNode.cpp:1026
Definition: SoSceneTexture2.h:70
SoSFEnum wrapT
Definition: SoSceneTexture2.h:102
The SoGLRenderAction class renders the scene graph with OpenGL calls.
Definition: SoGLRenderAction.h:50