![]() |
http://www.sim.no/ http://www.coin3d.org/ |
00001 #ifndef COIN_SOENVIRONMENTELEMENT_H 00002 #define COIN_SOENVIRONMENTELEMENT_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/SoReplacedElement.h> 00028 #include <Inventor/SbColor.h> 00029 00030 class COIN_DLL_API SoEnvironmentElement : public SoReplacedElement { 00031 typedef SoReplacedElement inherited; 00032 00033 SO_ELEMENT_HEADER(SoEnvironmentElement); 00034 public: 00035 static void initClass(void); 00036 protected: 00037 virtual ~SoEnvironmentElement(); 00038 00039 public: 00040 00041 enum FogType { 00042 NONE, 00043 HAZE, 00044 FOG, 00045 SMOKE 00046 }; 00047 00048 virtual void init(SoState * state); 00049 00050 static void set(SoState * const state, SoNode * const node, 00051 const float ambientIntensity, const SbColor & ambientColor, 00052 const SbVec3f & attenuation, const int32_t fogType, 00053 const SbColor & fogColor, const float fogVisibility, 00054 const float fogStart = 0.0f); 00055 static void get(SoState * const state, 00056 float & ambientIntensity, SbColor & ambientColor, 00057 SbVec3f & attenuation, int32_t & fogType, 00058 SbColor & fogColor, float & fogVisibility, 00059 float & fogStart); 00060 00061 static float getAmbientIntensity(SoState * const state); 00062 static float getFogVisibility(SoState * const state); 00063 static const SbVec3f & getLightAttenuation(SoState * const state); 00064 static const SbColor & getAmbientColor(SoState * const state); 00065 static const SbColor & getFogColor(SoState * const state); 00066 static int32_t getFogType(SoState * const state); 00067 00068 static void getDefault(float & ambientIntensity, 00069 SbColor & ambientColor, SbVec3f & attenuation, 00070 int32_t & fogType, SbColor & fogColor, 00071 float & fogVisibility, float & fogNear); 00072 00073 virtual void print(FILE * file) const; 00074 00075 protected: 00076 00077 virtual void setElt(SoState * const state, 00078 const float ambientIntensity, 00079 const SbColor & ambientColor, 00080 const SbVec3f & attenuation, 00081 const int32_t fogType, 00082 const SbColor & fogColor, 00083 const float fogVisibility, 00084 const float fogNear); 00085 00086 float ambientIntensity; 00087 SbColor ambientColor; 00088 SbVec3f attenuation; 00089 int32_t fogType; 00090 SbColor fogColor; 00091 float fogVisibility; 00092 float fogStart; 00093 }; 00094 00095 #endif // !COIN_SOENVIRONMENTELEMENT_H
Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.
Generated for Coin by Doxygen 1.5.6.