MCPcopy Create free account
hub / github.com/OctoMap/octomap / flyUpdate

Method flyUpdate

octovis/src/extern/QGLViewer/manipulatedCameraFrame.cpp:80–104  ·  view source on GitHub ↗

! Called for continuous frame motion in fly mode (see QGLViewer::MOVE_FORWARD). Emits manipulated(). */

Source from the content-addressed store, hash-verified

78/*! Called for continuous frame motion in fly mode (see QGLViewer::MOVE_FORWARD). Emits
79 manipulated(). */
80void ManipulatedCameraFrame::flyUpdate()
81{
82 static Vec flyDisp(0.0, 0.0, 0.0);
83 switch (action_)
84 {
85 case QGLViewer::MOVE_FORWARD:
86 flyDisp.z = -flySpeed();
87 translate(localInverseTransformOf(flyDisp));
88 break;
89 case QGLViewer::MOVE_BACKWARD:
90 flyDisp.z = flySpeed();
91 translate(localInverseTransformOf(flyDisp));
92 break;
93 case QGLViewer::DRIVE:
94 flyDisp.z = flySpeed() * driveSpeed_;
95 translate(localInverseTransformOf(flyDisp));
96 break;
97 default:
98 break;
99 }
100
101 // Needs to be out of the switch since ZOOM/fastDraw()/wheelEvent use this callback to trigger a final draw().
102 // #CONNECTION# wheelEvent.
103 Q_EMIT manipulated();
104}
105
106Vec ManipulatedCameraFrame::flyUpVector() const {
107 qWarning("flyUpVector() is deprecated. Use sceneUpVector() instead.");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected