[Shootout-list] Ray tracer developments
Sebastien Loisel
Sebastien Loisel <sloisel@gmail.com>
Sun, 1 May 2005 16:39:58 +0200
> The inheritance hierarchy is certainly one of the most verbose parts. But=
what
> would you use instead? You could use a tagged union, but that is much mor=
e
> common in C than in C++.
I've got a lot of work so I haven't looked in detail, but I suspect
you can replace everything by a single "node" struct, with a list of
children. If the list is empty, it's a sphere, otherwise it's a group.
Sebastien Loisel