Add a function virtual XYZBounds FindBounds() const = 0 to the Primitive class. This will require primitives to be bounded, but will let us abstract primitives more easily, which will allow us to add lots of different types of primitives more easily. Like with lights, I'd like to avoid complicated inheritance and use the Primitive class essentially as an interface that primitives must implement. I think that this will be helpful and keep things flexible. I don't want to go down the path of over-inheritance.
Some more ideas for primitives:
rectangular prisms
ellipsoids
cone segments
cylinder segments
circles cut out of a plane
squares cut out of a plane
constructive solid geometries (logical combinations of other primitives, like sphere OR cube or NOT cube and cylinder)
Add a function
virtual XYZBounds FindBounds() const = 0
to thePrimitive
class. This will require primitives to be bounded, but will let us abstract primitives more easily, which will allow us to add lots of different types of primitives more easily. Like with lights, I'd like to avoid complicated inheritance and use thePrimitive
class essentially as an interface that primitives must implement. I think that this will be helpful and keep things flexible. I don't want to go down the path of over-inheritance.Some more ideas for primitives: