Basic Image AlgorithmS Library
2.8.0
|
class for distance measurements in 3d model, derives from TrackballControl and SceneBase More...
#include <GLviewer/Controller/DistanceMeasureControl.hh>
Public Types | |
enum | EChannel { C_BothMono, C_LeftOnly, C_RightOnly, C_BothStereo } |
Public Member Functions | |
void | AddDebugLevel (const long int lv) |
void | AddDebugLevel (const long int lv) |
void | AddDebugLevel (const std::string &name) |
void | AddDebugLevel (const std::string &name) |
void | ApplyTimeStep (const double &delta=1.0, const BIAS::Vector3< double > &gravity=BIAS::Vector3< double >(0,-9.81, 0), const double &frictioncoefficient=0.999) |
change position using a small time step of delta seconds and change velocity using gravity vector in m/s^2 More... | |
std::list< BIAS::HomgPoint3D > | CornersFromBoundingBox (const BIAS::Vector3< double > &b1, const BIAS::Vector3< double > &b2) |
bool | DebugLevelIsSet (const long int lv) const |
bool | DebugLevelIsSet (const long int lv) const |
bool | DebugLevelIsSet (const std::string &name) const |
bool | DebugLevelIsSet (const std::string &name) const |
DistanceMeasureControl () | |
virtual void | Draw () |
overloaded method from SceneBase. More... | |
void | DumpInfo () const |
dump info about the scene More... | |
std::list< BIAS::HomgPlane3D > | FacesFromBoundingBox (const BIAS::Vector3< double > &b1, const BIAS::Vector3< double > &b2) |
virtual bool | FinishedDraw () |
this function is called by RenderContextBase when drawing is done. More... | |
enum EChannel | GetActiveChannel () const |
Returns the active color channel. More... | |
virtual void | GetBoundingBox (BIAS::Vector3< double > &themin, BIAS::Vector3< double > &themax) |
Determine and return the bouning box of all elements of the scene. More... | |
int | GetDebugLevel () const |
int | GetDebugLevel () const |
std::ostream & | GetDebugStream () const |
std::ostream & | GetDebugStream () const |
void | GetDebugStream (std::ostream &os) const |
void | GetDebugStream (std::ostream &os) const |
bool | GetDistanceMeasure () |
Return if the measurement mode is activated. More... | |
double | GetElasticity () |
returns the elasticity value More... | |
virtual GLProjectionParametersInterface * | GetGLProjectionParametersInterface () |
Get the camera as projectionparametersinterface, can be of type GLProjection of of any from GLProjectionParametersBase derived class. More... | |
virtual BIAS::GLProjectionParametersInterface * | GetGLProjectionParametersInterface () |
Get the camera projection parameters. More... | |
bool | GetGravityImmunity () const |
is this scene accelerated by gravity ? More... | |
void | GetMomentum (double &mass, BIAS::Vector3< double > &velocity) const |
get mass and velocity in m/s More... | |
virtual std::string | GetName () |
Get the name of the controller. More... | |
BIAS::Vector3< double > | GetPoI () |
Get point of interest. More... | |
POINT_DRAW_STYLE | GetPointDrawStyle () |
Get the drawing style for points. More... | |
BIAS::Vector3< double > | GetPointOfInterest () |
Get point of interest. More... | |
TRIANGLEMESH_DRAW_STYLE | GetTriangleMeshDrawStyle () |
Get the drawing style for triangles. More... | |
bool | GetUseLeftDouble () |
virtual bool | HasBoundingBoxCollision (SceneBase *otherScene) |
check if bounding boxes of two scenes overlap More... | |
bool | IsActive () const |
Returns whether the scene is active or not. More... | |
bool | LeftAndRightMouseMoved (int x1, int x2, int y1, int y2) |
react to mouse move if left and right button is pressed. More... | |
bool | LeftMouseDoubleClicked (int x, int y, int m) |
Sets first or second click measurement positions. 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... | |
bool | MouseMoved (int x, int y) |
Sets intermediate coords. More... | |
bool | MouseWheelUsed (double stepsize) |
Handles Mouse Wheel events and zooms in or out. More... | |
void | MoveInViewingDirection (double stepSize) |
virtual void | MoveScene (const double &delta=1.0) |
this moves the scene (no rotation yet) More... | |
long int | Name2DebugLevel (const std::string &name) const |
looks up a debuglevel in the internal map, returns 0 if not found More... | |
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... | |
long int | NewDebugLevel (const std::string &name) |
creates a new debuglevel More... | |
virtual void | PerformCollision (SceneBase *otherscene, const BIAS::Vector3< double > &contactnormal=BIAS::Vector3< double >(-1e10,-1e10,-1e10)) |
compute momentum of each scene after collision More... | |
void | PrintDebugLevel (std::ostream &os=std::cout) const |
void | PrintDebugLevel (std::ostream &os=std::cout) const |
void | RemoveDebugLevel (const long int lv) |
void | RemoveDebugLevel (const long int lv) |
void | RemoveDebugLevel (const std::string &name) |
void | RemoveDebugLevel (const std::string &name) |
virtual void | Render () |
this is the entry point seen from GLProjectionParametersBase. More... | |
virtual void | RenderBoundingBox () |
render the bounding box of the scene using gl-lines More... | |
virtual void | ResetSelection () |
Reset the selection, overwrite to react on calls to this function in derived classes. More... | |
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... | |
virtual bool | SelectObjectAt (BIAS::Vector3< double > &p) |
Select a scene element/primitive at position p. More... | |
void | SetActive (bool b) |
Set whether the scene is active or not. More... | |
void | SetActiveChannel (const enum EChannel channel) |
Set a color channel active. More... | |
void | SetColorMask (bool red=true, bool green=true, bool blue=true, bool alpha=true) |
sets a color mask for the scene rendering More... | |
void | SetDebugLevel (const long int lv) |
void | SetDebugLevel (const long int lv) |
void | SetDebugLevel (const std::string &name) |
void | SetDebugLevel (const std::string &name) |
void | SetDebugStream (const std::ostream &os) |
void | SetDebugStream (const std::ostream &os) |
void | SetDistanceMeasure (bool on) |
Activate or deactivate distance measurement. More... | |
void | SetElasticity (const double &elas) |
set collision behaviour: 1.0=elastic, no energy is lost, >1 superelastic (requires energy from outside) <1 plastic, converts kinetic into other energy More... | |
void | SetGLProjectionParametersInterface (BIAS::GLProjectionParametersInterface *projInterface) |
Set the ProjectionParametersInterface (camera) More... | |
virtual void | SetGLProjectionParametersInterface (GLProjectionParametersInterface *nc) |
Set the camera as projectionparametersinterface, can be of type GLProjection of of any from GLProjectionParametersBase derived class. More... | |
void | SetGravityImmunity (bool i) |
set behaviour with respect to gravity More... | |
void | SetMomentum (const double &mass, const BIAS::Vector3< double > &velocity) |
set mass and velocity in m/s More... | |
virtual void | SetName (std::string name) |
Set the name of the controller. More... | |
void | SetPointDrawStyle (POINT_DRAW_STYLE style) |
Set the drawing style for points. More... | |
void | SetPointOfInterest (const BIAS::Vector3< double > &poi) |
Set point of interest the controller will circle around. More... | |
virtual void | SetRenderBoundingBox (bool render) |
Set whether to render the boundign box or not. More... | |
void | SetStepsize (double stepsize) |
void | SetTriangleMeshDrawStyle (TRIANGLEMESH_DRAW_STYLE style) |
Set the drawing style for triangles. More... | |
void | SetUseLeftDouble (bool ld) |
void | ShowDebugLevel (std::ostream &os=std::cout) const |
prints all internally known debuglevels More... | |
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... | |
virtual double | TimeToContact (SceneBase *otherScene, BIAS::Vector3< double > &collisionpoint) |
compute time to contact of bounding boxes More... | |
virtual void | UpdateCameraRelatedState () |
Method is called by GLProjection if its params have changed. More... | |
virtual bool | WindowReshape (int, int) |
this function is called by RenderContextBase if the window is reshaped. More... | |
~DistanceMeasureControl () | |
Static Public Member Functions | |
static void | AnimationAndCollision (std::vector< SceneBase * > scenes, const BIAS::Vector3< double > &gravity=BIAS::Vector3< double >(0, 10, 0), const double &friction=0.999) |
call this method for a vector of scenes to solve the collision problem. More... | |
static double | GetAnimationSpeed () |
get time quantization for animations More... | |
static long int | GetGlobalDebugLevel () |
static long int | GetGlobalDebugLevel () |
static void | SetAnimationSpeed (double s) |
set time quantization for animations More... | |
static void | SetGlobalDebugLevel (long int lev) |
static void | SetGlobalDebugLevel (long int lev) |
Protected Member Functions | |
long | ConsumeNextFreeDebuglevel_ () |
returns the next available debuglevel More... | |
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 | _liDebugLevel |
long int | _liNextDebugLevel |
new concept, debuglevel are managed here in the debug class More... | |
long int | _liNextDebugLevel |
new concept, debuglevel are managed here in the debug class More... | |
std::map< std::string, long int > | _String2Debuglevel |
std::map< std::string, long int > | _String2Debuglevel |
enum EChannel | ActiveChannel_ |
bool | bDistMeasureActivated_ |
bool | bIsInitialized_ |
BIAS::GLProjectionParametersInterface * | camera_ |
GLboolean | colorMask_ [4] |
BIAS::GLProjectionParametersInterface * | controlledObject_ |
the camera which is controlled by this controller More... | |
unsigned | dNumClick_ |
POINT_DRAW_STYLE | dPointDrawStyle_ |
BIAS::DrawTextGL | drawer_ |
TRIANGLEMESH_DRAW_STYLE | dTriangleMeshDrawStyle_ |
double | elasticity_ |
the more elastic the less enegry is lost in collisions More... | |
BIAS::HomgPoint3D | firstHomgPoint_ |
bool | gravityImmunity_ |
if true, scene is not accelerated by gravity More... | |
bool | IsActive_ |
std::string | listenerName_ |
name of listener/controller More... | |
double | mass_ |
for collision: More... | |
BIAS::Vector3< double > | PointOfInterest_ |
bool | renderBoundingBox_ |
show the bounding box ? More... | |
BIAS::HomgPoint3D | secondHomgPoint_ |
double | Stepsize_ |
bool | UseLeftDouble_ |
BIAS::Vector3< double > | velocity_ |
scene velocity in m/s More... | |
int | x_ |
int | y_ |
Static Protected Attributes | |
static std::ostream | _zDebugStream |
static std::ostream | _zDebugStream |
static double | animationSpeed_ = 1.0 |
how long does a single step in time take for animations ? More... | |
static long int | GlobalDebugLevel = 0 |
static long int | GlobalDebugLevel = 0 |
class for distance measurements in 3d model, derives from TrackballControl and SceneBase
Definition at line 29 of file DistanceMeasureControl.hh.
|
inherited |
Enumerator | |
---|---|
C_BothMono | |
C_LeftOnly | |
C_RightOnly | |
C_BothStereo |
Definition at line 71 of file SceneBase.hh.
DistanceMeasureControl::DistanceMeasureControl | ( | ) |
Definition at line 12 of file DistanceMeasureControl.cpp.
|
inline |
Definition at line 33 of file DistanceMeasureControl.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 |
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 |
|
inlineinherited |
|
staticinherited |
call this method for a vector of scenes to solve the collision problem.
STATIC and THUS CONST !!!
Definition at line 407 of file SceneBase.cpp.
References BIAS::SceneBase::animationSpeed_, BIAS::SceneBase::GetGravityImmunity(), and BIAS::SceneBase::HasBoundingBoxCollision().
|
inherited |
change position using a small time step of delta seconds and change velocity using gravity vector in m/s^2
No collision detection and handling here, since other scenes are unknown at this level.
Definition at line 326 of file SceneBase.cpp.
References BIAS::SceneBase::gravityImmunity_, BIAS::SceneBase::mass_, BIAS::SceneBase::MoveScene(), BIAS::Vector3< T >::NormL2(), BIAS::Vector3< T >::ScalarProduct(), and BIAS::SceneBase::velocity_.
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inherited |
Definition at line 42 of file SceneBase.cpp.
Referenced by BIAS::SceneBase::HasBoundingBoxCollision(), BIAS::SceneBase::RenderBoundingBox(), and BIAS::SceneBase::TimeToContact().
|
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 |
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 |
|
inlineinherited |
|
virtual |
overloaded method from SceneBase.
Here the line in 3D is drawn.
Implements BIAS::SceneBase.
Definition at line 82 of file DistanceMeasureControl.cpp.
References BIAS::HomgPoint3D::Distance().
|
inherited |
dump info about the scene
Definition at line 350 of file SceneBase.cpp.
References BIAS::SceneBase::ActiveChannel_, BIAS::SceneBase::camera_, BIAS::SceneBase::colorMask_, BIAS::SceneBase::elasticity_, BIAS::SceneBase::IsActive_, BIAS::SceneBase::mass_, and BIAS::SceneBase::velocity_.
|
inherited |
Definition at line 66 of file SceneBase.cpp.
Referenced by BIAS::SceneBase::HasBoundingBoxCollision(), and BIAS::SceneBase::TimeToContact().
|
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 |
Returns the active color channel.
Definition at line 132 of file SceneBase.hh.
|
inlinestaticinherited |
get time quantization for animations
Definition at line 247 of file SceneBase.hh.
|
inlinevirtualinherited |
Determine and return the bouning box of all elements of the scene.
Reimplemented in BIAS::SceneOpenSceneGraph, BIAS::SceneTexturedPlane, BIAS::SceneGridGround, BIAS::SceneCoordinateFrame, BIAS::ScenePlainOpenSceneGraph, BIAS::SceneGlutPrimitives, and BIAS::SceneThreeDOutWrapper.
Definition at line 148 of file SceneBase.hh.
Referenced by BIAS::SceneBase::HasBoundingBoxCollision(), BIAS::SceneBase::PerformCollision(), BIAS::SceneBase::RenderBoundingBox(), and BIAS::SceneBase::TimeToContact().
|
inlineinherited |
Definition at line 332 of file Debug.hh.
Referenced by BIAS::listenthread(), BIAS::Image< StorageType >::operator=(), and BIAS::ImageBase::operator=().
|
inlineinherited |
Definition at line 332 of file Debug.hh.
Referenced by BIAS::listenthread(), BIAS::Image< StorageType >::operator=(), and BIAS::ImageBase::operator=().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
bool DistanceMeasureControl::GetDistanceMeasure | ( | ) |
Return if the measurement mode is activated.
Definition at line 28 of file DistanceMeasureControl.cpp.
|
inlineinherited |
returns the elasticity value
Definition at line 184 of file SceneBase.hh.
|
inlinestaticinherited |
|
inlinestaticinherited |
|
inlinevirtualinherited |
Get the camera as projectionparametersinterface, can be of type GLProjection of of any from GLProjectionParametersBase derived class.
Definition at line 85 of file SceneBase.hh.
Referenced by BIAS::SceneGridGround::Draw(), and BIAS::SceneOpenSceneGraph::RightMouseDoubleClicked().
|
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.
|
inlineinherited |
is this scene accelerated by gravity ?
Definition at line 194 of file SceneBase.hh.
Referenced by BIAS::SceneBase::AnimationAndCollision().
|
inlineinherited |
get mass and velocity in m/s
Definition at line 162 of file SceneBase.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.
|
inlineinherited |
Get point of interest.
Definition at line 57 of file TrackballControl.hh.
|
inlineinherited |
Get the drawing style for points.
Definition at line 100 of file SceneBase.hh.
|
inlineinherited |
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 |
Get the drawing style for triangles.
Definition at line 106 of file SceneBase.hh.
|
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.
|
virtualinherited |
check if bounding boxes of two scenes overlap
Definition at line 78 of file SceneBase.cpp.
References BIAS::SceneBase::CornersFromBoundingBox(), BIAS::SceneBase::FacesFromBoundingBox(), and BIAS::SceneBase::GetBoundingBox().
Referenced by BIAS::SceneBase::AnimationAndCollision().
|
inlineinherited |
Returns whether the scene is active or not.
Definition at line 127 of file SceneBase.hh.
|
virtualinherited |
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 |
Sets first or second click measurement positions.
Reimplemented from BIAS::TrackballControl.
Definition at line 33 of file DistanceMeasureControl.cpp.
References BIAS::HomgPoint3D::Distance(), BIAS::TrackballControl::LeftMouseDoubleClicked(), and BIAS::HomgPoint3D::Set().
|
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().
|
virtualinherited |
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().
|
virtualinherited |
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().
|
virtual |
Sets intermediate coords.
Reimplemented from BIAS::ControlInterface.
Definition at line 74 of file DistanceMeasureControl.cpp.
|
virtualinherited |
Handles Mouse Wheel events and zooms in or out.
Reimplemented from BIAS::ControlInterface.
Definition at line 42 of file TrackballControl.cpp.
|
inherited |
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().
|
virtualinherited |
this moves the scene (no rotation yet)
Reimplemented in BIAS::SceneThreeDOutWrapper.
Definition at line 345 of file SceneBase.cpp.
Referenced by BIAS::SceneBase::ApplyTimeStep().
|
inlineinherited |
|
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 |
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().
|
virtualinherited |
compute momentum of each scene after collision
see http://de.wikipedia.org/wiki/Sto%C3%9F_(Physik)
contactnormal | the normal of the plane between the two objects at the moment they collide (imagine a piece of paper in between) |
Definition at line 218 of file SceneBase.cpp.
References BIAS::SceneBase::elasticity_, BIAS::SceneBase::GetBoundingBox(), BIAS::SceneBase::gravityImmunity_, BIAS::SceneBase::mass_, BIAS::Vector3< T >::Normalize(), BIAS::Vector3< T >::NormL2(), BIAS::Vector3< T >::ScalarProduct(), and BIAS::SceneBase::velocity_.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
virtualinherited |
this is the entry point seen from GLProjectionParametersBase.
It is called whenever redrawing is required. It checks the IsActive flag and eventually call Draw().
Definition at line 26 of file SceneBase.cpp.
References BIAS::SceneBase::colorMask_, BIAS::SceneBase::Draw(), BIAS::SceneBase::IsActive_, BIAS::SceneBase::RenderBoundingBox(), and BIAS::SceneBase::renderBoundingBox_.
Referenced by BIAS::GLProjectionParametersBase::EndDraw_().
|
virtualinherited |
render the bounding box of the scene using gl-lines
Definition at line 362 of file SceneBase.cpp.
References BIAS::SceneBase::CornersFromBoundingBox(), and BIAS::SceneBase::GetBoundingBox().
Referenced by BIAS::SceneBase::Render().
|
inlinevirtualinherited |
Reset the selection, overwrite to react on calls to this function in derived classes.
Definition at line 95 of file SceneBase.hh.
|
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().
|
virtualinherited |
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().
|
inherited |
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().
|
inherited |
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().
|
inlinevirtualinherited |
Select a scene element/primitive at position p.
Overwrite in derived class to react to selections
p | [in]: position to select object at. |
Definition at line 92 of file SceneBase.hh.
|
inlineinherited |
Set whether the scene is active or not.
Definition at line 129 of file SceneBase.hh.
|
inlineinherited |
Set a color channel active.
Definition at line 135 of file SceneBase.hh.
|
inlinestaticinherited |
set time quantization for animations
Definition at line 242 of file SceneBase.hh.
|
inlineinherited |
sets a color mask for the scene rendering
Definition at line 139 of file SceneBase.hh.
Referenced by BIAS::SceneBase::SceneBase().
|
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 |
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 |
|
inlineinherited |
|
inlineinherited |
void DistanceMeasureControl::SetDistanceMeasure | ( | bool | on | ) |
Activate or deactivate distance measurement.
[in] | bool | on, activates or deactivates distance measurement |
Definition at line 23 of file DistanceMeasureControl.cpp.
|
inlineinherited |
set collision behaviour: 1.0=elastic, no energy is lost, >1 superelastic (requires energy from outside) <1 plastic, converts kinetic into other energy
Definition at line 179 of file SceneBase.hh.
|
inlinestaticinherited |
|
inlinestaticinherited |
|
virtualinherited |
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 camera as projectionparametersinterface, can be of type GLProjection of of any from GLProjectionParametersBase derived class.
Definition at line 80 of file SceneBase.hh.
Referenced by BIAS::View::AppendScene(), BIAS::RenderContextBase::AppendScene(), and BIAS::View::InsertSceneAt().
|
inlineinherited |
set behaviour with respect to gravity
Definition at line 189 of file SceneBase.hh.
|
inlineinherited |
set mass and velocity in m/s
Definition at line 168 of file SceneBase.hh.
|
inlinevirtualinherited |
Set the name of the controller.
Definition at line 74 of file ControlInterface.hh.
|
inlineinherited |
Set the drawing style for points.
Definition at line 98 of file SceneBase.hh.
|
inherited |
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().
|
inlinevirtualinherited |
Set whether to render the boundign box or not.
Definition at line 109 of file SceneBase.hh.
|
inherited |
Definition at line 17 of file TrackballBase.cpp.
|
inlineinherited |
Set the drawing style for triangles.
Definition at line 103 of file SceneBase.hh.
|
inlineinherited |
Definition at line 31 of file TrackballBase.hh.
|
inlineinherited |
|
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().
|
virtualinherited |
compute time to contact of bounding boxes
Definition at line 118 of file SceneBase.cpp.
References BIAS::SceneBase::CornersFromBoundingBox(), BIAS::SceneBase::FacesFromBoundingBox(), BIAS::SceneBase::GetBoundingBox(), BIAS::Vector3< T >::ScalarProduct(), and BIAS::SceneBase::velocity_.
|
inlinevirtualinherited |
Method is called by GLProjection if its params have changed.
The method should then take necassary steps for adapting the rendering state. Needed information should then be fetched through the camera_ pointer. This method is only called if the abstract set of parameters has changed, say the parameters that are also contained in BIAS::Projection
Definition at line 119 of file SceneBase.hh.
|
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 |
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 |
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=().
|
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=().
|
staticprotectedinherited |
Definition at line 511 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
protectedinherited |
Definition at line 265 of file SceneBase.hh.
Referenced by BIAS::SceneBase::DumpInfo().
|
staticprotectedinherited |
how long does a single step in time take for animations ?
Definition at line 254 of file SceneBase.hh.
Referenced by BIAS::SceneBase::AnimationAndCollision().
|
protected |
Definition at line 63 of file DistanceMeasureControl.hh.
|
protected |
Definition at line 67 of file DistanceMeasureControl.hh.
|
protectedinherited |
Definition at line 266 of file SceneBase.hh.
Referenced by BIAS::SceneBase::DumpInfo().
|
protectedinherited |
Definition at line 267 of file SceneBase.hh.
Referenced by BIAS::SceneBase::DumpInfo(), and BIAS::SceneBase::Render().
|
protectedinherited |
the camera which is controlled by this controller
Definition at line 214 of file ControlInterface.hh.
|
protected |
Definition at line 64 of file DistanceMeasureControl.hh.
|
protectedinherited |
Definition at line 260 of file SceneBase.hh.
Referenced by BIAS::SceneBase::SceneBase().
|
protected |
Definition at line 70 of file DistanceMeasureControl.hh.
|
protectedinherited |
Definition at line 261 of file SceneBase.hh.
Referenced by BIAS::SceneBase::SceneBase().
|
protectedinherited |
the more elastic the less enegry is lost in collisions
Definition at line 276 of file SceneBase.hh.
Referenced by BIAS::SceneBase::DumpInfo(), BIAS::SceneBase::PerformCollision(), and BIAS::SceneBase::SceneBase().
|
protected |
Definition at line 65 of file DistanceMeasureControl.hh.
|
staticprotectedinherited |
|
staticprotectedinherited |
|
protectedinherited |
if true, scene is not accelerated by gravity
Definition at line 274 of file SceneBase.hh.
Referenced by BIAS::SceneBase::ApplyTimeStep(), BIAS::SceneBase::PerformCollision(), and BIAS::SceneBase::SceneBase().
|
protectedinherited |
Definition at line 263 of file SceneBase.hh.
Referenced by BIAS::SceneBase::DumpInfo(), and BIAS::SceneBase::Render().
|
protectedinherited |
name of listener/controller
Definition at line 208 of file ControlInterface.hh.
|
protectedinherited |
for collision:
Definition at line 270 of file SceneBase.hh.
Referenced by BIAS::SceneBase::ApplyTimeStep(), BIAS::SceneBase::DumpInfo(), BIAS::SceneBase::PerformCollision(), and BIAS::SceneBase::SceneBase().
|
protectedinherited |
Definition at line 69 of file TrackballControl.hh.
|
protectedinherited |
show the bounding box ?
Definition at line 278 of file SceneBase.hh.
Referenced by BIAS::SceneBase::Render(), and BIAS::SceneBase::SceneBase().
|
protected |
Definition at line 65 of file DistanceMeasureControl.hh.
|
protectedinherited |
Definition at line 69 of file TrackballBase.hh.
|
protectedinherited |
Definition at line 70 of file TrackballBase.hh.
|
protectedinherited |
scene velocity in m/s
Definition at line 272 of file SceneBase.hh.
Referenced by BIAS::SceneBase::ApplyTimeStep(), BIAS::SceneBase::DumpInfo(), BIAS::SceneBase::PerformCollision(), and BIAS::SceneBase::TimeToContact().
|
protected |
Definition at line 66 of file DistanceMeasureControl.hh.
|
protected |
Definition at line 66 of file DistanceMeasureControl.hh.