GlomeTrace-0.3: Ray Tracing Library

Safe HaskellSafe-Inferred

Data.Glome.Csg

Synopsis

Documentation

difference :: SolidItem t m -> SolidItem t m -> SolidItem t mSource

Create a new object based on the subtraction of the second item from the first. This only works if the items have a well-defined inside and outside. Triangles and discs, for instance, have no volume, so subtracting them from anything won't do anything.

If you use the retexture constructor, the surface hollowed out by B will be rendered with B's texture,

intersection :: [SolidItem tag mat] -> SolidItem tag matSource

Create a new item from the boolean intersection of a list of solids. A point is inside the object iff it is inside every primitive. We can construct polyhedra from intersections of planes, but this isn't the most efficient way to do that.