Skip to content

Commit

Permalink
[types] add PRotate impls for LineStrip3
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Mar 15, 2015
1 parent 6eea3c9 commit 2228eed
Showing 1 changed file with 23 additions and 13 deletions.
36 changes: 23 additions & 13 deletions geom-types/src/line.org
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@
- [[#pboundingcircle][PBoundingCircle]]
- [[#pcenter][PCenter]]
- [[#pcircumference][PCircumference]]
- [[#todo-pboundary][TODO PBoundary]]
- [[#todo-pclassify][TODO PClassify]]
- [[#pextrude][PExtrude]]
- [[#todo-pgraph][TODO PGraph]]
- [[#todo-pintersect][TODO PIntersect]]
- [[#pmagnitude][PMagnitude]]
- [[#pproximity][PProximity]]
- [[#todo-preflect][TODO PReflect]]
- [[#psample][PSample]]
- [[#todo-ptransform][TODO PTransform]]
- [[#ptransform][PTransform]]
- [[#pvolume][PVolume]]
- [[#end-of-implementations][End of implementations]]
- [[#todo-linestrip3][TODO LineStrip3]]
Expand All @@ -83,15 +83,15 @@
- [[#pboundingsphere][PBoundingSphere]]
- [[#pcenter][PCenter]]
- [[#pcircumference][PCircumference]]
- [[#todo-pboundary][TODO PBoundary]]
- [[#todo-pclassify][TODO PClassify]]
- [[#pextrude][PExtrude]]
- [[#todo-pgraph][TODO PGraph]]
- [[#todo-pintersect][TODO PIntersect]]
- [[#pmagnitude][PMagnitude]]
- [[#pproximity][PProximity]]
- [[#todo-preflect][TODO PReflect]]
- [[#psample][PSample]]
- [[#todo-ptransform][TODO PTransform]]
- [[#ptransform][PTransform]]
- [[#pvolume][PVolume]]
- [[#end-of-implementations][End of implementations]]
- [[#namespace-declaration][Namespace declaration]]
Expand Down Expand Up @@ -519,7 +519,7 @@ further below.
(circumference
[_] (g/mag _))
#+END_SRC
**** TODO PBoundary
**** TODO PClassify
#+BEGIN_SRC clojure :noweb-ref impl-ls2
g/PClassify
(classify-point [_ v])
Expand Down Expand Up @@ -602,7 +602,7 @@ further below.
[_ udist include-last?]
(gu/sample-uniform udist include-last? (:points _)))
#+END_SRC
**** TODO PTransform
**** PTransform
#+BEGIN_SRC clojure :noweb-ref impl-ls2
g/PRotate
(rotate
Expand Down Expand Up @@ -670,7 +670,7 @@ further below.
(circumference
[_] (g/mag _))
#+END_SRC
**** TODO PBoundary
**** TODO PClassify
#+BEGIN_SRC clojure :noweb-ref impl-ls3
g/PClassify
(classify-point [_ v])
Expand Down Expand Up @@ -732,7 +732,8 @@ further below.
<<lob-geom-proxi>>
#+END_SRC
**** TODO PReflect
***** TODO add support for reflect-on-line
- Note taken on [2015-03-15 Sun 01:19] \\
add support for reflect-on-line
#+BEGIN_SRC clojure :noweb-ref impl-ls3
g/PReflect
(reflect
Expand All @@ -752,18 +753,27 @@ further below.
[_ udist include-last?]
(gu/sample-uniform udist include-last? (:points _)))
#+END_SRC
**** TODO PTransform
**** PTransform
#+BEGIN_SRC clojure :noweb-ref impl-ls3
g/PRotate
(rotate
(rotate-around-axis
[_ axis theta]
(thi.ng.geom.types.LineStrip3. (mapv #(g/rotate-around-axis % axis theta) (:points _))))
(rotate-x
[_ theta]
(thi.ng.geom.types.LineStrip3. (mapv #(g/rotate-x % theta) (:points _))))
(rotate-y
[_ theta]
(thi.ng.geom.types.LineStrip3. (mapv #(g/rotate-y % theta) (:points _))))
(rotate-z
[_ theta]
(thi.ng.geom.types.LineStrip3. (mapv #(g/rotate % theta) (:points _))))
(thi.ng.geom.types.LineStrip3. (mapv #(g/rotate-z % theta) (:points _))))
g/PScale
(scale
([_ s]
(thi.ng.geom.types.LineStrip3. (mapv #(g/* % s) (:points _))))
(thi.ng.geom.types.LineStrip3. (mapv #(g/* % s) (:points _))))
([_ sx sy]
(thi.ng.geom.types.LineStrip3. (mapv #(g/* % sx sy) (:points _)))))
(thi.ng.geom.types.LineStrip3. (mapv #(g/* % sx sy) (:points _)))))
(scale-size
[_ s]
(thi.ng.geom.types.LineStrip3. (gu/scale-size s (:points _))))
Expand Down

0 comments on commit 2228eed

Please sign in to comment.