*** empty log message ***
This commit is contained in:
parent
da7d87bb75
commit
c66c874c06
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.4 2004/05/12 13:07:47 ponchio
|
||||||
|
Added #include <glew.h>
|
||||||
|
|
||||||
Revision 1.3 2004/05/04 23:36:23 cignoni
|
Revision 1.3 2004/05/04 23:36:23 cignoni
|
||||||
remove include of gl and added glextgension exploiting,
|
remove include of gl and added glextgension exploiting,
|
||||||
|
|
||||||
|
@ -41,7 +44,7 @@ Revision 1.1 2004/03/31 15:27:17 ponchio
|
||||||
|
|
||||||
#include <vcg/math/matrix44.h>
|
#include <vcg/math/matrix44.h>
|
||||||
#include <vcg/math/similarity.h>
|
#include <vcg/math/similarity.h>
|
||||||
#include <gl/glew.h>
|
#include <GL/glew.h>
|
||||||
|
|
||||||
namespace vcg {
|
namespace vcg {
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.3 2004/03/31 15:06:41 ponchio
|
||||||
|
#include <camera> -> #include <view>
|
||||||
|
|
||||||
Revision 1.2 2004/03/25 14:55:25 ponchio
|
Revision 1.2 2004/03/25 14:55:25 ponchio
|
||||||
Adding copyright.
|
Adding copyright.
|
||||||
|
|
||||||
|
@ -40,13 +43,14 @@ Adding copyright.
|
||||||
|
|
||||||
namespace vcg {
|
namespace vcg {
|
||||||
|
|
||||||
template <class T> class Frustum: public Camera {
|
template <class T> class Frustum: public View<T> {
|
||||||
public:
|
public:
|
||||||
void GetView();
|
void GetView();
|
||||||
|
Point3<T> ViewPoint();
|
||||||
|
T Resolution();
|
||||||
bool IsOutside(Point3<T> &point);
|
bool IsOutside(Point3<T> &point);
|
||||||
bool IsOutside(Point3<T> &point, T radius);
|
bool IsOutside(Point3<T> &point, T radius);
|
||||||
T Distance(Point3<T> &point, int plane);
|
T Distance(Point3<T> &point, int plane);
|
||||||
Point3<T> ViewPoint();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
T resolution;
|
T resolution;
|
||||||
|
@ -54,12 +58,19 @@ protected:
|
||||||
Point3<T> view_point;
|
Point3<T> view_point;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef Frustum<float> Frustumf;
|
||||||
|
typedef Frustum<double> Frustumd;
|
||||||
|
|
||||||
|
|
||||||
//Implementation
|
//Implementation
|
||||||
template <class T> Point3<T> Frustum<T>::ViewPoint() {
|
template <class T> Point3<T> Frustum<T>::ViewPoint() {
|
||||||
return view_point;
|
return view_point;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <class T> T Frustum<T>::Resolution() {
|
||||||
|
return resolution;
|
||||||
|
}
|
||||||
|
|
||||||
template <class T> bool Frustum<T>::IsOutside(Point3<T> &point) {
|
template <class T> bool Frustum<T>::IsOutside(Point3<T> &point) {
|
||||||
Point3<T> r = Project(point);
|
Point3<T> r = Project(point);
|
||||||
if(r[0] < viewport[0] || r[0] > viewport[0]+viewport[2] ||
|
if(r[0] < viewport[0] || r[0] > viewport[0]+viewport[2] ||
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$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
|
Revision 1.4 2004/04/07 10:54:10 cignoni
|
||||||
Commented out unused parameter names and other minor warning related issues
|
Commented out unused parameter names and other minor warning related issues
|
||||||
|
|
||||||
|
@ -36,8 +39,6 @@ Adding copyright.
|
||||||
|
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <gl/glew.h>
|
|
||||||
|
|
||||||
#include "trackball.h"
|
#include "trackball.h"
|
||||||
|
|
||||||
#include <wrap/gl/math.h>
|
#include <wrap/gl/math.h>
|
||||||
|
|
|
@ -25,6 +25,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$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
|
Revision 1.3 2004/04/07 10:54:10 cignoni
|
||||||
Commented out unused parameter names and other minor warning related issues
|
Commented out unused parameter names and other minor warning related issues
|
||||||
|
|
||||||
|
@ -88,6 +91,7 @@ public:
|
||||||
void GetView();
|
void GetView();
|
||||||
void Apply();
|
void Apply();
|
||||||
void Draw();
|
void Draw();
|
||||||
|
void ApplynDraw() { Apply(); Draw(); }
|
||||||
void Reset();
|
void Reset();
|
||||||
|
|
||||||
// Internal Drawing stuff
|
// Internal Drawing stuff
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$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
|
Revision 1.4 2004/04/07 10:54:11 cignoni
|
||||||
Commented out unused parameter names and other minor warning related issues
|
Commented out unused parameter names and other minor warning related issues
|
||||||
|
|
||||||
|
@ -50,6 +53,7 @@ y is upward!
|
||||||
#include <vcg/space/plane3.h>
|
#include <vcg/space/plane3.h>
|
||||||
#include <vcg/space/line3.h>
|
#include <vcg/space/line3.h>
|
||||||
#include <vcg/math/matrix44.h>
|
#include <vcg/math/matrix44.h>
|
||||||
|
#include <gl/glew.h>
|
||||||
|
|
||||||
namespace vcg {
|
namespace vcg {
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue