![]() |
http://www.sim.no/ http://www.coin3d.org/ |
00001 #ifndef COIN_SODEPTHBUFFERELEMENT_H 00002 #define COIN_SODEPTHBUFFERELEMENT_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 #include <Inventor/SbVec2f.h> 00030 00031 class COIN_DLL_API SoDepthBufferElement : public SoElement { 00032 typedef SoElement inherited; 00033 SO_ELEMENT_HEADER(SoDepthBufferElement); 00034 00035 public: 00036 static void initClass(void); 00037 00038 enum DepthWriteFunction { 00039 NEVER, 00040 ALWAYS, 00041 LESS, 00042 LEQUAL, 00043 EQUAL, 00044 GEQUAL, 00045 GREATER, 00046 NOTEQUAL 00047 }; 00048 00049 static void set(SoState * state, SbBool test, SbBool write, 00050 DepthWriteFunction function, SbVec2f range); 00051 00052 static void get(SoState * state, SbBool & test_out, SbBool & write_out, 00053 DepthWriteFunction & function_out, SbVec2f & range_out); 00054 00055 static SbBool getTestEnable(SoState * state); 00056 static SbBool getWriteEnable(SoState * state); 00057 static DepthWriteFunction getFunction(SoState * state); 00058 static SbVec2f getRange(SoState * state); 00059 00060 virtual void init(SoState * state); 00061 virtual void push(SoState * state); 00062 virtual void pop(SoState * state, 00063 const SoElement * prevTopElement); 00064 00065 virtual SbBool matches(const SoElement * element) const; 00066 virtual SoElement * copyMatchInfo(void) const; 00067 00068 protected: 00069 virtual ~SoDepthBufferElement(); 00070 00071 virtual void setElt(SbBool test, SbBool write, 00072 DepthWriteFunction function, SbVec2f range); 00073 00074 SbBool test; 00075 SbBool write; 00076 DepthWriteFunction function; 00077 SbVec2f range; 00078 00079 }; // SoDepthBufferElement 00080 00081 #endif // !COIN_SODEPTHBUFFERELEMENT_H
Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.
Generated for Coin by Doxygen 1.7.5.1.