Pointers to Derived Class Objects Losing vfptr
- by duckworthd
To begin, I am trying to write a run-of-the-mill, simple Ray Tracer. In my Ray Tracer, I have multiple types of geometries in the world, all derived from a base class called "SceneObject". I've included the header for it here.
/**
Interface for all objects that will appear in a scene
*/
class SceneObject
{
public:
mat4 M, M_inv;
Color c;
…