PixelLightAPI
.
|
00001 /*********************************************************\ 00002 * File: SNSphereFog.h * 00003 * 00004 * Copyright (C) 2002-2012 The PixelLight Team (http://www.pixellight.org/) 00005 * 00006 * This file is part of PixelLight. 00007 * 00008 * PixelLight is free software: you can redistribute it and/or modify 00009 * it under the terms of the GNU Lesser General Public License as published by 00010 * the Free Software Foundation, either version 3 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * PixelLight is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public License 00019 * along with PixelLight. If not, see <http://www.gnu.org/licenses/>. 00020 \*********************************************************/ 00021 00022 00023 #ifndef __PLSCENE_SPHEREFOG_H__ 00024 #define __PLSCENE_SPHEREFOG_H__ 00025 #pragma once 00026 00027 00028 //[-------------------------------------------------------] 00029 //[ Includes ] 00030 //[-------------------------------------------------------] 00031 #include "PLScene/Scene/SNFog.h" 00032 00033 00034 //[-------------------------------------------------------] 00035 //[ Namespace ] 00036 //[-------------------------------------------------------] 00037 namespace PLScene { 00038 00039 00040 //[-------------------------------------------------------] 00041 //[ Classes ] 00042 //[-------------------------------------------------------] 00043 /** 00044 * @brief 00045 * Spherical volumetric fog scene node 00046 */ 00047 class SNSphereFog : public SNFog { 00048 00049 00050 //[-------------------------------------------------------] 00051 //[ Public definitions ] 00052 //[-------------------------------------------------------] 00053 public: 00054 static PLS_API const float MinRange; /**< Minimum fog range (0.0001) */ 00055 00056 00057 //[-------------------------------------------------------] 00058 //[ RTTI interface ] 00059 //[-------------------------------------------------------] 00060 pl_class(PLS_RTTI_EXPORT, SNSphereFog, "PLScene", PLScene::SNFog, "Spherical volumetric fog scene node") 00061 // Attributes 00062 pl_attribute(Range, float, 1.0f, ReadWrite, GetSet, "Fog range", "Min='0.0001'") 00063 pl_attribute(Volumetricy, float, 1.0f, ReadWrite, DirectValue, "Fog volume", "") 00064 // Constructors 00065 pl_constructor_0(DefaultConstructor, "Default constructor", "") 00066 pl_class_end 00067 00068 00069 //[-------------------------------------------------------] 00070 //[ Public RTTI get/set functions ] 00071 //[-------------------------------------------------------] 00072 public: 00073 PLS_API float GetRange() const; 00074 PLS_API void SetRange(float fValue); 00075 00076 00077 //[-------------------------------------------------------] 00078 //[ Public functions ] 00079 //[-------------------------------------------------------] 00080 public: 00081 /** 00082 * @brief 00083 * Default constructor 00084 */ 00085 PLS_API SNSphereFog(); 00086 00087 /** 00088 * @brief 00089 * Destructor 00090 */ 00091 PLS_API virtual ~SNSphereFog(); 00092 00093 00094 //[-------------------------------------------------------] 00095 //[ Private data ] 00096 //[-------------------------------------------------------] 00097 private: 00098 float m_fRange; /**< Fog range */ 00099 00100 00101 //[-------------------------------------------------------] 00102 //[ Public virtual SNFog functions ] 00103 //[-------------------------------------------------------] 00104 public: 00105 PLS_API virtual bool IsSphereFog() const override; 00106 00107 00108 //[-------------------------------------------------------] 00109 //[ Protected virtual SceneNode functions ] 00110 //[-------------------------------------------------------] 00111 protected: 00112 PLS_API virtual void UpdateAABoundingBox() override; 00113 PLS_API virtual void GetBoundingSphere(PLMath::Sphere &cSphere) override; 00114 PLS_API virtual void GetContainerBoundingSphere(PLMath::Sphere &cSphere) override; 00115 00116 00117 }; 00118 00119 00120 //[-------------------------------------------------------] 00121 //[ Namespace ] 00122 //[-------------------------------------------------------] 00123 } // PLScene 00124 00125 00126 #endif // __PLSCENE_SPHEREFOG_H__
|