![]() |
http://www.sim.no/ http://www.coin3d.org/ |
00001 #ifndef COIN_SOSHAPESTYLEELEMENT_H 00002 #define COIN_SOSHAPESTYLEELEMENT_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/SoSubElement.h> 00028 00029 class COIN_DLL_API SoShapeStyleElement : public SoElement { 00030 typedef SoElement inherited; 00031 00032 SO_ELEMENT_HEADER(SoShapeStyleElement); 00033 public: 00034 static void initClass(void); 00035 protected: 00036 virtual ~SoShapeStyleElement(); 00037 00038 public: 00039 00040 // flags used for optimized testing of features 00041 enum Flags { 00042 LIGHTING = 0x00000100, 00043 TEXENABLED = 0x00000200, 00044 TEXFUNC = 0x00000400, 00045 BBOXCMPLX = 0x00000800, 00046 INVISIBLE = 0x00001000, 00047 ABORTCB = 0x00002000, 00048 OVERRIDE = 0x00004000, 00049 TEX3ENABLED = 0x00008000, 00050 BIGIMAGE = 0x00010000, 00051 BUMPMAP = 0x00020000, 00052 VERTEXARRAY = 0x00040000, 00053 TRANSP_TEXTURE = 0x00080000, 00054 TRANSP_MATERIAL = 0x00100000, 00055 TRANSP_SORTED_TRIANGLES = 0x00200000, 00056 SHADOWMAP = 0x00400000, 00057 SHADOWS = 0x00800000 00058 }; 00059 00060 virtual void init(SoState * state); 00061 00062 virtual void push(SoState * state); 00063 virtual void pop(SoState * state, const SoElement * prevTopElement); 00064 00065 virtual SbBool matches(const SoElement * element) const; 00066 virtual SoElement * copyMatchInfo(void) const; 00067 00068 static const SoShapeStyleElement * get(SoState * const state); 00069 00070 unsigned int getFlags(void) const; 00071 SbBool mightNotRender(void) const; 00072 SbBool needNormals(void) const; 00073 SbBool needTexCoords(void) const; 00074 int getRenderCaseMask(void) const; 00075 00076 static void setDrawStyle(SoState * const state, const int32_t value); 00077 static void setComplexityType(SoState * const state, 00078 const int32_t value); 00079 static void setTransparencyType(SoState * const state, 00080 const int32_t value); 00081 static void setTextureEnabled(SoState * const state, const SbBool value); 00082 static void setTexture3Enabled(SoState * const state, const SbBool value); 00083 static void setTextureFunction(SoState * const state, 00084 const SbBool value); 00085 static void setLightModel(SoState * const state, const int32_t value); 00086 static void setOverrides(SoState * const state, const SbBool value); 00087 00088 static SbBool isScreenDoor(SoState * const state); 00089 static int getTransparencyType(SoState * const state); 00090 SbBool isTextureFunction(void) const; 00091 00092 static void setBumpmapEnabled(SoState * state, const SbBool value); 00093 static void setBigImageEnabled(SoState * state, const SbBool value); 00094 static void setVertexArrayRendering(SoState * state, const SbBool value); 00095 00096 static void setTransparentMaterial(SoState * state, const SbBool value); 00097 static void setTransparentTexture(SoState * state, const SbBool value); 00098 00099 static void setShadowMapRendering(SoState * state, const SbBool value); 00100 static void setShadowsRendering(SoState * state, const SbBool value); 00101 00102 private: 00103 00104 static SoShapeStyleElement * getElement(SoState * const state); 00105 static const SoShapeStyleElement * getConstElement(SoState * const state); 00106 00107 unsigned int flags; 00108 }; 00109 00110 #endif // !COIN_SOSHAPESTYLEELEMENT_H
Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.
Generated on Sun May 1 2011 02:58:22 for Coin by Doxygen 1.7.3.