summaryrefslogtreecommitdiff
path: root/src/Camera.h
diff options
context:
space:
mode:
authorDon Bright <hugh.m.bright@gmail.com>2013-09-12 00:52:31 (GMT)
committerDon Bright <hugh.m.bright@gmail.com>2013-09-12 00:52:31 (GMT)
commitea92d9ce190adf34f48778c39ffaeca9b5a7da13 (patch)
treed90fc6690d1c15378c86ec8971e25041d09146ad /src/Camera.h
parentb53dde04e2a13c066cfa0c552fe5bd0cdd1b8dbd (diff)
fix issue #430
Diffstat (limited to 'src/Camera.h')
-rw-r--r--src/Camera.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/Camera.h b/src/Camera.h
index dfc71f8..6079672 100644
--- a/src/Camera.h
+++ b/src/Camera.h
@@ -47,7 +47,8 @@ public:
projection = Camera::PERSPECTIVE;
}
- void setup( std::vector<double> params ) {
+ void setup( std::vector<double> params )
+ {
if ( params.size() == 7 ) {
type = Camera::GIMBAL;
object_trans << params[0], params[1], params[2];
@@ -62,6 +63,16 @@ public:
}
}
+ void gimbalDefaultTranslate()
+ { // match the GUI viewport numbers (historical reasons)
+ object_trans.x() *= -1;
+ object_trans.y() *= -1;
+ object_trans.z() *= -1;
+ object_rot.x() = fmodf(360 - object_rot.x() + 90, 360 );
+ object_rot.y() = fmodf(360 - object_rot.y(), 360);
+ object_rot.z() = fmodf(360 - object_rot.z(), 360);
+ }
+
// Vectorcam
Eigen::Vector3d eye;
Eigen::Vector3d center; // (aka 'target')
contact: Jan Huwald // Impressum