00001 /* 00002 Copyright (C) 2005-2007 Feeling Software Inc. 00003 Portions of the code are: 00004 Copyright (C) 2005-2007 Sony Computer Entertainment America 00005 00006 MIT License: http://www.opensource.org/licenses/mit-license.php 00007 */ 00008 /* 00009 Based on the FS Import classes: 00010 Copyright (C) 2005-2006 Feeling Software Inc 00011 Copyright (C) 2005-2006 Autodesk Media Entertainment 00012 MIT License: http://www.opensource.org/licenses/mit-license.php 00013 */ 00014 00020 #ifndef _FCD_ANIMATION_CHANNEL_H_ 00021 #define _FCD_ANIMATION_CHANNEL_H_ 00022 00023 #ifndef __FCD_OBJECT_H_ 00024 #include "FCDocument/FCDObject.h" 00025 #endif // __FCD_OBJECT_H_ 00026 #ifndef _FU_PARAMETER_H_ 00027 #include "FUtils/FUParameter.h" 00028 #endif // _FU_PARAMETER_H_ 00029 00030 class FCDAnimated; 00031 class FCDAnimation; 00032 class FCDAnimationCurve; 00033 00034 typedef fm::pvector<FCDAnimationCurve> FCDAnimationCurveList; 00044 class FCOLLADA_EXPORT FCDAnimationChannel : public FCDObject 00045 { 00046 private: 00047 DeclareObjectType(FCDObject); 00048 FCDAnimation* parent; 00049 00050 DeclareParameterContainer(FCDAnimationCurve, curves, FC("Animation Curves")); 00051 00052 public: 00057 FCDAnimationChannel(FCDocument* document, FCDAnimation* parent); 00058 00060 virtual ~FCDAnimationChannel(); 00061 00067 FCDAnimationChannel* Clone(FCDAnimationChannel* clone = NULL) const; 00068 00071 FCDAnimation* GetParent() { return parent; } 00072 const FCDAnimation* GetParent() const { return parent; } 00077 DEPRECATED(3.05A, GetCurveCount and GetCurve(index)) 00078 void GetCurves() const {} 00079 00082 size_t GetCurveCount() const { return curves.size(); } 00083 00088 FCDAnimationCurve* GetCurve(size_t index) { FUAssert(index < GetCurveCount(), return NULL); return curves.at(index); } 00089 const FCDAnimationCurve* GetCurve(size_t index) const { FUAssert(index < GetCurveCount(), return NULL); return curves.at(index); } 00093 FCDAnimationCurve* AddCurve(); 00094 }; 00095 00096 #endif // _FCD_ANIMATION_CHANNEL_H_