Skip to content

Commit

Permalink
[types] update PTessellate for Quad3 (use tessellate-3 as default)
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Mar 15, 2015
1 parent 94ab30d commit 9deca1b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions geom-types/src/quad.org
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,12 @@ than 1.0.
(->> (g/scale-size _ scale)
(g/vertices)
(map #(g/+ offset %))))
[n s e w f b*] (d/demunge-flags-seq flags "nsewfb")]
[n s e w f b'] (d/demunge-flags-seq flags "nsewfb")]
(->> [(if n [d2 c2 c d])
(if s [b2 a2 a b])
(if e [c2 b2 b c])
(if w [a2 d2 d a])
(if b* [a2 b2 c2 d2])
(if b' [a2 b2 c2 d2])
(if f [d c b a])]
(filter identity)
(map order)
Expand Down Expand Up @@ -289,7 +289,7 @@ function returns a lazyseq of triangles of the subdivided quad.
([{[a b c d] :points}]
[(thi.ng.geom.types.Triangle3. [a b c])
(thi.ng.geom.types.Triangle3. [a c d])])
([_ {tess-fn :fn :or {tess-fn gu/tessellate-with-first} :as opts}]
([_ {tess-fn :fn :or {tess-fn gu/tessellate-3} :as opts}]
(->> (g/subdivide _ opts)
(mapcat #(tess-fn (:points %)))
(map #(thi.ng.geom.types.Triangle3. %)))))
Expand Down

0 comments on commit 9deca1b

Please sign in to comment.