(all-polygons {:keys [front back] :as node})
Returns vector of all polygons of the given CSG node and its children.
Returns vector of all polygons of the given CSG node and its children.
(clip {:keys [front back] :as a} b)
Clips the polygons of the first node with the ones from the second. Returns the updated node.
Clips the polygons of the first node with the ones from the second. Returns the updated node.
(clip-polygons {:keys [plane front back] :as node} ps)
Uses a CSG node's plane to recursively clip the given seq of polygons. Returns a flat seq of polygons classified as in-front of the plane or the original seq if no clipping plane is available.
Uses a CSG node's plane to recursively clip the given seq of polygons. Returns a flat seq of polygons classified as in-front of the plane or the original seq if no clipping plane is available.
(csg-node polygons)
(csg-node {:keys [polygons plane front back] :as node} ps)
Creates a new or refines a CSG tree node and recursively adds the given polygons to it.
Creates a new or refines a CSG tree node and recursively adds the given polygons to it.
(csg-polygon vertices)
(csg-polygon vertices shared)
Creates a CSG polygon map from the given vertices and computes a plane definition using the first 3 vertices.
Creates a CSG polygon map from the given vertices and computes a plane definition using the first 3 vertices.
(split-poly {:keys [n w]} poly state)
Takes a plane and splits the given polygon with it. Returns a 4-element vector of classified sub-shapes: [coplanar-front coplanar-back front back].
Takes a plane and splits the given polygon with it. Returns a 4-element vector of classified sub-shapes: [coplanar-front coplanar-back front back].
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close