00001 /* 00002 * Animation joint group header 00003 * 00004 * This file is part of the "SoftPixel Engine" (Copyright (c) 2008 by Lukas Hermanns) 00005 * See "SoftPixelEngine.hpp" for license information. 00006 */ 00007 00008 #ifndef __SP_ANIMATION_JOINT_GROUP_H__ 00009 #define __SP_ANIMATION_JOINT_GROUP_H__ 00010 00011 00012 #include "Base/spStandard.hpp" 00013 #include "SceneGraph/Animation/spAnimationPlayback.hpp" 00014 #include "SceneGraph/Animation/spAnimationJoint.hpp" 00015 #include "SceneGraph/Animation/spAnimationBaseStructures.hpp" 00016 #include "SceneGraph/Animation/spKeyframeSequence.hpp" 00017 00018 #include <vector> 00019 00020 00021 namespace sp 00022 { 00023 namespace scene 00024 { 00025 00026 00028 struct SJointKeyframe 00029 { 00030 SJointKeyframe() : Joint(0) 00031 { 00032 } 00033 ~SJointKeyframe() 00034 { 00035 } 00036 00037 /* Members */ 00038 AnimationJoint* Joint; 00039 KeyframeSequence Sequence; 00040 }; 00041 00042 00048 class SP_EXPORT AnimationJointGroup 00049 { 00050 00051 public: 00052 00053 AnimationJointGroup(); 00054 ~AnimationJointGroup(); 00055 00056 /* === Functions === */ 00057 00059 void clearJoints(); 00060 00061 /* === Inline functions === */ 00062 00063 inline void setName(const io::stringc &Name) 00064 { 00065 Name_ = Name; 00066 } 00067 inline io::stringc getName() const 00068 { 00069 return Name_; 00070 } 00071 00072 inline const AnimationPlayback& getPlayback() const 00073 { 00074 return Playback_; 00075 } 00076 inline AnimationPlayback& getPlayback() 00077 { 00078 return Playback_; 00079 } 00080 00081 private: 00082 00083 friend class SkeletalAnimation; 00084 00085 /* === Members === */ 00086 00087 io::stringc Name_; 00088 AnimationPlayback Playback_; 00089 std::vector<SJointKeyframe*> JointKeyframesRef_; 00090 00091 }; 00092 00093 00094 } // /namespace scene 00095 00096 } // /namespace sp 00097 00098 00099 #endif 00100 00101 00102 00103 // ================================================================================