Liking cljdoc? Tell your friends :D

thi.ng.geom.mesh.csg


all-polygonsclj/s

(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.
sourceraw docstring

clipclj/s

(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.
sourceraw docstring

clip-polygonsclj/s

(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.
sourceraw docstring

compute-split-typesclj/s

(compute-split-types n w vertices)
source

csg->meshclj/s

(csg->mesh node)
(csg->mesh mesh node)
source

csg-coneclj/s

(csg-cone s e radius res)
(csg-cone s e r-south r-north res)
source

csg-nodeclj/s

(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.
sourceraw docstring

csg-polygonclj/s

(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.
sourceraw docstring

CSGNodecljs

source

CSGPolygoncljs

source

intersectclj/s

(intersect a b)
source

invertclj/s

(invert {:keys [front back plane] :as node})
source

mesh->csgclj/s

(mesh->csg m)
source

split-polyclj/s

(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].
sourceraw docstring

split-poly*clj/s

(split-poly* n w vertices types)
source

subtractclj/s

(subtract a b)
source

unionclj/s

(union a b)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close