<commit_before>#+SEQ_TODO:       TODO(t) INPROGRESS(i) WAITING(w@) | DONE(d) CANCELED(c@)
#+TAGS:           write(w) update(u) fix(f) verify(v) noexport(n)
#+EXPORT_EXCLUDE_TAGS: noexport

* thi.ng.geom.types
** 2D types
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx :mkdirp yes :padline no
  (ns thi.ng.geom.types)
#+END_SRC
*** Line & LineStrip
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Line2 [p q])
  (defrecord LineStrip2 [points])
#+END_SRC
*** Bezier
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Bezier2 [points])
#+END_SRC
*** Triangle
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Triangle2 [a b c])
#+END_SRC
*** Ellipse
**** TODO rename circle ns into ellipse and add ellipse impl
     Even though a circle is a specialization of an Ellipse, we define
     an extra Circle type for performance reasons.
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Ellipse [p ^double rx ^double ry])
  (defrecord Circle [p ^double r])
#+END_SRC
*** Rectangle
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Rect [p ^double w ^double h])
#+END_SRC
*** Polygon
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Polygon [points holes])
#+END_SRC
*** Path
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Path2 [segments])
#+END_SRC
*** Mesh
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Mesh2 [vertices normals fnormals vnormals edges faces attribs])
#+END_SRC
** 3D types
*** Line & LineStrip
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Line3 [p q])
  (defrecord LineStrip3 [points])
#+END_SRC
*** Bezier
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Bezier3 [points])
#+END_SRC
*** Plane
      A plane in cartesian 3D space can be defined as a point =p=
      lying on the plane and normal vector =n= standing perpendicular
      on the plane. The latter defines the plane's orientation in space.
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Plane [p n])
#+END_SRC
*** Triangle
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Triangle3 [a b c])
#+END_SRC
*** Tetrahedron
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Tetrahedron [a b c d])
#+END_SRC
*** Quad
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Quad3 [a b c d])
#+END_SRC
*** AABB
      An Axis-aligned bounding box is defined as the cartesian volume
      extending for =size= units (a 3D vector) from point =p= toward
      positive infinity.
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord AABB [p size])
#+END_SRC
*** Sphere
      Just like a circle in 2D, a 3D sphere is uniquely defined via
      its center point =o= and radius =r=.
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Sphere [o ^double r])
#+END_SRC
*** Mesh
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Mesh3 [vertices normals fnormals vnormals edges faces attribs])
#+END_SRC<commit_msg>update types to avoid cljs warnings (remove ^double type hints)<commit_after>#+SEQ_TODO:       TODO(t) INPROGRESS(i) WAITING(w@) | DONE(d) CANCELED(c@)
#+TAGS:           write(w) update(u) fix(f) verify(v) noexport(n)
#+EXPORT_EXCLUDE_TAGS: noexport

* thi.ng.geom.types
** 2D types
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx :mkdirp yes :padline no
  (ns thi.ng.geom.types)
#+END_SRC
*** Line & LineStrip
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Line2 [p q])
  (defrecord LineStrip2 [points])
#+END_SRC
*** Bezier
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Bezier2 [points])
#+END_SRC
*** Triangle
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Triangle2 [a b c])
#+END_SRC
*** Ellipse

Even though a circle is a specialization of an Ellipse, we define
an extra Circle type for performance reasons.

#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Circle #+clj [p ^double r] #+cljs [p r])
  (defrecord Ellipse #+clj [p ^double rx ^double ry] #+cljs [p rx ry])
#+END_SRC
*** Rectangle
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Rect #+clj [p ^double w ^double h] #+cljs [p w h])
#+END_SRC
*** Polygon
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Polygon [points holes])
#+END_SRC
*** Path
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Path2 [segments])
#+END_SRC
*** Mesh
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Mesh2 [vertices normals fnormals vnormals edges faces attribs])
#+END_SRC
** 3D types
*** Line & LineStrip
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Line3 [p q])
  (defrecord LineStrip3 [points])
#+END_SRC
*** Bezier
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Bezier3 [points])
#+END_SRC
*** Plane
      A plane in cartesian 3D space can be defined as a point =p=
      lying on the plane and normal vector =n= standing perpendicular
      on the plane. The latter defines the plane's orientation in space.
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Plane #+clj [n ^double w] #+cljs [n w])
#+END_SRC
*** Triangle
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Triangle3 [a b c])
#+END_SRC
*** Tetrahedron
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Tetrahedron [a b c d])
#+END_SRC
*** Quad
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Quad3 [a b c d])
#+END_SRC
*** AABB
      An Axis-aligned bounding box is defined as the cartesian volume
      extending for =size= units (a 3D vector) from point =p= toward
      positive infinity.
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord AABB [p size])
#+END_SRC
*** Sphere
      Just like a circle in 2D, a 3D sphere is uniquely defined via
      its center point =o= and radius =r=.
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Sphere #+clj [o ^double r] #+cljs [o r])
#+END_SRC
*** Mesh
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord Mesh3 [vertices normals fnormals vnormals edges faces attribs])
#+END_SRC
*** GMesh
#+BEGIN_SRC clojure :tangle babel/src/cljx/thi/ng/geom/types.cljx
  (defrecord GMesh [vertices normals fnormals vnormals edges faces attribs])
#+END_SRC
{'fraction_non_alphanumeric': 0.1337337044089644, 'fraction_numerical': 0.005273180020506811, 'mean_word_length': 4.363707776904949, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3562423', 'n_tokens_mistral': 2937, 'n_tokens_neox': 2819, 'n_words': 714}