INFO804 Introduction à l'informatique graphique
|
#include <GraphicalObject.h>
Public Member Functions | |
GraphicalObject () | |
Default constructor. Nothing to do. | |
virtual | ~GraphicalObject () |
Virtual destructor since object contains virtual methods. | |
virtual void | init (Viewer &)=0 |
virtual void | draw (Viewer &)=0 |
virtual Vector3 | getNormal (Point3 p)=0 |
virtual Material | getMaterial (Point3 p)=0 |
virtual Real | rayIntersection (const Ray &ray, Point3 &p)=0 |
This is an interface specifying methods that any graphical object should have. It is also drawable to be seen in QGLViewer window. Concrete exemples of a GraphicalObject include spheres.
Definition at line 22 of file GraphicalObject.h.
|
inline |
|
inlinevirtual |
Virtual destructor since object contains virtual methods.
Definition at line 28 of file GraphicalObject.h.
|
pure virtual |
This method is called by Scene::draw() at each frame to redisplay objects in the OpenGL window.
Implemented in rt::Sphere.
Implemented in rt::Sphere.
Implemented in rt::Sphere.
|
pure virtual |
This method is called by Scene::init() at the beginning of the display in the OpenGL window. May be useful for some precomputations.
Implemented in rt::Sphere.
[in] | ray | the incoming ray |
[out] | returns | the point of intersection with the object (if any), or the closest point to it. |
Implemented in rt::Sphere.