From c66c874c06f8b757ef04c5eac1f86f3396740125 Mon Sep 17 00:00:00 2001 From: ponchio Date: Wed, 12 May 2004 20:55:18 +0000 Subject: [PATCH] *** empty log message *** --- wrap/gl/math.h | 5 ++++- wrap/gui/frustum.h | 17 ++++++++++++++--- wrap/gui/trackball.cpp | 5 +++-- wrap/gui/trackball.h | 4 ++++ wrap/gui/view.h | 4 ++++ 5 files changed, 29 insertions(+), 6 deletions(-) diff --git a/wrap/gl/math.h b/wrap/gl/math.h index bd7c95f6..0ddafa61 100644 --- a/wrap/gl/math.h +++ b/wrap/gl/math.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.4 2004/05/12 13:07:47 ponchio +Added #include + Revision 1.3 2004/05/04 23:36:23 cignoni remove include of gl and added glextgension exploiting, @@ -41,7 +44,7 @@ Revision 1.1 2004/03/31 15:27:17 ponchio #include #include -#include +#include namespace vcg { diff --git a/wrap/gui/frustum.h b/wrap/gui/frustum.h index 2f9d5715..be8c0a68 100644 --- a/wrap/gui/frustum.h +++ b/wrap/gui/frustum.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.3 2004/03/31 15:06:41 ponchio +#include -> #include + Revision 1.2 2004/03/25 14:55:25 ponchio Adding copyright. @@ -40,26 +43,34 @@ Adding copyright. namespace vcg { - template class Frustum: public Camera { + template class Frustum: public View { public: void GetView(); + Point3 ViewPoint(); + T Resolution(); bool IsOutside(Point3 &point); bool IsOutside(Point3 &point, T radius); T Distance(Point3 &point, int plane); - Point3 ViewPoint(); - + protected: T resolution; Plane3 planes[6]; Point3 view_point; }; +typedef Frustum Frustumf; +typedef Frustum Frustumd; + //Implementation template Point3 Frustum::ViewPoint() { return view_point; } +template T Frustum::Resolution() { + return resolution; +} + template bool Frustum::IsOutside(Point3 &point) { Point3 r = Project(point); if(r[0] < viewport[0] || r[0] > viewport[0]+viewport[2] || diff --git a/wrap/gui/trackball.cpp b/wrap/gui/trackball.cpp index 91b53164..67ceb7fd 100644 --- a/wrap/gui/trackball.cpp +++ b/wrap/gui/trackball.cpp @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.5 2004/05/07 12:46:08 cignoni +Restructured and adapted in a better way to opengl + Revision 1.4 2004/04/07 10:54:10 cignoni Commented out unused parameter names and other minor warning related issues @@ -36,8 +39,6 @@ Adding copyright. ****************************************************************************/ -#include - #include "trackball.h" #include diff --git a/wrap/gui/trackball.h b/wrap/gui/trackball.h index 221f9a4f..f82de1bd 100644 --- a/wrap/gui/trackball.h +++ b/wrap/gui/trackball.h @@ -25,6 +25,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.4 2004/05/07 12:46:08 cignoni +Restructured and adapted in a better way to opengl + Revision 1.3 2004/04/07 10:54:10 cignoni Commented out unused parameter names and other minor warning related issues @@ -88,6 +91,7 @@ public: void GetView(); void Apply(); void Draw(); + void ApplynDraw() { Apply(); Draw(); } void Reset(); // Internal Drawing stuff diff --git a/wrap/gui/view.h b/wrap/gui/view.h index d42d93ab..af718773 100644 --- a/wrap/gui/view.h +++ b/wrap/gui/view.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.5 2004/05/07 12:46:08 cignoni +Restructured and adapted in a better way to opengl + Revision 1.4 2004/04/07 10:54:11 cignoni Commented out unused parameter names and other minor warning related issues @@ -50,6 +53,7 @@ y is upward! #include #include #include +#include namespace vcg { /**