From e5aef23c445e8a320b71e07798358fb7adb01b6f Mon Sep 17 00:00:00 2001 From: cignoni Date: Wed, 7 Apr 2004 10:54:11 +0000 Subject: [PATCH] Commented out unused parameter names and other minor warning related issues --- wrap/gui/trackball.cpp | 21 ++++++++++++--------- wrap/gui/trackball.h | 14 ++++++++++++-- wrap/gui/trackmode.cpp | 5 ++++- wrap/gui/trackmode.h | 7 +++++-- wrap/gui/view.h | 9 +++++---- 5 files changed, 38 insertions(+), 18 deletions(-) diff --git a/wrap/gui/trackball.cpp b/wrap/gui/trackball.cpp index c256c15e..9536c563 100644 --- a/wrap/gui/trackball.cpp +++ b/wrap/gui/trackball.cpp @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.3 2004/03/31 15:08:03 ponchio +Fixed current_action initialization. + Revision 1.2 2004/03/25 14:55:25 ponchio Adding copyright. @@ -57,7 +60,7 @@ void Trackball::SetIdentity() { local.SetIdentity(); Reset(); } -void Trackball::SetPosition(const Similarityf &m, int millisec) { +void Trackball::SetPosition(const Similarityf &m, int /* millisec */) { local = m; //millisec ignored at the moment. } @@ -73,7 +76,7 @@ void Trackball::GetView() { Point3f X, Y, Z, C; X = camera.UnProject(Point3f(c_view[0] + 100, c_view[1], c_view[2])); Y = camera.UnProject(Point3f(c_view[0], c_view[1] - 100, c_view[2])); - Z = camera.UnProject(Point3f(c_view[0], c_view[1], c_view[2] + 0.1)); + Z = camera.UnProject(Point3f(c_view[0], c_view[1], c_view[2] + 0.1f)); C = c_obj; X = X - C; X.Normalize(); Y = Y - C; Y.Normalize(); @@ -138,8 +141,8 @@ void Trackball::MouseMove(int x, int y) { } Point3f origin = camera.ViewportToScreen(ScreenOrigin()); - Point3f new_point = camera.ViewportToScreen(Point3f(x, y, 0)) - origin; - Point3f old_point = camera.ViewportToScreen(Point3f(last_x, last_y, 0)) - origin; + Point3f new_point = camera.ViewportToScreen(Point3f(float(x), float(y), 0)) - origin; + Point3f old_point = camera.ViewportToScreen(Point3f(float(last_x), float(last_y), 0)) - origin; new_point *= 2; old_point *= 2; @@ -165,12 +168,12 @@ void Trackball::MouseMove(int x, int y) { } -void Trackball::MouseUp(int x, int y, Trackball::Button button) { +void Trackball::MouseUp(int /* x */, int /* y */, Trackball::Button button) { current_button &= (~button); SetCurrentAction(); } -void Trackball::MouseWheel(Trackball::Button notch) { +void Trackball::MouseWheel(Trackball::Button /* notch */ ) { } void Trackball::ButtonDown(Trackball::Button button) { @@ -186,11 +189,11 @@ void Trackball::ButtonUp(Trackball::Button button) { //spinning interface -void Trackball::SetSpinnable(bool on){} +void Trackball::SetSpinnable(bool /* on*/ ){} bool Trackball::IsSpinnable() { return spinnable; } -void Trackball::SetSpinning(Quaternionf &spin){} +void Trackball::SetSpinning(Quaternionf &/* spin*/){} void Trackball::StopSpinning(){} bool Trackball::IsSpinning() { return spinning; @@ -200,7 +203,7 @@ bool Trackball::IsSpinning() { void Trackball::Back(){} void Trackball::Forward(){} void Trackball::Home(){} -void Trackball::HistorySize(int lenght){} +void Trackball::HistorySize(int /* lenght */){} void Trackball::SetCurrentAction() { //I use strict matching. diff --git a/wrap/gui/trackball.h b/wrap/gui/trackball.h index 86fa47e5..e211dcd6 100644 --- a/wrap/gui/trackball.h +++ b/wrap/gui/trackball.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.2 2004/03/25 14:55:25 ponchio +Adding copyright. + ****************************************************************************/ @@ -49,8 +52,15 @@ Transform interpolate(const Transform &a, const Transform &b, float t); class Trackball: public Transform { public: - enum Button { BUTTON_LEFT = 1, BUTTON_MIDDLE = 2, BUTTON_RIGHT = 4, WHEEL = 8, - KEY_SHIFT = 16, KEY_CTRL = 32, KEY_ALT = 64, HANDLE = 128 }; + enum Button { BUTTON_NONE = 0x0000, + BUTTON_LEFT = 0x0001, + BUTTON_MIDDLE = 0x0002, + BUTTON_RIGHT = 0x0004, + WHEEL = 0x0008, + KEY_SHIFT = 0x0010, + KEY_CTRL = 0x0020, + KEY_ALT = 0x0040, + HANDLE = 0x0080 }; Trackball(); void SetIdentity(); diff --git a/wrap/gui/trackmode.cpp b/wrap/gui/trackmode.cpp index e73f7e18..250e7fad 100644 --- a/wrap/gui/trackmode.cpp +++ b/wrap/gui/trackmode.cpp @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.2 2004/03/25 14:55:25 ponchio +Adding copyright. + ****************************************************************************/ @@ -33,7 +36,7 @@ $Log: not supported by cvs2svn $ using namespace vcg; -Similarityf SphereMode::Apply(const Point3f &p, const Similarityf &m) { +Similarityf SphereMode::Apply(const Point3f &p, const Similarityf & /* m */) { float u = p[0]; float w = p[1]; float thr = 1/math::Sqrt(2.0f); //in the plane x-y distance from origin, above this use hyperboloid diff --git a/wrap/gui/trackmode.h b/wrap/gui/trackmode.h index 69b0cb1b..e7364e0f 100644 --- a/wrap/gui/trackmode.h +++ b/wrap/gui/trackmode.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.2 2004/03/25 14:55:25 ponchio +Adding copyright. + ****************************************************************************/ @@ -39,12 +42,12 @@ class TrackMode { public: virtual ~TrackMode() {} virtual void Draw() {} - virtual Similarityf Apply(const Point3f &p, const Similarityf &a) { return Similarityf().SetIdentity(); } + virtual Similarityf Apply(const Point3f &/* p */, const Similarityf &/*a*/) { return Similarityf().SetIdentity(); } }; class SphereMode: public TrackMode { public: - Similarityf Apply(const Point3f &p, const Similarityf &a); + Similarityf Apply(const Point3f &p, const Similarityf &/*a*/); }; class GravityMode: public TrackMode { diff --git a/wrap/gui/view.h b/wrap/gui/view.h index 4a376c03..f06975b7 100644 --- a/wrap/gui/view.h +++ b/wrap/gui/view.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.3 2004/03/31 15:07:37 ponchio +CAMERA_H -> VCG_CAMERA_H + Revision 1.2 2004/03/25 14:55:25 ponchio Adding copyright. @@ -63,11 +66,9 @@ public: template void View::GetView() { double m[16]; glGetDoublev(GL_PROJECTION_MATRIX, m); - for(int i = 0; i < 16; i++) - proj[i] = (T)m[i]; + proj.Import(Matrix44d(m)); glGetDoublev(GL_MODELVIEW_MATRIX, m); - for(int i = 0; i < 16; i++) - model[i] = (T)m[i]; + model.Import(Matrix44d(m)); glGetIntegerv(GL_VIEWPORT, viewport);