changed the name of some intersection functions to avoid ambiguity
This commit is contained in:
parent
e6feeb2e3d
commit
2e76236b31
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.12 2005/02/11 11:44:07 tommyfranken
|
||||||
|
Trackball translation corrected
|
||||||
|
|
||||||
Revision 1.11 2005/02/02 16:46:41 pietroni
|
Revision 1.11 2005/02/02 16:46:41 pietroni
|
||||||
some warning corrected
|
some warning corrected
|
||||||
|
|
||||||
|
@ -64,6 +67,7 @@ Adding copyright.
|
||||||
#include <vcg/math/similarity.h>
|
#include <vcg/math/similarity.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace vcg;
|
using namespace vcg;
|
||||||
|
|
||||||
|
@ -99,7 +103,7 @@ Point3f TrackMode::HitViewPlane(Trackball *tb, const Point3f &p) {
|
||||||
Line3fN ln= tb->camera.ViewLineFromWindow(Point3f(p[0],p[1],0));
|
Line3fN ln= tb->camera.ViewLineFromWindow(Point3f(p[0],p[1],0));
|
||||||
|
|
||||||
Point3f PonVP;
|
Point3f PonVP;
|
||||||
/*bool res = */Intersection<float>(vp,ln,PonVP);
|
/*bool res = */IntersectionLinePlane<float>(vp,ln,PonVP);
|
||||||
return PonVP;
|
return PonVP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -218,9 +222,9 @@ Point3f SphereMode::Hit(Trackball *tb, const Point3f &p) {
|
||||||
Point3f viewpoint = tb->camera.ViewPoint();
|
Point3f viewpoint = tb->camera.ViewPoint();
|
||||||
Plane3f vp = GetViewPlane(tb->camera, tb->center);
|
Plane3f vp = GetViewPlane(tb->camera, tb->center);
|
||||||
Point3f hit,hitPlane,hitSphere,hitSphere1,hitSphere2,hitHyper;
|
Point3f hit,hitPlane,hitSphere,hitSphere1,hitSphere2,hitHyper;
|
||||||
Intersection<float>(vp, ln, hitPlane);
|
IntersectionLinePlane<float>(vp, ln, hitPlane);
|
||||||
Sphere3f sphere(tb->center,tb->radius);
|
Sphere3f sphere(tb->center,tb->radius);
|
||||||
bool resSp = Intersection<float>(sphere, ln, hitSphere1, hitSphere2);
|
bool resSp = IntersectionLineSphere<float>(sphere, ln, hitSphere1, hitSphere2);
|
||||||
if(Distance(viewpoint,hitSphere1)<Distance(viewpoint,hitSphere2))
|
if(Distance(viewpoint,hitSphere1)<Distance(viewpoint,hitSphere2))
|
||||||
hitSphere=hitSphere1;
|
hitSphere=hitSphere1;
|
||||||
else hitSphere=hitSphere2;
|
else hitSphere=hitSphere2;
|
||||||
|
|
Loading…
Reference in New Issue