-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #281: Sequel: pan with the right button as in eqPly
- Loading branch information
Stefan Eilemann
authored and
Stefan Eilemann
committed
Aug 15, 2014
1 parent
a5a1f64
commit f4b5d5e
Showing
1 changed file
with
3 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
/* Copyright (c) 2011-2012, Stefan Eilemann <[email protected]> | ||
/* Copyright (c) 2011-2014, Stefan Eilemann <[email protected]> | ||
* 2012, Daniel Nachbaur <[email protected]> | ||
* | ||
* This library is free software; you can redistribute it and/or modify it under | ||
|
@@ -178,12 +178,8 @@ void ViewData::moveModel( const float x, const float y, const float z ) | |
if( x == 0.f && y == 0.f && z == 0.f ) | ||
return; | ||
|
||
Vector3f translation; | ||
_modelMatrix.get_translation( translation ); | ||
if( translation.squared_length() < 0.01f ) | ||
_modelMatrix.set_translation( translation + Vector3f( x, y, z )); | ||
else | ||
_modelMatrix.scale_translation( Vector3f( 1.f + x, 1.f + y, 1.f + z )); | ||
_modelMatrix.set_translation( _modelMatrix.get_translation() + | ||
Vector3f( x, y, z )); | ||
setDirty( DIRTY_MODELMATRIX ); | ||
} | ||
|
||
|