title: How to apply transformation using 3x3 rotation matrix and a translation vector?
body: <p>I am working on an Augmented Reality project using ARCore. Coordinate system of ARCore changes every time you launch the application making the initial position as origin. I have 5 points in another coordinate system and i can find 4 of these positions in Unity world space using ARCore Augmented Image. These points have different values in my other coordinate system of course.  I have to find position of a 5th point in Unity world space using its position in other coordinate system. </p>
  
  <p>I have followed this <a href="http://nghiaho.com/?page_id=671" rel="nofollow noreferrer">tutorial</a> to achieve this. But since Unity does not support 3x3 matrices i used <a href="https://github.com/accord-net/framework/wiki/Unity" rel="nofollow noreferrer">Accord.NET</a> framework. Using the tutorial and Accord matrices i can calculate a 3x3 <code>Rotation</code> matrix and a <code>Translation</code> vector.</p>
  
  <p>However, when i tried to apply this to my 5th point using <code>TestObject.transform.Translate(AccordtoUnity(Translation),Space.World)</code>i am having trouble. When the initial 4 objects and reference objects are at same orientation my translation works perfect. However, when my reference objects are rotated this translation does not work. This makes sense of course since i have only done a translation. My question is how can i apply rotation and translation to my 5th point. Or is there a way to convert my 3x3 rotation matrix and translation to Unity <code>4x4Matrix</code> since then i can use <code>Matrix4x4.MultiplyPoint3x4</code>. Or is it possible to convert my 3x3 rotation matrix to a <code>Quaternion</code> which let me use<code>4x4Matrix.SetTRS</code>. I am a bit confused about this conversion because <code>4x4Matrix</code> includes scaling as well but i am not doing any scaling.</p>
  
  <p>I would be happy if someone can give me some hint or offer a better approach to find a way to find 5th point. Thanks!</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I actually solved the problem based on Daveloper's answer. I constructed a Unity 4x4 matrix like this:</p>
  
  <pre><code>[ R00 R01 R02 T.x ]
  [ R10 R11 R12 T.y ]
  [ R20 R21 R22 T.z ]
  [ 0    0   0   1  ]
  </code></pre>
  
  <p>I tested this creating primitive objects in Unity and apply translation and rotation using the matrix above like this:</p>
  
  <pre><code> TestObject.transform.position  = TransformationMatrix.MultiplyPoint3x4(TestObject.transform.position);
   TestObject.transform.rotation *= Quaternion.LookRotation(TransformationMatrix.GetColumn(2), TransformationMatrix.GetColumn(1));
  </code></pre>