Basic Image AlgorithmS Library
2.8.0
Main Page
Related Pages
Modules
Classes
Examples
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
GLviewer
Controller
AutoControl.hh
1
#ifndef __AutoControl_HH__
2
#define __AutoControl_HH__
3
4
#include "ControlInterface.hh"
5
#include "TrackballControl.hh"
6
#include <GLviewer/RenderContextBase.hh>
7
#include <Base/Math/Vector3.hh>
8
9
namespace
BIAS {
10
11
/**
12
\class AutoControl
13
\author cmenk
14
\ingroup g_glviewer
15
\brief class for camera movement in autopilot mode.
16
*/
17
class
BIASGLviewer_EXPORT
AutoControl
:
public
ControlInterface
18
{
19
public
:
20
AutoControl
();
21
22
/**
23
* Initialisizes the autopilot.
24
*/
25
void
Init();
26
27
/**
28
* Adds a defined pose to the autopilot at the end of PoseList_ F1
29
*/
30
void
AddPose(
BIAS::Vector3<double>
C,
BIAS::Vector3<double>
PoI,
31
BIAS::Vector3<double>
up);
32
33
/**
34
* Adds the current pose of ControldObject to the autopilot at the
35
* end of PoseList_ F1
36
*/
37
void
AddPose();
38
39
/**
40
* Goes to the next calculated pose. F2
41
*/
42
int
NextStep();
43
44
/**
45
* Goes to the defined step and sector.
46
returns 0 for sucess, -1 if step or sector exceeds max
47
*/
48
int
GoTo(
unsigned
int
step,
unsigned
int
sector);
49
50
/**
51
* Goes to the defined pose.
52
returns 0 for sucess, -1 if step or sector exceeds max
53
*/
54
int
GoToPose(
int
pose);
55
56
unsigned
int
GetStep
(){
return
Step_;};
57
58
unsigned
int
GetSector
(){
return
Sector_;};
59
unsigned
int
GetNumSectors
(){
return
(
unsigned
int
)PoseList_.size()-1;};
60
61
/**
62
* Sets the autopilot to start point. F3
63
*/
64
void
Rewind();
65
66
/**
67
* Deletes the last added pose and resets the autopilot F4
68
*/
69
void
DeleteLast();
70
71
/**
72
* Deletes the defined pose and resets the autopilot F4
73
*/
74
void
DeletePose(
int
pose);
75
76
/**
77
* Deletes all poses in PoseList_ and resets autopilot.
78
*/
79
void
DeleteAll();
80
81
/**
82
* Handles special key events.
83
*/
84
bool
SpecialKeyPressed(
int
key);
85
86
void
SetContext(
RenderContextBase
* context);
87
88
int
SaveToFile(
const
std::string &file);
89
90
int
LoadFromFile(
const
std::string &file);
91
92
unsigned
int
GetNumberOfSteps
(){
return
NumberOfSteps_;};
93
void
SetNumberOfSteps
(
unsigned
int
n){ NumberOfSteps_ = n;};
94
95
void
Activate
() {Active_ =
true
;};
96
void
Deactivate
() {Active_ =
false
;};
97
bool
IsActive
() {
return
Active_;};
98
bool
IsInitialized
() {
return
PoseList_.size()>0;};
99
bool
TimerExpired();
100
101
protected
:
102
struct
CameraPose
103
{
104
BIAS::Vector3<double>
C
;
105
BIAS::Vector3<double>
PoI
;
106
BIAS::Vector3<double>
up
;
107
};
108
109
std::vector<CameraPose>
PoseList_
;
110
RenderContextBase
*
Context_
;
111
112
BIAS::Vector3<double>
VecC_
;
113
BIAS::Vector3<double>
VecUp_
;
114
BIAS::Vector3<double>
VecPoI_
;
115
double
StepSizeC_
;
116
double
StepSizeUp_
;
117
double
StepSizePoI_
;
118
119
unsigned
int
NumberOfSteps_
;
// steps for every sector
120
unsigned
int
Step_
;
121
unsigned
int
Sector_
;
122
int
InitializedSector_
;
123
124
bool
Active_
;
125
};
126
}
//end of namespace
127
#endif
BIAS::AutoControl::Active_
bool Active_
Definition:
AutoControl.hh:124
BIAS::AutoControl::StepSizeC_
double StepSizeC_
Definition:
AutoControl.hh:115
BIAS::AutoControl::GetNumberOfSteps
unsigned int GetNumberOfSteps()
Definition:
AutoControl.hh:92
BIAS::AutoControl::VecC_
BIAS::Vector3< double > VecC_
Definition:
AutoControl.hh:112
BIAS::AutoControl::CameraPose::C
BIAS::Vector3< double > C
Definition:
AutoControl.hh:104
BIAS::AutoControl::InitializedSector_
int InitializedSector_
Definition:
AutoControl.hh:122
BIAS::AutoControl::CameraPose
Definition:
AutoControl.hh:102
BIAS::AutoControl::GetSector
unsigned int GetSector()
Definition:
AutoControl.hh:58
BIAS::AutoControl::PoseList_
std::vector< CameraPose > PoseList_
Definition:
AutoControl.hh:109
BIAS::AutoControl::IsInitialized
bool IsInitialized()
Definition:
AutoControl.hh:98
BIAS::AutoControl::StepSizeUp_
double StepSizeUp_
Definition:
AutoControl.hh:116
BIAS::AutoControl::GetNumSectors
unsigned int GetNumSectors()
Definition:
AutoControl.hh:59
BIAS::AutoControl::Activate
void Activate()
Definition:
AutoControl.hh:95
BIAS::Vector3< double >
BIAS::AutoControl::IsActive
bool IsActive()
Definition:
AutoControl.hh:97
BIAS::AutoControl::Context_
RenderContextBase * Context_
Definition:
AutoControl.hh:110
BIAS::AutoControl
class for camera movement in autopilot mode.
Definition:
AutoControl.hh:17
BIAS::AutoControl::VecPoI_
BIAS::Vector3< double > VecPoI_
Definition:
AutoControl.hh:114
BIAS::AutoControl::SetNumberOfSteps
void SetNumberOfSteps(unsigned int n)
Definition:
AutoControl.hh:93
BIAS::AutoControl::StepSizePoI_
double StepSizePoI_
Definition:
AutoControl.hh:117
BIAS::AutoControl::GetStep
unsigned int GetStep()
Definition:
AutoControl.hh:56
BIAS::AutoControl::Step_
unsigned int Step_
Definition:
AutoControl.hh:120
BIAS::AutoControl::Sector_
unsigned int Sector_
Definition:
AutoControl.hh:121
BIAS::ControlInterface
Defines the common interface used for communication between rendering components. ...
Definition:
ControlInterface.hh:57
BIAS::AutoControl::CameraPose::up
BIAS::Vector3< double > up
Definition:
AutoControl.hh:106
BIAS::AutoControl::NumberOfSteps_
unsigned int NumberOfSteps_
Definition:
AutoControl.hh:119
BIAS::AutoControl::Deactivate
void Deactivate()
Definition:
AutoControl.hh:96
BIAS::AutoControl::CameraPose::PoI
BIAS::Vector3< double > PoI
Definition:
AutoControl.hh:105
BIAS::AutoControl::VecUp_
BIAS::Vector3< double > VecUp_
Definition:
AutoControl.hh:113
BIAS::RenderContextBase
Base for all classes creating interface between GL and "window manager".
Definition:
RenderContextBase.hh:33
Generated on Tue Feb 6 2018 02:01:37 for Basic Image AlgorithmS Library by
1.8.5