MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
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#include "mlBaseInit.h"
29#include "mlListBase.h"
30
31
33
34
35// ------------------------------------------------------------------
37// ------------------------------------------------------------------
38
45{
46public:
49
53
55
56
59
62 : p(0)
63 , tangent(0)
64 , up(0)
65 {}
66
69 : p(point)
70 , tangent(tangentVec)
71 , up(upVec)
72 {}
73
76 {
77 *this = frame;
78 }
79
81 virtual ~KeyFrame()
82 {}
84
85
87 virtual KeyFrame& operator=(const KeyFrame& frame);
88
90 bool operator<(const KeyFrame&) const
91 {
92 return false;
93 }
94
96 bool operator==(const KeyFrame&) const
97 {
98 return false;
99 }
100
101 /*
102 void print(const char* txt) {
103 std::cout << txt << std::endl;
104 p.print("point");
105 tangent.print("tangent");
106 up.print("up");
107 }
108 */
109};
110
111
113std::ostream& operator<<(std::ostream& out, const KeyFrame& frame);
114
115
116// ------------------------------------------------------------------
117// Base object class KeyFrameList
118// ------------------------------------------------------------------
119
121class MLBASEEXPORT KeyFrameList : public ListTemplate<KeyFrame>
122{
123
124public:
129
131 void print();
132
133
134private:
137};
138
139
141
142
143#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.
bool operator<(const KeyFrame &) const
Dummy "lesser than operator", required for VC7.
virtual ~KeyFrame()
Implement destructor to be sure that it is virtual to avoid warnings.
bool operator==(const KeyFrame &) const
Dummy "equal operator", required for VC7.
Vector3 p
Position.
virtual KeyFrame & operator=(const KeyFrame &frame)
Assignment operator.
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:370
#define MLBASEEXPORT
defined Header file mlBaseInit.h
Definition mlBaseInit.h:22
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
#define ML_CLASS_HEADER(className)
Same like ML_CLASS_HEADER_EXPORTED with a non-existing export symbol.
std::ostream & operator<<(std::ostream &out, const ml::Variant &variant)
Definition mlVariant.h:231