source
source copied to clipboard
Add optimised bounding_sphere() calculations for more primitives.
At present, all primitives except the Sphere primitive use the default method of calculating a bounding sphere. The default is to calculate a sphere that encloses the primitives bounding box.
The following primitives should have optimised bounding spheres:
- cone (basic geometry)
- cylinder (basic calculation)
- mesh (algorithm for finding smallest spherical volume enclosing vertices)
The rest will probably remain using the default e.g. parabola and csg.