Playin' with Matrex
2 files changed, 41 insertions(+), 0 deletions(-)

A => apps/tfex/lib/tf.ex
A => apps/tfex/lib/tfex.ex
A => apps/tfex/lib/tf.ex +4 -0
@@ 0,0 1,4 @@ 
+defmodule Tfex.Tf do
+  @moduledoc "Struct for a transform, defaulting to Local Tangent Plane"
+  defstruct id: :ltp, transform: Tfex.id()
+end

          
A => apps/tfex/lib/tfex.ex +37 -0
@@ 0,0 1,37 @@ 
+defmodule Tfex do
+  @moduledoc """
+  Documentation for `Tfex`.
+  """
+
+  @doc """
+  Hello world.
+
+  ## Examples
+
+      iex> Tfex.hello()
+      :world
+
+  """
+  def hello do
+    :world
+  end
+
+  @doc "Return vector3 for position"
+  def vec3(x,y,z) do
+    Matrex.new([[x,y,z]])
+  end
+
+  @doc "Return identity transform matrix."
+  def id() do
+    Matrex.eye(3)
+  end
+
+  @doc "Create a translation matrix from the vector v"
+  def translation(v) do
+  end
+
+  @doc "Create a rotation matrix from the vector v -- oh fucking hell quaternions"
+  def rotation(v) do
+  end
+
+end