PixelLightAPI  .
AnimationManager.h
Go to the documentation of this file.
00001 /*********************************************************\
00002  *  File: AnimationManager.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 __PLRENDERER_ANIMATIONMANAGER_H__
00024 #define __PLRENDERER_ANIMATIONMANAGER_H__
00025 #pragma once
00026 
00027 
00028 //[-------------------------------------------------------]
00029 //[ Includes                                              ]
00030 //[-------------------------------------------------------]
00031 #include <PLCore/Base/Event/Event.h>
00032 #include <PLCore/Container/ElementManager.h>
00033 #include "PLRenderer/PLRenderer.h"
00034 
00035 
00036 //[-------------------------------------------------------]
00037 //[ Forward declarations                                  ]
00038 //[-------------------------------------------------------]
00039 namespace PLRenderer {
00040     class Animation;
00041 }
00042 
00043 
00044 //[-------------------------------------------------------]
00045 //[ Namespace                                             ]
00046 //[-------------------------------------------------------]
00047 namespace PLRenderer {
00048 
00049 
00050 //[-------------------------------------------------------]
00051 //[ Classes                                               ]
00052 //[-------------------------------------------------------]
00053 /**
00054 *  @brief
00055 *    This is a manager for the animation element
00056 */
00057 class AnimationManager : public PLCore::ElementManager<PLRenderer::Animation> {
00058 
00059 
00060     //[-------------------------------------------------------]
00061     //[ Events                                                ]
00062     //[-------------------------------------------------------]
00063     public:
00064         PLCore::Event<> EventAnimationFrameChange;  /**< Current animation frame change event */
00065 
00066 
00067     //[-------------------------------------------------------]
00068     //[ Public functions                                      ]
00069     //[-------------------------------------------------------]
00070     public:
00071         /**
00072         *  @brief
00073         *    Constructor
00074         */
00075         PLRENDERER_API AnimationManager();
00076 
00077         /**
00078         *  @brief
00079         *    Destructor
00080         */
00081         PLRENDERER_API virtual ~AnimationManager();
00082 
00083 
00084     //[-------------------------------------------------------]
00085     //[ Protected virtual PLCore::ElementManager functions    ]
00086     //[-------------------------------------------------------]
00087     protected:
00088         PLRENDERER_API virtual PLRenderer::Animation *CreateElement(const PLCore::String &sName) override;
00089 
00090 
00091     //[-------------------------------------------------------]
00092     //[ Private functions                                     ]
00093     //[-------------------------------------------------------]
00094     private:
00095         /**
00096         *  @brief
00097         *    Called when the frame of an animation manager animation has been changed
00098         */
00099         void OnFrameChange();
00100 
00101 
00102     //[-------------------------------------------------------]
00103     //[ Private event handlers                                ]
00104     //[-------------------------------------------------------]
00105     private:
00106         PLCore::EventHandler<> EventHandlerFrameChange;
00107 
00108 
00109 };
00110 
00111 
00112 //[-------------------------------------------------------]
00113 //[ Namespace                                             ]
00114 //[-------------------------------------------------------]
00115 } // PLRenderer
00116 
00117 
00118 #endif // __PLRENDERER_ANIMATIONMANAGER_H__


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