Primitives

Available SURFACE primitives are :

and their pending VOLUMES : SphereVolume, BoxVolume, CylinderVolume, ConeVolume, TorusVolume

These objects all inherit from class Object.

Volumes are provided in order to be able to do CSG. While surfaces are usefull to include an object into another transparent object.

 

 

!!! Fall Trap :

Assume you want to put a wodden torus into a big sphere constituted out of glass. If you try this with a SphereVolume and a TorusVolume, you may get into troubles. Indeed, when considering a point inside the torus, the raytracer won't be able to decide whether the point is inside the torus or inside the sphere. Depending on the order you added these objects to the scene, this could lead to a wrong refraction effect. The solutions : either make a csg object constituted of a SphereVolume minus a TorusVolume, then place the TorusVolume exactly in the hole; or place a SphereVolume, then place a Torus (a surfacic one...) inside.