Versions in this module Expand all Collapse all v0 v0.0.2 Aug 23, 2026 v0.0.1 Jul 31, 2026 Changes in this version + const PlaneEPSILON + type BSP struct + Back *BSP + Front *BSP + Plane *Plane + Polygons Polygons + func (n *BSP) AddPolygons(polygons Polygons) + func (n *BSP) ClipTo(bsp *BSP) + func (n *BSP) Invert() + func (n *BSP) String() string + func (n BSP) AllPolygons() Polygons + func (n BSP) ClipPolygons(polygons Polygons) Polygons + type Option func(*Options) + func Center(x, y, z float64) Option + func End(x, y, z float64) Option + func Radius(radius float64) Option + func Size(x, y, z float64) Option + func Slices(slices int) Option + func Stacks(stacks int) Option + func Start(x, y, z float64) Option + type Options struct + Center Vector + End Vector + Radius float64 + Size Vector + Slices int + Stacks int + Start Vector + func OptionsFrom(options []Option) *Options + type Plane struct + Normal Vector + W float64 + func PlaneFromPoints(a, b, c Vector) Plane + func (p *Plane) Flip() + func (p Plane) SplitPolygon(polygon Polygon, coplanarFront, coplanarBack, front, back *Polygons) + type Polygon struct + Plane Plane + Vertices []Vertex + func PolygonFromVertices(vertices ...Vertex) Polygon + func (p *Polygon) Flip() + type Polygons []Polygon + func (p Polygons) Clone() Polygons + type Solid struct + Polygons Polygons + func Cube(options ...Option) *Solid + func Cylinder(options ...Option) *Solid + func SolidFromPolygons(polygons Polygons) *Solid + func Sphere(options ...Option) *Solid + func (s *Solid) Intersect(other *Solid) *Solid + func (s *Solid) Inverse() *Solid + func (s *Solid) Subtract(other *Solid) *Solid + func (s *Solid) Union(other *Solid) *Solid + type Vector struct + X float64 + Y float64 + Z float64 + func (v Vector) Cross(a Vector) Vector + func (v Vector) DividedBy(a float64) Vector + func (v Vector) Dot(a Vector) float64 + func (v Vector) Length() float64 + func (v Vector) Lerp(a Vector, t float64) Vector + func (v Vector) Minus(a Vector) Vector + func (v Vector) Negated() Vector + func (v Vector) Plus(a Vector) Vector + func (v Vector) Times(a float64) Vector + func (v Vector) Unit() Vector + type Vertex struct + Normal Vector + Pos Vector + func (v *Vertex) Flip() + func (v Vertex) Interpolate(other Vertex, t float64) Vertex