PixelLightAPI  .
SNEffectLight.h
Go to the documentation of this file.
00001 /*********************************************************\
00002  *  File: SNEffectLight.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_EFFECTLIGHT_H__
00024 #define __PLSCENE_EFFECTLIGHT_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/SNLight.h"
00034 
00035 
00036 //[-------------------------------------------------------]
00037 //[ Namespace                                             ]
00038 //[-------------------------------------------------------]
00039 namespace PLScene {
00040 
00041 
00042 //[-------------------------------------------------------]
00043 //[ Classes                                               ]
00044 //[-------------------------------------------------------]
00045 /**
00046 *  @brief
00047 *    Effect light scene node
00048 */
00049 class SNEffectLight : public SNLight {
00050 
00051 
00052     //[-------------------------------------------------------]
00053     //[ RTTI interface                                        ]
00054     //[-------------------------------------------------------]
00055     pl_class(PLS_RTTI_EXPORT, SNEffectLight, "PLScene", PLScene::SNLight, "Effect light scene node")
00056         // Attributes
00057         pl_attribute(CoronaMaterial,    PLCore::String, "Data/Effects/DefaultCorona.plfx",  ReadWrite,  GetSet, "Corona material",  "Type='Material Effect Image TextureAni'")
00058         pl_attribute(FlareMaterial,     PLCore::String, "Data/Effects/DefaultFlare.plfx",   ReadWrite,  GetSet, "Flare material",   "Type='Material Effect Image TextureAni'")
00059         pl_attribute(BlendMaterial,     PLCore::String, "Data/Effects/DefaultBlend.plfx",   ReadWrite,  GetSet, "Blend material",   "Type='Material Effect Image TextureAni'")
00060         // Constructors
00061         pl_constructor_0(DefaultConstructor,    "Default constructor",  "")
00062     pl_class_end
00063 
00064 
00065     //[-------------------------------------------------------]
00066     //[ Public RTTI get/set functions                         ]
00067     //[-------------------------------------------------------]
00068     public:
00069         PLS_API PLCore::String GetCoronaMaterial() const;
00070         PLS_API void SetCoronaMaterial(const PLCore::String &sValue);
00071         PLS_API PLCore::String GetFlareMaterial() const;
00072         PLS_API void SetFlareMaterial(const PLCore::String &sValue);
00073         PLS_API PLCore::String GetBlendMaterial() const;
00074         PLS_API void SetBlendMaterial(const PLCore::String &sValue);
00075 
00076 
00077     //[-------------------------------------------------------]
00078     //[ Public functions                                      ]
00079     //[-------------------------------------------------------]
00080     public:
00081         /**
00082         *  @brief
00083         *    Default constructor
00084         */
00085         PLS_API SNEffectLight();
00086 
00087         /**
00088         *  @brief
00089         *    Destructor
00090         */
00091         PLS_API virtual ~SNEffectLight();
00092 
00093         /**
00094         *  @brief
00095         *    Returns the handler of the corona material
00096         *
00097         *  @return
00098         *    Handler of the corona material
00099         */
00100         PLS_API const PLRenderer::MaterialHandler &GetCoronaMaterialHandler();
00101 
00102         /**
00103         *  @brief
00104         *    Returns the handler of the flare material
00105         *
00106         *  @return
00107         *    Handler of the flare material
00108         */
00109         PLS_API const PLRenderer::MaterialHandler &GetFlareMaterialHandler();
00110 
00111         /**
00112         *  @brief
00113         *    Returns the handler of the blend material
00114         *
00115         *  @return
00116         *    Handler of the blend material
00117         */
00118         PLS_API const PLRenderer::MaterialHandler &GetBlendMaterialHandler();
00119 
00120 
00121     //[-------------------------------------------------------]
00122     //[ Private data                                          ]
00123     //[-------------------------------------------------------]
00124     private:
00125         bool                        m_bCoronaMaterial;  /**< Corona material loaded? */
00126         PLCore::String              m_sCoronaMaterial;  /**< Corona material */
00127         PLRenderer::MaterialHandler m_cCoronaMaterial;  /**< Corona material */
00128         bool                        m_bFlareMaterial;   /**< Flare material loaded? */
00129         PLCore::String              m_sFlareMaterial;   /**< Flare material */
00130         PLRenderer::MaterialHandler m_cFlareMaterial;   /**< Flare material */
00131         bool                        m_bBlendMaterial;   /**< Blend material loaded? */
00132         PLCore::String              m_sBlendMaterial;   /**< Blend material */
00133         PLRenderer::MaterialHandler m_cBlendMaterial;   /**< Blend material */
00134 
00135 
00136     //[-------------------------------------------------------]
00137     //[ Public virtual SNLight functions                      ]
00138     //[-------------------------------------------------------]
00139     public:
00140         PLS_API virtual bool IsEffectLight() const override;
00141 
00142 
00143 };
00144 
00145 
00146 //[-------------------------------------------------------]
00147 //[ Namespace                                             ]
00148 //[-------------------------------------------------------]
00149 } // PLScene
00150 
00151 
00152 #endif // __PLSCENE_EFFECTLIGHT_H__


PixelLight PixelLight 0.9.10-R1
Copyright (C) 2002-2011 by The PixelLight Team
Last modified Fri Dec 23 2011 15:51:02
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported