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
$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.

View File

@ -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();

View File

@ -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

View File

@ -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 {

View File

@ -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 <class T> void View<T>::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);