Fixed current_action initialization.
This commit is contained in:
parent
5f01ce404d
commit
f6eb36cac1
wrap/gui
|
@ -24,11 +24,14 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.2 2004/03/25 14:55:25 ponchio
|
||||||
|
Adding copyright.
|
||||||
|
|
||||||
|
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "trackball.h"
|
#include "trackball.h"
|
||||||
#include <wrap/gl/wrap.h>
|
#include <wrap/gl/math.h>
|
||||||
using namespace vcg;
|
using namespace vcg;
|
||||||
|
|
||||||
#include <iostream> //debug!
|
#include <iostream> //debug!
|
||||||
|
@ -46,8 +49,8 @@ Trackball::Trackball(): current_button(0), last_x(-1), last_y(-1), dragging(fals
|
||||||
actions[BUTTON_LEFT] = Action(VIEW, ROTATE);
|
actions[BUTTON_LEFT] = Action(VIEW, ROTATE);
|
||||||
actions[BUTTON_LEFT | KEY_CTRL] = Action(VIEW, DRAG_XY);
|
actions[BUTTON_LEFT | KEY_CTRL] = Action(VIEW, DRAG_XY);
|
||||||
actions[BUTTON_LEFT | KEY_SHIFT] = Action(VIEW, SCALE);
|
actions[BUTTON_LEFT | KEY_SHIFT] = Action(VIEW, SCALE);
|
||||||
actions[WHEEL] = Action(SCREEN, SCALE);
|
actions[WHEEL] = Action(SCREEN, SCALE);
|
||||||
current_action = Action(LOCAL, NONE);
|
SetCurrentAction();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Trackball::SetIdentity() {
|
void Trackball::SetIdentity() {
|
||||||
|
@ -86,8 +89,12 @@ void Trackball::GetView() {
|
||||||
//view = view * Inverse(Similarityf(track.rot));
|
//view = view * Inverse(Similarityf(track.rot));
|
||||||
//spinning ignored
|
//spinning ignored
|
||||||
}
|
}
|
||||||
void Trackball::Apply() {
|
void Trackball::Apply() {
|
||||||
glMultMatrix(track.Matrix());
|
Matrix44f a = track.Matrix();
|
||||||
|
//Transpose(a);
|
||||||
|
glMultMatrix(a);
|
||||||
|
//glMultMatrix(track.Matrix());
|
||||||
|
//glMultMatrix(track);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Trackball::Draw() {
|
void Trackball::Draw() {
|
||||||
|
|
Loading…
Reference in New Issue