virtual int intersectRay(Ray& ray, Vector3d& interPoint, Vector3d& interNormal) = 0;This function takes a ray as input and returns 0 if there was no intersection, 1 if there was an intersection from the outside and -1 if there was an intersection from the inside. In case of an intersection, the function sets the intersection point and normal direction. It is fairly easy to implement this function for a triangle mesh for example. Similarly, it's possible to add different lights and shaders. The program loads a scene through a lua script such as this one. For each object the user can determine the color, reflectiveness, shininess, amount of diffuse lighting, index of refraction and other object specific parameters. The position and properties of the lights are also contained in the file.