00001 /*======================================================================= 00002 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), *** 00003 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. *** 00004 *** *** 00005 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS *** 00006 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR *** 00007 *** WRITTEN AUTHORIZATION OF FEI S.A.S. *** 00008 *** *** 00009 *** RESTRICTED RIGHTS LEGEND *** 00010 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS *** 00011 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN *** 00012 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT *** 00013 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN *** 00014 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. *** 00015 *** *** 00016 *** COPYRIGHT (C) 1996-2022 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : VSG (MMM YYYY) 00022 **=======================================================================*/ 00023 #ifndef _SO_DEPTH_BUFFER_H_ 00024 #define _SO_DEPTH_BUFFER_H_ 00025 00026 #include <Inventor/SbPImpl.h> 00027 #include <Inventor/nodes/SoNode.h> 00028 #include <Inventor/elements/SoDepthBufferElement.h> 00029 00030 #include <Inventor/fields/SoSFEnum.h> 00031 #include <Inventor/fields/SoSFBool.h> 00032 #include <Inventor/fields/SoSFVec2f.h> 00033 00034 00035 class SoGLRenderAction; 00036 00037 SO_PIMPL_PUBLIC_DECLARATION( SoDepthBuffer ) 00038 00039 00091 class SoDepthBuffer : public SoNode 00092 { 00093 SO_NODE_HEADER(SoDepthBuffer); 00094 SO_PIMPL_PUBLIC_HEADER( SoDepthBuffer ) 00095 00096 public: 00100 enum DepthWriteFunction { 00102 NEVER = SoDepthBufferElement::NEVER, 00104 LESS = SoDepthBufferElement::LESS , 00106 EQUAL = SoDepthBufferElement::EQUAL , 00108 LEQUAL = SoDepthBufferElement::LEQUAL, 00110 GREATER = SoDepthBufferElement::GREATER, 00112 NOTEQUAL = SoDepthBufferElement::NOTEQUAL, 00114 GEQUAL = SoDepthBufferElement::GEQUAL, 00116 ALWAYS = SoDepthBufferElement::ALWAYS 00117 }; 00118 00126 SoSFBool test; 00127 00131 SoSFBool write; 00132 00137 SoSFEnum function; 00138 00143 SoSFVec2f range; 00144 00156 SoSFBool clearBuffer; 00157 00159 SoDepthBuffer(); 00160 00164 inline virtual void setOverride(const SbBool state) 00165 { override.setValue(state); } 00166 00170 inline virtual SbBool isOverride() const 00171 { return override.getValue(); } 00172 00173 private: 00174 00176 virtual void doAction(SoAction *action); 00177 00179 virtual void callback(SoCallbackAction* action); 00180 00182 virtual void GLRender(SoGLRenderAction * action); 00183 00184 00185 private: 00187 static void initClass(); 00188 00190 static void exitClass(); 00191 00192 SoSFBool override; 00193 00194 private: 00196 virtual ~SoDepthBuffer(); 00197 00198 private: 00199 void commonConstructor(); 00200 }; 00201 00202 #endif /* _SO_DEPTH_BUFFER_H_ */ 00203 00204 00205