FCDocument/FCDAnimationChannel.h

Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2005-2006 Feeling Software Inc.
00003     MIT License: http://www.opensource.org/licenses/mit-license.php
00004 */
00005 /*
00006     Based on the FS Import classes:
00007     Copyright (C) 2005-2006 Feeling Software Inc
00008     Copyright (C) 2005-2006 Autodesk Media Entertainment
00009     MIT License: http://www.opensource.org/licenses/mit-license.php
00010 */
00011 
00017 #ifndef _FCD_ANIMATION_CHANNEL_H_
00018 #define _FCD_ANIMATION_CHANNEL_H_
00019 
00020 #include "FCDocument/FCDObject.h"
00021 
00022 class FCDocument;
00023 class FCDAnimated;
00024 class FCDAnimation;
00025 class FCDAnimationCurve;
00026 
00028 typedef vector<FCDAnimationCurve*> FCDAnimationCurveList;
00029 
00038 class FCOLLADA_EXPORT FCDAnimationChannel : public FCDObject
00039 {
00040 private:
00041     DeclareObjectType;
00042     FCDAnimation* parent;
00043 
00044     // Channel target
00045     string targetPointer;
00046     string targetQualifier;
00047 
00048     // Maya-specific: the driver for this/these curves
00049     string driverPointer;
00050     int32 driverQualifier;
00051 
00052     FCDAnimationCurveList curves;
00053 
00054 public:
00059     FCDAnimationChannel(FCDocument* document, FCDAnimation* parent);
00060 
00063     virtual ~FCDAnimationChannel();
00064     
00067     FCDAnimation* GetParent() { return parent; }
00068     const FCDAnimation* GetParent() const { return parent; } 
00072     const FCDAnimationCurveList& GetCurves() const { return curves; }
00073 
00076     size_t GetCurveCount() const { return curves.size(); }
00077 
00082     FCDAnimationCurve* GetCurve(size_t index) { FUAssert(index < GetCurveCount(), return NULL); return curves.at(index); }
00083     const FCDAnimationCurve* GetCurve(size_t index) const { FUAssert(index < GetCurveCount(), return NULL); return curves.at(index); } 
00087     FCDAnimationCurve* AddCurve();
00088 
00093     void ReleaseCurve(FCDAnimationCurve* curve);
00094 
00099     const string& GetTargetPointer() const { return targetPointer; }
00100 
00106     const string& GetTargetQualifier() const { return targetQualifier; }
00107 
00111     void SetTargetPointer(const string& p) { targetPointer = p; }
00112 
00116     bool LinkDriver(FCDAnimated* animated);
00117 
00121     FUStatus CheckDriver();
00122 
00127     FUStatus LoadFromXML(xmlNode* channelNode);
00128 
00132     void WriteToXML(xmlNode* parentNode) const;
00133 };
00134 
00135 #endif // _FCD_ANIMATION_CHANNEL_H_

Generated on Fri May 12 16:44:38 2006 for FCollada by  doxygen 1.4.6-NO