MeVisLab Toolbox Reference
mlKeyFrameList.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2007, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #ifndef ML_KEY_FRAME_LIST_H
14 #define ML_KEY_FRAME_LIST_H
15 
16 
18 
19 // Defines the classes:
20 // - KeyFrame: An object describing a position and orientation in space
21 // - KeyFrameList: A list of KeyFrame items
22 
23 // ML includes
24 #include "mlModuleIncludes.h"
25 #include "mlLinearAlgebra.h"
26 
27 
28 
29 #include "mlBaseInit.h"
30 #include "mlListBase.h"
31 
32 
33 ML_START_NAMESPACE
34 
35 
36 // ------------------------------------------------------------------
38 // ------------------------------------------------------------------
39 
46 {
47 public:
48 
51 
55 
57 
58 
61 
63  KeyFrame () : p(0), tangent(0), up(0) {}
64 
66  KeyFrame (const Vector3 &point, const Vector3 &tangentVec, const Vector3 &upVec)
67  : p(point), tangent(tangentVec), up(upVec) {}
68 
70  KeyFrame (const KeyFrame &frame) { *this = frame; }
71 
73  virtual ~KeyFrame() {}
75 
76 
78  virtual KeyFrame &operator = (const KeyFrame &frame);
79 
81  bool operator <(const KeyFrame &) const { return false; }
82 
84  bool operator ==(const KeyFrame &) const { return false; }
85 
86 /*
87  void print(const char* txt) {
88  std::cout << txt << std::endl;
89  p.print("point");
90  tangent.print("tangent");
91  up.print("up");
92  }
93 */
94 };
95 
96 
98 std::ostream &operator << (std::ostream &out, const KeyFrame &frame);
99 
100 
101 
102 
103 
104 // ------------------------------------------------------------------
105 // Base object class KeyFrameList
106 // ------------------------------------------------------------------
107 
109 class MLBASEEXPORT KeyFrameList : public ListTemplate<KeyFrame>
110 {
111 
112 public:
113 
116 
118  void print ();
119 
120 
121 private:
122 
125 
126 };
127 
128 
129 ML_END_NAMESPACE
130 
131 
132 #endif // __mlKeyFrameList_H
Base object class KeyFrameList storing a list of KeyFrame entries.
KeyFrameList()
Constructor, disables persistence.
void print()
Debug print.
Class KeyFrame consisting of a 3D position, tangent and up vector.
Vector3 tangent
Orientation.
virtual ~KeyFrame()
Implement destructor to be sure that it is virtual to avoid warnings.
Vector3 p
Position.
KeyFrame()
Default constructor.
KeyFrame(const Vector3 &point, const Vector3 &tangentVec, const Vector3 &upVec)
Position, tangent and up.
Vector3 up
Local vertical.
KeyFrame(const KeyFrame &frame)
Copy constructor.
Basic list class template combining properties of ListBase and a vector of the template argument type...
Definition: mlListBase.h:312
#define MLBASEEXPORT
defined Header file mlBaseInit.h
Definition: mlBaseInit.h:22
#define ML_CLASS_HEADER(className)
Same like ML_CLASS_HEADER_EXPORTED with a non existing export symbol.
std::ostream & operator<<(std::ostream &out, const KeyFrame &frame)
KeyFrame stream output.
bool operator==(const Tmat2< DT > &a, const Tmat2< DT > &b)
a == b ? Return true if yes.
Definition: mlMatrix2.h:425