/*********************************************************** CSC418, SPRING 2005 scene_object.h author: Jack Wang classes defining primitives in the scene ***********************************************************/ #include "util.h" // All primitives should provide a intersection function. // To create more primitives, inherit from SceneObject. // Namely, you can create, Sphere, Cylinder, etc... classes // here. class SceneObject { public: // Returns true if an intersection occured, false otherwise. virtual bool intersect( Ray3D&, Matrix4x4, Matrix4x4 ) = 0; }; // Example primitive you can create, this is a unit square on // the xy-plane. class UnitSquare : public SceneObject { public: bool intersect( Ray3D& ray, Matrix4x4 worldToModel, Matrix4x4 modelToWorld ); };