Liking cljdoc? Tell your friends :D

thi.ng.geom.attribs


const-face-attribsclj/s

(const-face-attribs fattribs)

Similar to face-attribs fn, but for attributes which are constant for all vertices of a single face. Takes a seq of attrib values and returns generator fn.

Similar to face-attribs fn, but for attributes which are constant
for all vertices of a single face. Takes a seq of attrib values and
returns generator fn.
sourceraw docstring

face-attribsclj/s

(face-attribs fattribs)

Vertex attribute generator using given seq of attribs. The seq should contain at least the same number of elements as there are faces to be generated. Each item itself is a vector of attrib values (in vertex order) to be assigned to each vertex. Returns generator fn.

Vertex attribute generator using given seq of attribs. The seq
should contain at least the same number of elements as there are
faces to be generated. Each item itself is a vector of attrib
values (in vertex order) to be assigned to each vertex. Returns
generator fn.
sourceraw docstring

generate-face-attribsclj/s

(generate-face-attribs verts face-id attribs opts)

Takes a vector of face vertices, face id, a map of vertex attribute generator fns and an options arg passed to the attribute generator fns. Returns 2-elem vector of [verts vert-attribs]. The generator fns themselves take these 4 args and should return the attribute for a single vertex: face-id, vertex-id, vertex, opts (a map).

Takes a vector of face vertices, face id, a map of vertex attribute
generator fns and an options arg passed to the attribute generator
fns. Returns 2-elem vector of [verts vert-attribs]. The generator
fns themselves take these 4 args and should return the attribute for
a single vertex: face-id, vertex-id, vertex, opts (a map).
sourceraw docstring

supplied-attribclj/s

(supplied-attrib attrib)
(supplied-attrib attrib tx)

Higher order helper, returns attribute generator fn for types which emit pre-computed values as part of their as-mesh impl. Takes attrib key and for each vertex looks up value in opts map (which is supplied by supporting types, e.g. sphere). If called via 2 args, the looked up values will also be passed to transformation fn (2nd arg).

Higher order helper, returns attribute generator fn for types which
emit pre-computed values as part of their `as-mesh` impl. Takes
attrib key and for each vertex looks up value in opts map (which is
supplied by supporting types, e.g. sphere). If called via 2 args,
the looked up values will also be passed to transformation fn (2nd
arg).
sourceraw docstring

uv-cube-map-hclj/s

(uv-cube-map-h h)
(uv-cube-map-h h pow2?)
source

uv-cube-map-vclj/s

(uv-cube-map-v h)
(uv-cube-map-v w pow2?)
source

uv-default-rectclj/s

source

uv-facesclj/s

source

uv-flat-discclj/s

(uv-flat-disc _ vid _ {:keys [theta r] :as opts})

Generates UV coordinates for a circle/trianglefan, using data provided in options map (:theta & :r keys). The first vertex of each triangle is assumed to be in the center of the circle, the other 2 vertices are located at the circles perimeter.

Generates UV coordinates for a circle/trianglefan, using data
provided in options map (:theta & :r keys). The first vertex of each
triangle is assumed to be in the center of the circle, the other 2
vertices are located at the circles perimeter.
sourceraw docstring

uv-polygon-discclj/s

(uv-polygon-disc res)

HOF UV generator for polygons/polyhedras. Takes polygon resolution and computes N UV coords, returns generator fn

HOF UV generator for polygons/polyhedras. Takes polygon resolution
and computes N UV coords, returns generator fn
sourceraw docstring

uv-rect-for-sizeclj/s

(uv-rect-for-size w)
(uv-rect-for-size w h)
(uv-rect-for-size w h x y uw vh)
source

uv-tubeclj/s

(uv-tube _ vid _ {:keys [u v du dv]})

Generates tubular UV coordinates, using data provided in options map (:u :v :du :dv keys)

Generates tubular UV coordinates, using data provided in
options map (:u :v :du :dv keys)
sourceraw docstring

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

× close