MeVisLabToolboxReference
MeVisLab/Standard/Sources/ML/MLBase/mlKeyFrameList.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00002 //----------------------------------------------------------------------------------
00004 
00010 // Defines the classes:
00011 // - KeyFrame: An object describing a position and orientation in space
00012 // - KeyFrameList: A list of KeyFrame items
00013 //----------------------------------------------------------------------------------
00014 
00015 
00016 
00017 #ifndef __mlKeyFrameList_H
00018 #define __mlKeyFrameList_H
00019 
00020 
00021 
00022 // ML includes
00023 #ifndef __mlModuleIncludes_H
00024 #include "mlModuleIncludes.h"
00025 #endif
00026 #ifndef __mlLinearAlgebra_H
00027 #include "mlLinearAlgebra.h"
00028 #endif
00029 
00030 
00031 // Local includes
00032 #ifndef __mlBaseInit_H
00033 #include "mlBaseInit.h"
00034 #endif
00035 #ifndef __mlListBase_H
00036 #include "mlListBase.h"
00037 #endif
00038 
00039 
00040 ML_START_NAMESPACE
00041 
00042   
00043 // ------------------------------------------------------------------
00045 // ------------------------------------------------------------------
00046 
00052 class MLBASEEXPORT KeyFrame 
00053 {
00054 public:
00055 
00057 
00058 
00059   Vector3 p;          
00060   Vector3 tangent;    
00061   Vector3 up;         
00062 
00064 
00065 
00067 
00068 
00070   KeyFrame () : p(0), tangent(0), up(0) {}
00071 
00073   KeyFrame (const Vector3 &point, const Vector3 &tangentVec, const Vector3 &upVec)
00074     : p(point), tangent(tangentVec), up(upVec) {}
00075 
00077   KeyFrame (const KeyFrame &frame) { *this = frame; }
00078 
00080   virtual ~KeyFrame() {}
00082 
00083   
00085   virtual KeyFrame &operator = (const KeyFrame &frame);
00086 
00088   bool operator <(const KeyFrame &) const { return false; }
00089 
00091   bool operator ==(const KeyFrame &) const { return false; }
00092 
00093 /*
00094   void print(const char* txt) {
00095     std::cout << txt << std::endl;
00096     p.print("point");
00097     tangent.print("tangent");
00098     up.print("up");
00099   }
00100 */
00101 };
00102 
00103 
00105 std::ostream &operator << (std::ostream &out, const KeyFrame &frame);
00106 
00107   
00108 
00109 
00110   
00111 // ------------------------------------------------------------------
00112 // Base object class KeyFrameList 
00113 // ------------------------------------------------------------------
00114 
00116 class MLBASEEXPORT KeyFrameList : public ListTemplate<KeyFrame>
00117 {
00118 
00119 public:
00120 
00122   KeyFrameList () : ListTemplate<KeyFrame>(false) {}
00123 
00125   void print ();
00126 
00127 
00128 private:
00129 
00131   ML_CLASS_HEADER(KeyFrameList);
00132 
00133 };
00134 
00135 
00136 ML_END_NAMESPACE
00137 
00138 
00139 #endif // __mlKeyFrameList_H