Commit f6d88aeb authored by Philipp Schäfer's avatar Philipp Schäfer
Browse files


-added static function to create itaOrientation from view and up vectors
-bugfix: result was wrong when using 3x3 matrices as input
parent 9bee7658
......@@ -399,4 +399,12 @@ classdef itaOrientation
methods(Static = true)
function obj = FromViewUp(view, up)
assert( size(view, 2) == 3 && size(up, 2) == 3,'Size of both inputs must be N x 3 [double].' )
assert( isequal(size(view),size(up)),'Number of view and up vectors must be the same.' )
obj = itaOrientation(ita_vu2quat(view, up));
......@@ -63,7 +63,7 @@ else
% calculate side vector
s = cross(v, u);
s = cross(v', u')'; %NOTE PSC: Matlab thinks in column vectors, so this would fail in case of two 3x3 matrices when not transposing v and u.
% build rotation matrix
vec_ent = size(v,1);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment