Documentation


morphingNode.h

Go to the documentation of this file.
00001 
00002 //                            morphingNode.h                                  //
00004 
00005 #ifndef MORPHING_NODE_H
00006 #define MORPHING_NODE_H
00007 
00008 #include <animal/X3DTK/X4DNode.h>
00009 
00010 #include <animal/engine/morphingEngine.h>
00011 #include <animal/engine/AnimalEngineNode.h>
00012 
00013 namespace X3DTK {
00015   typedef SFFloat Key;
00016 
00018   typedef MFVec3f Values;
00019 
00021   class Morphings : public std::map<Key, Values>
00022   {
00023     public:
00024       typedef X3DTK::Key Key;
00025       typedef X3DTK::Values Values;
00026   };
00027   
00029   typedef MFFloat Keys;
00030 
00032   typedef MFVec3f KeyValues;
00033 
00035   typedef animal::MorphingEngine<Morphings, X3DTK::SFFloat> AMorphingEngine;
00036 
00037   namespace X3D {
00038 
00040   class MorphingNode
00041        : public AnimalEngineNode<AMorphingEngine>
00042 /*       , public X4DNode*/
00043   {
00044     public:
00046     MorphingNode();
00047 //    /// Constructs a key frame node from its attributes.
00048 //    MorphingNode(const SFInt32 &methodeID,
00049 //                 const Keys &keys,
00050 //                 const KeyValues &keyValues,
00051 //                 SFNode coordinate);
00052 
00054     ~MorphingNode();
00055 
00058     virtual void init();
00059     
00061     virtual void updateBoundingBox(){}
00062     
00064     virtual void close();
00065   
00068     void setKeys(const Keys &keys);
00070     void setKeyValues(const KeyValues &keyValues);
00071  
00074     inline const Keys &getKeys() const { return _keys; }
00076     inline const KeyValues &getKeyValues() const { return _keyValues; }
00078     inline Coordinate * getCoordinate() const { return _coordinate; }
00079 
00080     void declareOutputs( X3D_X3DNodeList& list );
00081 
00082   private:
00084     Keys _keys;
00085   
00087     KeyValues _keyValues;
00088   
00090     Coordinate* _coordinate;
00091     
00092   };//MorphingNode
00093 
00094   } // X3D
00095 }   // X3DTK
00096 
00097 #endif
00098 
00099 /*
00100   \example x3dtk_test.cpp
00101   This is an example of how to simply use the existed engines in AnimAL-X3DTK-Qt
00102   library:
00103   
00104   animal::MorphingEngine, animal::MassSpringEngine...
00105   
00106   and their corresponding x3d node (X3DTK::X3D::MorphingNode,
00107   X3DTK::X3D::MassSpringNode) and GUI (X3DTK::Qt::MorphingEngineQt,
00108   X3DTK::Qt::MassSpringEngineQt).
00109 
00110 */
00111 
00112 
00113 //  \example files-x3d/smile_animate.x3d
00114 //  This is an example of how to simply use the animal::MorphingEngine in AnimAL-X3DTK-Qt
00115 //  library, its corresponding x3d node (X3DTK::X3D::MorphingNode,) and GUI (X3DTK::Qt::MorphingEngineQt).
00116 
00117 

Generated on Thu Dec 23 13:52:26 2004 by doxygen 1.3.6