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-2020 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : VSG (MMM YYYY) 00022 **=======================================================================*/ 00023 /*============================================================================== 00024 * File : SoGLEnvironmentElement.h 00025 * Classes : SoGLEnvironmentElement 00026 * Author(s) : N. DAGUISE 00027 * Date : 9 jan 2008 00028 *============================================================================== 00029 * 00030 * Description : Element that store the current environement in GL. 00031 * 00032 *============================================================================*/ 00033 00034 /* include files */ 00035 #ifndef _SO_GL_ENVIRONMENT_ELEMENT_ 00036 #define _SO_GL_ENVIRONMENT_ELEMENT_ 00037 00038 #include <Inventor/sys/port.h> 00039 #include <Inventor/elements/SoEnvironmentElement.h> 00040 #include <SoDeprecationRules.h> 00041 00056 SoEXTENDER_Documented class SoDEPRECATED SoGLEnvironmentElement : public SoEnvironmentElement 00057 { 00058 SO_ELEMENT_HEADER(SoGLEnvironmentElement) ; 00059 00060 public: 00065 virtual void push(SoState *state) ; 00066 00070 virtual void pop(SoState *state, const SoElement *prevTopElement) ; 00071 00072 private: 00073 00075 virtual void init(SoState *state); 00076 00077 private: 00079 static void initClass() ; 00080 00082 static void exitClass() ; 00083 00084 private: 00086 virtual void setElt(float ambientIntensity, const SbColor &ambientColor, 00087 const SbVec3f attenuation, FogType fogType, const 00088 SbColor fogColor, float fogVisibility) ; 00089 00090 virtual void setElt(const EnvironmentParameters& envParams) ; 00091 00092 00094 virtual ~SoGLEnvironmentElement() ; 00095 00096 private: 00104 SoState *copiedFromParent ; 00105 00106 SoState* m_state; 00107 00109 void send() ; 00110 00112 static float computeDensity(float visibility, SbBool squared); 00113 00114 } ; 00115 00116 #endif /* _SO_GL_ENVIRONMENT_ELEMENT_ */ 00117 00118 00119