bfoz / geometry

Geometric primitives for Ruby
https://rubygems.org/gems/geometry
BSD 2-Clause "Simplified" License
47 stars 18 forks source link

Add a Plane object #60

Open bfoz opened 11 years ago

bfoz commented 11 years ago

That infinite flat thing that divides a space into two half-spaces. It can be specified with an origin and a surface normal vector, or a surface normal vector and a distance from the origin along normal.

Make shortcut methods for creating Planes with axis-aligned normal vectors.

The normal vector points to the outside of the plane. The distinction becomes important for CSG and clipping, so I'm specifying the convention up front.