/* Mathematiques de l'informatique graphique */ /* Rayon lumineux */ /* */ /* Auteur: Nicolas JANEY */ /* nicolas.janey@univ-fcomte.fr */ /* Novembre 2011 */ #include "Rayon.h" #include "Position3D.h" #include "Direction3D.h" #include "Sphere.h" Rayon::Rayon(void) { pos = new Position3D(); dir = new Direction3D(); } Rayon::Rayon(double px,double py,double pz, double dx,double dy,double dz){ pos = new Position3D(px,py,pz); dir = new Direction3D(dx,dy,dz); } Rayon::Rayon(Position3D *c,Direction3D *d) { pos = new Position3D(c); dir = new Direction3D(d); } Rayon::~Rayon(void) { delete(pos); delete(dir); } bool Rayon::intersection(Sphere *s) { return(s->intersection(this)); }