PixelLightAPI
.
|
00001 /*********************************************************\ 00002 * File: SNProjectivePointLight.h * 00003 * 00004 * Copyright (C) 2002-2011 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_PROJECTIVEPOINTLIGHT_H__ 00024 #define __PLSCENE_PROJECTIVEPOINTLIGHT_H__ 00025 #pragma once 00026 00027 00028 //[-------------------------------------------------------] 00029 //[ Includes ] 00030 //[-------------------------------------------------------] 00031 #include <PLRenderer/Material/MaterialHandler.h> 00032 #include <PLRenderer/Material/MaterialManager.h> 00033 #include "PLScene/Scene/SNPointLight.h" 00034 00035 00036 //[-------------------------------------------------------] 00037 //[ Namespace ] 00038 //[-------------------------------------------------------] 00039 namespace PLScene { 00040 00041 00042 //[-------------------------------------------------------] 00043 //[ Classes ] 00044 //[-------------------------------------------------------] 00045 /** 00046 * @brief 00047 * Omni directional projective point light scene node 00048 */ 00049 class SNProjectivePointLight : public SNPointLight { 00050 00051 00052 //[-------------------------------------------------------] 00053 //[ Public definitions ] 00054 //[-------------------------------------------------------] 00055 public: 00056 /** 00057 * @brief 00058 * Scene node flags (SceneNode flags extension) 00059 */ 00060 enum EFlags { 00061 NoProjection = 1<<13 /**< Disable texture projection */ 00062 }; 00063 pl_enum(EFlags) 00064 pl_enum_base(SNPointLight::EFlags) 00065 pl_enum_value(NoProjection, "Disable texture projection") 00066 pl_enum_end 00067 00068 00069 //[-------------------------------------------------------] 00070 //[ RTTI interface ] 00071 //[-------------------------------------------------------] 00072 pl_class(PLS_RTTI_EXPORT, SNProjectivePointLight, "PLScene", PLScene::SNPointLight, "Omni directional projective point light scene node") 00073 // Attributes 00074 pl_attribute(ProjectedMaterial, PLCore::String, "Data/Textures/DefaultCubeMap.dds", ReadWrite, GetSet, "Projected material", "Type='Material Effect Image TextureAni'") 00075 // Overwritten SceneNode attributes 00076 pl_attribute(Flags, pl_flag_type(EFlags), 0, ReadWrite, GetSet, "Flags", "") 00077 // Constructors 00078 pl_constructor_0(DefaultConstructor, "Default constructor", "") 00079 pl_class_end 00080 00081 00082 //[-------------------------------------------------------] 00083 //[ Public RTTI get/set functions ] 00084 //[-------------------------------------------------------] 00085 public: 00086 PLS_API PLCore::String GetProjectedMaterial() const; 00087 PLS_API void SetProjectedMaterial(const PLCore::String &sValue); 00088 00089 00090 //[-------------------------------------------------------] 00091 //[ Public functions ] 00092 //[-------------------------------------------------------] 00093 public: 00094 /** 00095 * @brief 00096 * Default constructor 00097 */ 00098 PLS_API SNProjectivePointLight(); 00099 00100 /** 00101 * @brief 00102 * Destructor 00103 */ 00104 PLS_API virtual ~SNProjectivePointLight(); 00105 00106 /** 00107 * @brief 00108 * Returns the handler of the projected material 00109 * 00110 * @return 00111 * Handler of the projected material 00112 */ 00113 PLS_API const PLRenderer::MaterialHandler &GetProjectedMaterialHandler(); 00114 00115 00116 //[-------------------------------------------------------] 00117 //[ Private data ] 00118 //[-------------------------------------------------------] 00119 private: 00120 PLCore::String m_sProjectedMaterial; /**< Projected material */ 00121 bool m_bProjectedMaterial; /**< Projected material loaded? */ 00122 PLRenderer::MaterialHandler m_cProjectedMaterial; /**< Projected material */ 00123 00124 00125 //[-------------------------------------------------------] 00126 //[ Public virtual SNLight functions ] 00127 //[-------------------------------------------------------] 00128 public: 00129 PLS_API virtual bool IsProjectivePointLight() const override; 00130 00131 00132 }; 00133 00134 00135 //[-------------------------------------------------------] 00136 //[ Namespace ] 00137 //[-------------------------------------------------------] 00138 } // PLScene 00139 00140 00141 #endif // __PLSCENE_PROJECTIVEPOINTLIGHT_H__
|