1 #include <GLviewer/GLProjectionParametersBase.hh>
2 #include <Base/Math/Vector3.hh>
3 #include <Base/Geometry/RMatrixBase.hh>
4 #include "OnlyRotationControl.hh"
7 #include <Gui/biasgl.h>
31 controlledObject_->GetExtrinsics(C, up);
33 RMatrix R = controlledObject_->GetMyselfAsProjectionParameterBase()->GetR();
34 double w=1.0/180.0*M_PI;
35 if (left){ w=-1.0/180.0*M_PI; }
43 double phix,phiy,phiz;
45 controlledObject_->SetExtrinsics(
HomgPoint3D(C), ges);
47 cout<<
"actual yaw (rad): "<<phiy<<
" (deg): "<<phiy*180.0/M_PI <<
" (!not unique)"<< endl; cout<<
"and roll (rad): "<<phiz<<
" (deg): "<<phiz*180.0/M_PI
48 <<
" (!not unique)"<< endl; cout<<
"actual pitch (rad): "<<phix<<
" (deg): "<<phix*180.0/M_PI
49 <<
" (!not unique)"<< endl;
64 controlledObject_->GetExtrinsics(C, up);
65 RMatrix R = controlledObject_->GetMyselfAsProjectionParameterBase()->GetR();
66 double w=0.1/180.0*M_PI;
74 double phix,phiy,phiz;
76 controlledObject_->SetExtrinsics(
HomgPoint3D(C), ges);
77 cout<<
"actual pitch (rad): "<<phix<<
" (deg): "<<phix*180.0/M_PI
78 <<
" (!not unique)"<< endl;
79 cout<<
"and roll (rad): "<<phiz<<
" (deg): "<<phiz*180.0/M_PI
80 <<
" (!not unique)"<< endl;
81 cout<<
"and yaw (rad): "<<phiy<<
" (deg): "<<phiy*180.0/M_PI
82 <<
" (!not unique)"<< endl;
96 controlledObject_->GetExtrinsics(C, up);
98 RMatrix R = controlledObject_->GetMyselfAsProjectionParameterBase()->GetR();
99 double w =0.1/180.0*M_PI;
109 double phix,phiy,phiz;
112 controlledObject_->SetExtrinsics(
HomgPoint3D(C), ges);
113 cout<<
"actual roll (rad): "<<phiz<<
" (deg): "<<phiz*180.0/M_PI
114 <<
" (!not unique)"<< endl;
115 cout<<
"actual pitch (rad): "<<phix<<
" (deg): "<<phix*180.0/M_PI
116 <<
" (!not unique)"<< endl;
118 cout<<
"and yaw (rad): "<<phiy<<
" (deg): "<<phiy*180.0/M_PI
119 <<
" (!not unique)"<< endl;
142 controlledObject_->GetExtrinsics(C, up);
146 RMatrix R = controlledObject_->GetMyselfAsProjectionParameterBase()->GetR();
153 double phix,phiy,phiz;
155 controlledObject_->SetExtrinsics(
HomgPoint3D(C), ges);
159 cout<<
"actual roll (rad): "<<phiz<<
" (deg): "<<phiz*180.0/M_PI <<
" (!not unique)"<< endl;
169 bool frontMove=
false;
187 controlledObject_->GetExtrinsics(C, up);
200 cout<<
"actual position: x= "<<C[0]<<
" y: "<<C[1]<<
"z: "<<C[2]<<endl;
201 RMatrix R = controlledObject_->GetMyselfAsProjectionParameterBase()->GetR();
202 controlledObject_->SetExtrinsics(
HomgPoint3D(C), R);
212 RMatrix R = controlledObject_->GetMyselfAsProjectionParameterBase()->GetR();
214 controlledObject_->GetExtrinsics(C, up);
216 rememroll=180+(rememroll*180/M_PI);
217 rememroll=rememroll*180/M_PI;
218 controlledObject_->SetExtrinsics(C, C+rotationAxis,up);
219 upsidedown=!upsidedown;
bool MiddleMouseMoved(int x1, int x2, int y1, int y2)
performs a left/right (roll) rotation (mouse moving left-right) for animations without changing the v...
bool LeftMouseMoved(int x1, int x2, int y1, int y2)
performs a left/right (yaw) rotation (mouse moving left-right) for animations without changing the vi...
bool LeftMouseDoubleClicked(int x, int y)
performs a reset for (roll) rotation without changing the viewport position
bool LeftAndRightMouseMoved(int x1, int x2, int y1, int y2)
performs a minimal changing of the viewport position
bool RightMouseMoved(int x1, int x2, int y1, int y2)
performs a up/down (pitch) rotation (mouse moving up-down) for animations without changing the viewpo...
void Mult(const Vector3< T > &argvec, Vector3< T > &destvec) const
matrix - vector multiplicate this matrix with Vector3, storing the result in destvec calculates: dest...
int GetRotationAnglesXYZ(double &PhiX, double &PhiY, double &PhiZ) const
Get Euler angles for this rotation matrix in order XYZ.
bool RightMouseDoubleClicked(int, int)
performs an invert of up vector -to correct vrml scenes
class BIASGeometryBase_EXPORT HomgPoint3D