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 50 SO_NODE_HEADER(SoSceneTexture2); 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 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 122 protected: 123 virtual ~SoSceneTexture2(void); 124 125 private: 126 SoSceneTexture2P * pimpl; 127 }; 128 129 #endif // !COIN_SOSCENETEXTURE2_H 130