PixelLightAPI
.
|
00001 /*********************************************************\ 00002 * File: SNMMeshMorphCameraNear.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_SCENENODEMODIFIER_MESHMORPHCAMERANEAR_H__ 00024 #define __PLSCENE_SCENENODEMODIFIER_MESHMORPHCAMERANEAR_H__ 00025 #pragma once 00026 00027 00028 //[-------------------------------------------------------] 00029 //[ Includes ] 00030 //[-------------------------------------------------------] 00031 #include "PLScene/Scene/SceneNodeModifiers/SNMMeshMorph.h" 00032 00033 00034 //[-------------------------------------------------------] 00035 //[ Namespace ] 00036 //[-------------------------------------------------------] 00037 namespace PLScene { 00038 00039 00040 //[-------------------------------------------------------] 00041 //[ Classes ] 00042 //[-------------------------------------------------------] 00043 /** 00044 * @brief 00045 * Animated scene node mesh morph modifier class 00046 * 00047 * @remarks 00048 * This modifier can be used for a mesh morph target like 'smile' if the camera is near to the scene node. 00049 */ 00050 class SNMMeshMorphCameraNear : public SNMMeshMorph { 00051 00052 00053 //[-------------------------------------------------------] 00054 //[ RTTI interface ] 00055 //[-------------------------------------------------------] 00056 pl_class(PLS_RTTI_EXPORT, SNMMeshMorphCameraNear, "PLScene", PLScene::SNMMeshMorph, "Animated scene node mesh morph modifier class") 00057 // Attributes 00058 pl_attribute(Joint, PLCore::String, "", ReadWrite, DirectValue, "Name of the skeleton joint to use as reference point, if not given, the scene node position is used instead", "") 00059 pl_attribute(Distance, float, 1.0f, ReadWrite, DirectValue, "Camera near distance", "") 00060 pl_attribute(InSpeed, float, 4.0f, ReadWrite, DirectValue, "Blend in speed", "") 00061 pl_attribute(OutSpeed, float, 2.0f, ReadWrite, DirectValue, "Blend out speed", "") 00062 // Constructors 00063 pl_constructor_1(ParameterConstructor, SceneNode&, "Parameter constructor", "") 00064 // Slots 00065 pl_slot_0(OnUpdate, "Called when the scene node modifier needs to be updated", "") 00066 pl_class_end 00067 00068 00069 //[-------------------------------------------------------] 00070 //[ Public functions ] 00071 //[-------------------------------------------------------] 00072 public: 00073 /** 00074 * @brief 00075 * Constructor 00076 * 00077 * @param[in] cSceneNode 00078 * Owner scene node 00079 */ 00080 PLS_API SNMMeshMorphCameraNear(SceneNode &cSceneNode); 00081 00082 /** 00083 * @brief 00084 * Destructor 00085 */ 00086 PLS_API virtual ~SNMMeshMorphCameraNear(); 00087 00088 00089 //[-------------------------------------------------------] 00090 //[ Protected virtual SceneNodeModifier functions ] 00091 //[-------------------------------------------------------] 00092 protected: 00093 PLS_API virtual void OnActivate(bool bActivate) override; 00094 00095 00096 //[-------------------------------------------------------] 00097 //[ Private functions ] 00098 //[-------------------------------------------------------] 00099 private: 00100 /** 00101 * @brief 00102 * Called when the scene node modifier needs to be updated 00103 */ 00104 void OnUpdate(); 00105 00106 00107 }; 00108 00109 00110 //[-------------------------------------------------------] 00111 //[ Namespace ] 00112 //[-------------------------------------------------------] 00113 } // PLScene 00114 00115 00116 #endif // __PLSCENE_SCENENODEMODIFIER_MESHMORPHCAMERANEAR_H__
|