PixelLightAPI
.
|
00001 /*********************************************************\ 00002 * File: AnimationFrameInfo.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_ANIMATIONFRAMEINFO_H__ 00024 #define __PLRENDERER_ANIMATIONFRAMEINFO_H__ 00025 #pragma once 00026 00027 00028 //[-------------------------------------------------------] 00029 //[ Namespace ] 00030 //[-------------------------------------------------------] 00031 namespace PLRenderer { 00032 00033 00034 //[-------------------------------------------------------] 00035 //[ Classes ] 00036 //[-------------------------------------------------------] 00037 /** 00038 * @brief 00039 * Animation frame information 00040 */ 00041 class AnimationFrameInfo { 00042 00043 00044 //[-------------------------------------------------------] 00045 //[ Public functions ] 00046 //[-------------------------------------------------------] 00047 public: 00048 /** 00049 * @brief 00050 * Constructor 00051 */ 00052 inline AnimationFrameInfo(); 00053 00054 /** 00055 * @brief 00056 * Destructor 00057 */ 00058 inline ~AnimationFrameInfo(); 00059 00060 /** 00061 * @brief 00062 * Returns the speed of an animation frame 00063 * 00064 * @return 00065 * Animation frame speed 00066 * 00067 * @note 00068 * - If speed is 0 the frame will be skipped 00069 * - If speed is less 0 there's no frame interpolation 00070 */ 00071 inline float GetSpeed() const; 00072 00073 /** 00074 * @brief 00075 * Sets the animation frame speed 00076 * 00077 * @param[in] fSpeed 00078 * Animation frame speed 00079 * 00080 * @see 00081 * - GetSpeed() 00082 */ 00083 inline void SetSpeed(float fSpeed = 1.0f); 00084 00085 /** 00086 * @brief 00087 * Copy operator 00088 * 00089 * @param[in] cSource 00090 * Source to copy from 00091 * 00092 * @return 00093 * Reference to this class instance 00094 */ 00095 inline AnimationFrameInfo &operator =(const AnimationFrameInfo &cSource); 00096 00097 /** 00098 * @brief 00099 * Compare operator 00100 * 00101 * @param[in] cSource 00102 * Source to compare with 00103 * 00104 * @return 00105 * 'true' if the two animation frame information are equal, else 'false' 00106 */ 00107 inline bool operator ==(const AnimationFrameInfo &cSource) const; 00108 00109 00110 //[-------------------------------------------------------] 00111 //[ Private data ] 00112 //[-------------------------------------------------------] 00113 private: 00114 float m_fSpeed; /**< Frame speed */ 00115 00116 00117 }; 00118 00119 00120 //[-------------------------------------------------------] 00121 //[ Namespace ] 00122 //[-------------------------------------------------------] 00123 } // PLRenderer 00124 00125 00126 //[-------------------------------------------------------] 00127 //[ Implementation ] 00128 //[-------------------------------------------------------] 00129 #include "PLRenderer/Animation/AnimationFrameInfo.inl" 00130 00131 00132 #endif // __PLRENDERER_ANIMATIONFRAMEINFO_H__
|