![]() |
http://www.sim.no/ http://www.coin3d.org/ |
00001 #ifndef COIN_SOMULTITEXTUREENABLEDELEMENT_H 00002 #define COIN_SOMULTITEXTUREENABLEDELEMENT_H 00003 00004 /**************************************************************************\ 00005 * 00006 * This file is part of the Coin 3D visualization library. 00007 * Copyright (C) by Kongsberg Oil & Gas Technologies. 00008 * 00009 * This library is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU General Public License 00011 * ("GPL") version 2 as published by the Free Software Foundation. 00012 * See the file LICENSE.GPL at the root directory of this source 00013 * distribution for additional information about the GNU GPL. 00014 * 00015 * For using Coin with software that can not be combined with the GNU 00016 * GPL, and for taking advantage of the additional benefits of our 00017 * support services, please contact Kongsberg Oil & Gas Technologies 00018 * about acquiring a Coin Professional Edition License. 00019 * 00020 * See http://www.coin3d.org/ for more information. 00021 * 00022 * Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY. 00023 * http://www.sim.no/ sales@sim.no coin-support@coin3d.org 00024 * 00025 \**************************************************************************/ 00026 00027 #include <Inventor/elements/SoElement.h> 00028 #include <Inventor/elements/SoSubElement.h> 00029 00030 class SoMultiTextureEnabledElementP; 00031 00032 class COIN_DLL_API SoMultiTextureEnabledElement : public SoElement { 00033 typedef SoElement inherited; 00034 00035 SO_ELEMENT_HEADER(SoMultiTextureEnabledElement); 00036 public: 00037 static void initClass(void); 00038 protected: 00039 virtual ~SoMultiTextureEnabledElement(); 00040 00041 public: 00042 enum Mode { 00043 DISABLED, 00044 TEXTURE2D, 00045 RECTANGLE, 00046 CUBEMAP, 00047 TEXTURE3D 00048 }; 00049 00050 virtual void init(SoState * state); 00051 static void set(SoState * state, SoNode * node, 00052 const int unit, 00053 const SbBool enabled); 00054 00055 static SbBool get(SoState * state, const int unit); 00056 00057 virtual void setElt(const int unit, const int mode); 00058 00059 virtual void push(SoState * state); 00060 virtual SbBool matches(const SoElement * elem) const; 00061 SoElement * copyMatchInfo(void) const; 00062 00063 static const SbBool * getEnabledUnits(SoState * state, 00064 int & lastenabled); 00065 static const Mode * getActiveUnits(SoState * state, 00066 int & lastenabled); 00067 00068 static void enableRectangle(SoState * state, SoNode * node, const int unit); 00069 static void enableCubeMap(SoState * state, SoNode * node, const int unit); 00070 static Mode getMode(SoState * state, const int unit); 00071 static void disableAll(SoState * state); 00072 00073 protected: 00074 SbBool isEnabled(const int unit) const; 00075 Mode getMode(const int unit) const; 00076 00077 private: 00078 SoMultiTextureEnabledElementP * pimpl; 00079 }; 00080 00081 #endif // !COIN_SOMULTITEXTUREENABLEDELEMENT_H
Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.
Generated for Coin by Doxygen 1.5.6.