Basic Image AlgorithmS Library
2.8.0
|
class for camera movement in trackball mode. More...
#include <GLviewer/Controller/TrackballControl.hh>
Public Member Functions | |
void | AddDebugLevel (const long int lv) |
void | AddDebugLevel (const std::string &name) |
bool | DebugLevelIsSet (const long int lv) const |
bool | DebugLevelIsSet (const std::string &name) const |
virtual bool | FinishedDraw () |
this function is called by RenderContextBase when drawing is done. More... | |
int | GetDebugLevel () const |
std::ostream & | GetDebugStream () const |
void | GetDebugStream (std::ostream &os) const |
virtual BIAS::GLProjectionParametersInterface * | GetGLProjectionParametersInterface () |
Get the camera projection parameters. More... | |
virtual std::string | GetName () |
Get the name of the controller. More... | |
BIAS::Vector3< double > | GetPoI () |
Get point of interest. More... | |
BIAS::Vector3< double > | GetPointOfInterest () |
Get point of interest. More... | |
bool | GetUseLeftDouble () |
bool | LeftAndRightMouseMoved (int x1, int x2, int y1, int y2) |
react to mouse move if left and right button is pressed. More... | |
virtual bool | LeftMouseDoubleClicked (int x, int y, int m) |
Computes from the coordinates x,y a 3D point in the scene and tries to set it to the point of interest. More... | |
virtual bool | LeftMouseDown (int, int) |
react to left mouse button down event overwrite in derived class of desired More... | |
bool | LeftMouseMoved (int x1, int x2, int y1, int y2) |
Rotates the camera around the point of interest. More... | |
virtual bool | LeftMouseSingleClicked (int, int) |
react to left mouse single click overwrite in derived class of desired More... | |
virtual bool | LeftMouseUp (int, int) |
react to left mouse button up event overwrite in derived class of desired More... | |
virtual bool | MiddleMouseDown (int, int) |
react to middle mouse button down event overwrite in derived class of desired More... | |
bool | MiddleMouseMoved (int x1, int x2, int y1, int y2) |
Moves the camera left/right/up/down and sets new point of interest. More... | |
virtual bool | MiddleMouseUp (int, int) |
react to middle mouse button up event overwrite in derived class of desired More... | |
virtual bool | MouseLeftWindow () |
react to mouse leaving the window overwrite in derived class of desired More... | |
virtual bool | MouseMoved (int, int) |
react to mouse movement overwrite in derived class of desired More... | |
bool | MouseWheelUsed (double stepsize) |
Handles Mouse Wheel events and zooms in or out. More... | |
void | MoveInViewingDirection (double stepSize) |
long int | Name2DebugLevel (const std::string &name) const |
looks up a debuglevel in the internal map, returns 0 if not found More... | |
long int | NewDebugLevel (const std::string &name) |
creates a new debuglevel More... | |
void | PrintDebugLevel (std::ostream &os=std::cout) const |
void | RemoveDebugLevel (const long int lv) |
void | RemoveDebugLevel (const std::string &name) |
virtual bool | RightMouseDoubleClicked (int, int) |
react to right mouse double click overwrite in derived class of desired More... | |
virtual bool | RightMouseDown (int, int) |
react to right mouse button down event overwrite in derived class of desired More... | |
bool | RightMouseMoved (int x1, int x2, int y1, int y2) |
Moves the camera forward to point of interest if y2-y1 is positive else the camera is moved away from point of interest. More... | |
virtual bool | RightMouseSingleClicked (int, int) |
react to right mouse single click event overwrite in derived class of desired More... | |
virtual bool | RightMouseUp (int, int) |
react to right mouse button up event overwrite in derived class of desired More... | |
void | RotateAroundPOI (BIAS::Vector3< double > axis, double angleRAD) |
Rotate around the point of interest. More... | |
void | RotateAroundViewingDirection (double rotationAngleRAD) |
Rotate around viewing direction. More... | |
void | SetDebugLevel (const long int lv) |
void | SetDebugLevel (const std::string &name) |
void | SetDebugStream (const std::ostream &os) |
void | SetGLProjectionParametersInterface (BIAS::GLProjectionParametersInterface *projInterface) |
Set the ProjectionParametersInterface (camera) More... | |
virtual void | SetName (std::string name) |
Set the name of the controller. More... | |
void | SetPointOfInterest (const BIAS::Vector3< double > &poi) |
Set point of interest the controller will circle around. More... | |
void | SetStepsize (double stepsize) |
void | SetUseLeftDouble (bool ld) |
void | ShowDebugLevel (std::ostream &os=std::cout) const |
prints all internally known debuglevels More... | |
bool | SpecialKeyPressed (int key) |
react to press of special keys such as F1-F12, ... More... | |
virtual bool | SpecialKeyUp (int) |
react to press of special keys such as F1-F12, ... More... | |
virtual bool | StandardKeyPressed (unsigned char, int, int) |
react to press of ascii-coded charakter plus pointer position More... | |
virtual bool | StandardKeyUp (unsigned char, int, int) |
react to press of ascii-coded charakter plus pointer position More... | |
virtual bool | TimerExpired () |
this function is called by RenderContextBase when timer is expired Overwrite and implement to do some timer dependend processing More... | |
TrackballControl () | |
virtual bool | WindowReshape (int, int) |
this function is called by RenderContextBase if the window is reshaped. More... | |
~TrackballControl () | |
Static Public Member Functions | |
static long int | GetGlobalDebugLevel () |
static void | SetGlobalDebugLevel (long int lev) |
Protected Member Functions | |
long | ConsumeNextFreeDebuglevel_ () |
returns the next available debuglevel More... | |
void | GetMoveinViewDirection (GLProjectionParametersInterface *cam, const double stepsize, const BIAS::Vector3< double > &viewdir, BIAS::Vector3< double > &res_translation) |
double | GetRotationAngle (GLProjectionParametersInterface *cam, const int x1, const int x2, const int y1, const int y2, const BIAS::Vector3< double > viewdir) |
bool | GetRotationAxisAndAngle (GLProjectionParametersInterface *cam, const int x1, const int x2, const int y1, const int y2, BIAS::Vector3< double > &axis, double &angleRAD) |
void | GetTranslation (GLProjectionParametersInterface *cam, const int x1, const int x2, const int y1, const int y2, const BIAS::Vector3< double > &viewdir, BIAS::Vector3< double > &transl) |
void | GetViewDirection (GLProjectionParametersInterface *cam, BIAS::Vector3< double > &direction) |
Protected Attributes | |
long int | _liDebugLevel |
long int | _liNextDebugLevel |
new concept, debuglevel are managed here in the debug class More... | |
std::map< std::string, long int > | _String2Debuglevel |
BIAS::GLProjectionParametersInterface * | controlledObject_ |
the camera which is controlled by this controller More... | |
std::string | listenerName_ |
name of listener/controller More... | |
BIAS::Vector3< double > | PointOfInterest_ |
double | Stepsize_ |
bool | UseLeftDouble_ |
Static Protected Attributes | |
static std::ostream | _zDebugStream |
static long int | GlobalDebugLevel = 0 |
class for camera movement in trackball mode.
Definition at line 20 of file TrackballControl.hh.
TrackballControl::TrackballControl | ( | ) |
Definition at line 12 of file TrackballControl.cpp.
|
inline |
Definition at line 24 of file TrackballControl.hh.
|
inlineinherited |
Definition at line 355 of file Debug.hh.
Referenced by BIAS::GLProjectionParametersBase::AddDebugLevel(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::ShowCamWxVideoSourceFactory::OpenDevice(), and BIAS::SceneOpenSceneGraph::SceneOpenSceneGraph().
|
inlineinherited |
|
inlineprotectedinherited |
|
inlineinherited |
Definition at line 341 of file Debug.hh.
Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), BIAS::MonteCarloTransform::GetSamples_(), and BIAS::MonteCarloTransform::Transform().
|
inlineinherited |
|
inlinevirtualinherited |
this function is called by RenderContextBase when drawing is done.
Overwrite and implement to do some processing after drawing
Definition at line 193 of file ControlInterface.hh.
|
inlineinherited |
Definition at line 332 of file Debug.hh.
Referenced by BIAS::listenthread(), BIAS::Image< StorageType >::operator=(), and BIAS::ImageBase::operator=().
|
inlineinherited |
|
inlineinherited |
|
inlinestaticinherited |
|
inlinevirtualinherited |
Get the camera projection parameters.
Can be of type GLProjection or any from GLProjectionParametersBase derived class
Definition at line 207 of file ControlInterface.hh.
|
protectedinherited |
Definition at line 36 of file TrackballBase.cpp.
References BIAS::Equal(), BIAS::Vector3< T >::Multiply(), BIAS::Vector3< T >::Normalize(), and BIAS::Vector3< T >::NormL2().
|
inlinevirtualinherited |
Get the name of the controller.
Definition at line 70 of file ControlInterface.hh.
|
inline |
Get point of interest.
Definition at line 57 of file TrackballControl.hh.
|
inline |
Get point of interest.
Definition at line 59 of file TrackballControl.hh.
|
protectedinherited |
Definition at line 209 of file TrackballBase.cpp.
References BIAS::Vector3< T >::CrossProduct(), BIAS::GLProjectionParametersInterface::GetExtrinsics(), BIAS::Vector3< T >::Normalize(), and BIAS::Vector3< T >::ScalarProduct().
|
protectedinherited |
Definition at line 61 of file TrackballBase.cpp.
References BIAS::Vector3< T >::CrossProduct(), BIAS::GLProjectionParametersInterface::GetExtrinsics(), BIAS::MatrixIdentity, BIAS::Vector3< T >::Normalize(), and BIAS::Vector3< T >::ScalarProduct().
|
protectedinherited |
Definition at line 148 of file TrackballBase.cpp.
References BIAS::Vector3< T >::CrossProduct(), BIAS::GLProjectionParametersInterface::GetExtrinsics(), BIAS::Vector3< T >::MultIP(), BIAS::Vector3< T >::Normalize(), and BIAS::Vector3< T >::SetZero().
|
inlineinherited |
Definition at line 32 of file TrackballBase.hh.
|
protectedinherited |
Definition at line 130 of file TrackballBase.cpp.
References BIAS::GLProjectionParametersInterface::GetExtrinsics(), and BIAS::MatrixIdentity.
|
virtual |
react to mouse move if left and right button is pressed.
Reimplemented from BIAS::ControlInterface.
Definition at line 319 of file TrackballControl.cpp.
References BIAS::Vector3< T >::CrossProduct(), BIAS::Vector3< T >::Normalize(), and BIAS::Vector3< T >::ScalarProduct().
|
virtual |
Computes from the coordinates x,y a 3D point in the scene and tries to set it to the point of interest.
Reimplemented from BIAS::ControlInterface.
Reimplemented in BIAS::DistanceMeasureControl.
Definition at line 170 of file TrackballControl.cpp.
Referenced by BIAS::DistanceMeasureControl::LeftMouseDoubleClicked().
|
inlinevirtualinherited |
react to left mouse button down event overwrite in derived class of desired
Definition at line 99 of file ControlInterface.hh.
Referenced by BIAS::RenderContextBase::LeftMouseDown().
|
virtual |
Rotates the camera around the point of interest.
x1, x2, y1, y2 are the mouse coordinates and width, height must be the size of the window. The trackball contains the whole window. The radius of the trackball is sqrt from width*width/4 + height*height/4.
Reimplemented from BIAS::ControlInterface.
Definition at line 98 of file TrackballControl.cpp.
References BIAS::Vector3< T >::CrossProduct(), BIAS::MatrixIdentity, and BIAS::Vector3< T >::Normalize().
|
inlinevirtualinherited |
react to left mouse single click overwrite in derived class of desired
Definition at line 89 of file ControlInterface.hh.
Referenced by BIAS::RenderContextBase::LeftMouseSingleClicked().
|
inlinevirtualinherited |
react to left mouse button up event overwrite in derived class of desired
Definition at line 104 of file ControlInterface.hh.
Referenced by BIAS::RenderContextBase::LeftMouseUp().
|
inlinevirtualinherited |
react to middle mouse button down event overwrite in derived class of desired
Definition at line 145 of file ControlInterface.hh.
Referenced by BIAS::RenderContextBase::MiddleMouseDown().
|
virtual |
Moves the camera left/right/up/down and sets new point of interest.
Reimplemented from BIAS::ControlInterface.
Definition at line 206 of file TrackballControl.cpp.
References BIAS::HomgPoint3D::Homogenize(), BIAS::Vector3< T >::Length(), and BIAS::Vector4< T >::Sub().
|
inlinevirtualinherited |
react to middle mouse button up event overwrite in derived class of desired
Definition at line 150 of file ControlInterface.hh.
Referenced by BIAS::RenderContextBase::MiddleMouseUp().
|
inlinevirtualinherited |
react to mouse leaving the window overwrite in derived class of desired
Definition at line 160 of file ControlInterface.hh.
Referenced by BIAS::RenderContextBase::MouseLeftWindow().
|
inlinevirtualinherited |
react to mouse movement overwrite in derived class of desired
Reimplemented in BIAS::DistanceMeasureControl.
Definition at line 155 of file ControlInterface.hh.
Referenced by BIAS::RenderContextBase::MouseMoved().
|
virtual |
Handles Mouse Wheel events and zooms in or out.
Reimplemented from BIAS::ControlInterface.
Definition at line 42 of file TrackballControl.cpp.
void TrackballControl::MoveInViewingDirection | ( | double | stepSize | ) |
Definition at line 49 of file TrackballControl.cpp.
References BIAS::Vector3< T >::Add(), BIAS::Equal(), BIAS::HomgPoint3D, BIAS::MatrixIdentity, BIAS::Vector3< T >::Multiply(), BIAS::Vector3< T >::Normalize(), BIAS::Vector3< T >::NormL2(), and BIAS::Vector3< T >::Sub().
|
inlineinherited |
|
inlineinherited |
creates a new debuglevel
Definition at line 474 of file Debug.hh.
Referenced by BIAS::COSAC< SolutionType >::COSAC(), BIAS::ProjectionParametersPerspectiveDepth::Init(), BIAS::MonteCarloTransform::MonteCarloTransform(), BIAS::PMatrixEstimation::PMatrixEstimation(), BIAS::PreemptiveRANSAC< SolutionType >::PreemptiveRANSAC(), BIAS::RANSACPreKnowledge< SolutionType >::RANSACPreKnowledge(), BIAS::ROI::ROI(), BIAS::RotationAveraging::RotationAveraging(), BIAS::SceneOpenSceneGraph::SceneOpenSceneGraph(), BIAS::ThreeDOutOpenSceneGraph::ThreeDOutOpenSceneGraph(), BIAS::Triangulation::Triangulation(), and BIAS::UnscentedTransform::UnscentedTransform().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlinevirtualinherited |
react to right mouse double click overwrite in derived class of desired
Reimplemented in BIAS::OnlyRotationControl.
Definition at line 115 of file ControlInterface.hh.
Referenced by BIAS::RenderContextBase::RightMouseDoubleClicked().
|
inlinevirtualinherited |
react to right mouse button down event overwrite in derived class of desired
Definition at line 125 of file ControlInterface.hh.
Referenced by BIAS::RenderContextBase::RightMouseDown().
|
virtual |
Moves the camera forward to point of interest if y2-y1 is positive else the camera is moved away from point of interest.
Reimplemented from BIAS::ControlInterface.
Definition at line 21 of file TrackballControl.cpp.
|
inlinevirtualinherited |
react to right mouse single click event overwrite in derived class of desired
Definition at line 110 of file ControlInterface.hh.
Referenced by BIAS::RenderContextBase::RightMouseSingleClicked().
|
inlinevirtualinherited |
react to right mouse button up event overwrite in derived class of desired
Definition at line 130 of file ControlInterface.hh.
Referenced by BIAS::RenderContextBase::RightMouseUp().
void TrackballControl::RotateAroundPOI | ( | BIAS::Vector3< double > | axis, |
double | angleRAD | ||
) |
Rotate around the point of interest.
Definition at line 79 of file TrackballControl.cpp.
References BIAS::Vector3< T >::Add(), BIAS::Quaternion< T >::MultVec(), BIAS::Quaternion< T >::SetValueAsAxisRad(), and BIAS::Vector3< T >::Sub().
void TrackballControl::RotateAroundViewingDirection | ( | double | rotationAngleRAD | ) |
Rotate around viewing direction.
Definition at line 294 of file TrackballControl.cpp.
References BIAS::MatrixIdentity, BIAS::Quaternion< T >::MultVec(), BIAS::Vector3< T >::NormL2(), and BIAS::Quaternion< T >::SetValueAsAxisRad().
|
inlineinherited |
Definition at line 318 of file Debug.hh.
Referenced by BIAS::ShowCamWxVideoSourceFactory::CreateBumbleBee(), BIAS::ShowCamWxVideoSourceFactory::CreateDCAM(), BIAS::VideoSource_MDcam::ScanBus(), BIAS::GLProjectionParametersBase::SetDebugLevel(), BIAS::VideoSource_Disk::VideoSource_Disk(), BIAS::VideoSource_DV2::VideoSource_DV2(), BIAS::VideoSource_DV::VideoSource_DV_Internal_Init_(), and BIAS::VideoSource_V4L::VideoSource_V4L().
|
inlineinherited |
|
inlineinherited |
|
inlinestaticinherited |
|
virtual |
Set the ProjectionParametersInterface (camera)
Reimplemented from BIAS::ControlInterface.
Definition at line 383 of file TrackballControl.cpp.
References BIAS::MatrixIdentity, BIAS::ControlInterface::SetGLProjectionParametersInterface(), and BIAS::Matrix3x3< T >::SetIdentity().
|
inlinevirtualinherited |
Set the name of the controller.
Definition at line 74 of file ControlInterface.hh.
void TrackballControl::SetPointOfInterest | ( | const BIAS::Vector3< double > & | poi | ) |
Set point of interest the controller will circle around.
Adapts stepsize of movement depending on scene distance to camera
Definition at line 361 of file TrackballControl.cpp.
References BIAS::Vector3< T >::NormL2().
|
inherited |
Definition at line 17 of file TrackballBase.cpp.
|
inlineinherited |
Definition at line 31 of file TrackballBase.hh.
|
inlineinherited |
|
virtualinherited |
react to press of special keys such as F1-F12, ...
overwrite in derived class of desired
Reimplemented from BIAS::ControlInterface.
Definition at line 23 of file TrackballBase.cpp.
|
inlinevirtualinherited |
react to press of special keys such as F1-F12, ...
overwrite in derived class of desired
Definition at line 170 of file ControlInterface.hh.
Referenced by BIAS::RenderContextBase::SpecialKeyUp().
|
inlinevirtualinherited |
react to press of ascii-coded charakter plus pointer position
Reimplemented in BIAS::biasGLviewerGLUT.
Definition at line 174 of file ControlInterface.hh.
Referenced by BIAS::RenderContextBase::StandardKeyPressed().
|
inlinevirtualinherited |
react to press of ascii-coded charakter plus pointer position
Definition at line 178 of file ControlInterface.hh.
Referenced by BIAS::RenderContextBase::StandardKeyUp().
|
inlinevirtualinherited |
this function is called by RenderContextBase when timer is expired Overwrite and implement to do some timer dependend processing
Reimplemented in BIAS::AutoControl, and BIAS::ScreenShotListener.
Definition at line 183 of file ControlInterface.hh.
Referenced by BIAS::RenderContextBase::TimerExpired().
|
inlinevirtualinherited |
this function is called by RenderContextBase if the window is reshaped.
Overwrite and implement to do some processing upon reshape
Definition at line 188 of file ControlInterface.hh.
Referenced by BIAS::RenderContextBase::WindowReshape().
|
protectedinherited |
Definition at line 510 of file Debug.hh.
Referenced by BIAS::Debug::operator=(), and BIAS::ImageBase::operator=().
|
protectedinherited |
new concept, debuglevel are managed here in the debug class
Definition at line 516 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
protectedinherited |
Definition at line 517 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
staticprotectedinherited |
Definition at line 511 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
protectedinherited |
the camera which is controlled by this controller
Definition at line 214 of file ControlInterface.hh.
|
staticprotectedinherited |
|
protectedinherited |
name of listener/controller
Definition at line 208 of file ControlInterface.hh.
|
protected |
Definition at line 69 of file TrackballControl.hh.
|
protectedinherited |
Definition at line 69 of file TrackballBase.hh.
|
protectedinherited |
Definition at line 70 of file TrackballBase.hh.