Commented out unused parameter names and other minor warning related issues

This commit is contained in:
Paolo Cignoni 2004-04-07 10:54:11 +00:00
parent 5f1450fd62
commit e5aef23c44
5 changed files with 38 additions and 18 deletions

View File

@ -24,6 +24,9 @@
History History
$Log: not supported by cvs2svn $ $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 Revision 1.2 2004/03/25 14:55:25 ponchio
Adding copyright. Adding copyright.
@ -57,7 +60,7 @@ void Trackball::SetIdentity() {
local.SetIdentity(); local.SetIdentity();
Reset(); Reset();
} }
void Trackball::SetPosition(const Similarityf &m, int millisec) { void Trackball::SetPosition(const Similarityf &m, int /* millisec */) {
local = m; local = m;
//millisec ignored at the moment. //millisec ignored at the moment.
} }
@ -73,7 +76,7 @@ void Trackball::GetView() {
Point3f X, Y, Z, C; Point3f X, Y, Z, C;
X = camera.UnProject(Point3f(c_view[0] + 100, c_view[1], c_view[2])); 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])); 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; C = c_obj;
X = X - C; X.Normalize(); X = X - C; X.Normalize();
Y = Y - C; Y.Normalize(); Y = Y - C; Y.Normalize();
@ -138,8 +141,8 @@ void Trackball::MouseMove(int x, int y) {
} }
Point3f origin = camera.ViewportToScreen(ScreenOrigin()); Point3f origin = camera.ViewportToScreen(ScreenOrigin());
Point3f new_point = camera.ViewportToScreen(Point3f(x, y, 0)) - origin; Point3f new_point = camera.ViewportToScreen(Point3f(float(x), float(y), 0)) - origin;
Point3f old_point = camera.ViewportToScreen(Point3f(last_x, last_y, 0)) - origin; Point3f old_point = camera.ViewportToScreen(Point3f(float(last_x), float(last_y), 0)) - origin;
new_point *= 2; new_point *= 2;
old_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); current_button &= (~button);
SetCurrentAction(); SetCurrentAction();
} }
void Trackball::MouseWheel(Trackball::Button notch) { void Trackball::MouseWheel(Trackball::Button /* notch */ ) {
} }
void Trackball::ButtonDown(Trackball::Button button) { void Trackball::ButtonDown(Trackball::Button button) {
@ -186,11 +189,11 @@ void Trackball::ButtonUp(Trackball::Button button) {
//spinning interface //spinning interface
void Trackball::SetSpinnable(bool on){} void Trackball::SetSpinnable(bool /* on*/ ){}
bool Trackball::IsSpinnable() { bool Trackball::IsSpinnable() {
return spinnable; return spinnable;
} }
void Trackball::SetSpinning(Quaternionf &spin){} void Trackball::SetSpinning(Quaternionf &/* spin*/){}
void Trackball::StopSpinning(){} void Trackball::StopSpinning(){}
bool Trackball::IsSpinning() { bool Trackball::IsSpinning() {
return spinning; return spinning;
@ -200,7 +203,7 @@ bool Trackball::IsSpinning() {
void Trackball::Back(){} void Trackball::Back(){}
void Trackball::Forward(){} void Trackball::Forward(){}
void Trackball::Home(){} void Trackball::Home(){}
void Trackball::HistorySize(int lenght){} void Trackball::HistorySize(int /* lenght */){}
void Trackball::SetCurrentAction() { void Trackball::SetCurrentAction() {
//I use strict matching. //I use strict matching.

View File

@ -24,6 +24,9 @@
History History
$Log: not supported by cvs2svn $ $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 { class Trackball: public Transform {
public: public:
enum Button { BUTTON_LEFT = 1, BUTTON_MIDDLE = 2, BUTTON_RIGHT = 4, WHEEL = 8, enum Button { BUTTON_NONE = 0x0000,
KEY_SHIFT = 16, KEY_CTRL = 32, KEY_ALT = 64, HANDLE = 128 }; BUTTON_LEFT = 0x0001,
BUTTON_MIDDLE = 0x0002,
BUTTON_RIGHT = 0x0004,
WHEEL = 0x0008,
KEY_SHIFT = 0x0010,
KEY_CTRL = 0x0020,
KEY_ALT = 0x0040,
HANDLE = 0x0080 };
Trackball(); Trackball();
void SetIdentity(); void SetIdentity();

View File

@ -24,6 +24,9 @@
History History
$Log: not supported by cvs2svn $ $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; 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 u = p[0];
float w = p[1]; float w = p[1];
float thr = 1/math::Sqrt(2.0f); //in the plane x-y distance from origin, above this use hyperboloid float thr = 1/math::Sqrt(2.0f); //in the plane x-y distance from origin, above this use hyperboloid

View File

@ -24,6 +24,9 @@
History History
$Log: not supported by cvs2svn $ $Log: not supported by cvs2svn $
Revision 1.2 2004/03/25 14:55:25 ponchio
Adding copyright.
****************************************************************************/ ****************************************************************************/
@ -39,12 +42,12 @@ class TrackMode {
public: public:
virtual ~TrackMode() {} virtual ~TrackMode() {}
virtual void Draw() {} 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 { class SphereMode: public TrackMode {
public: public:
Similarityf Apply(const Point3f &p, const Similarityf &a); Similarityf Apply(const Point3f &p, const Similarityf &/*a*/);
}; };
class GravityMode: public TrackMode { class GravityMode: public TrackMode {

View File

@ -24,6 +24,9 @@
History History
$Log: not supported by cvs2svn $ $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 Revision 1.2 2004/03/25 14:55:25 ponchio
Adding copyright. Adding copyright.
@ -63,11 +66,9 @@ public:
template <class T> void View<T>::GetView() { template <class T> void View<T>::GetView() {
double m[16]; double m[16];
glGetDoublev(GL_PROJECTION_MATRIX, m); glGetDoublev(GL_PROJECTION_MATRIX, m);
for(int i = 0; i < 16; i++) proj.Import(Matrix44d(m));
proj[i] = (T)m[i];
glGetDoublev(GL_MODELVIEW_MATRIX, m); glGetDoublev(GL_MODELVIEW_MATRIX, m);
for(int i = 0; i < 16; i++) model.Import(Matrix44d(m));
model[i] = (T)m[i];
glGetIntegerv(GL_VIEWPORT, viewport); glGetIntegerv(GL_VIEWPORT, viewport);