28 Matrix3<g_type>
skew(
const Vector3<g_type>& v)
41 Vector3<g_type>
deltaR(
const Matrix3<g_type>& R)
44 v(0) = R(2, 1) - R(1, 2);
45 v(1) = R(0, 2) - R(2, 0);
46 v(2) = R(1, 0) - R(0, 1);
50 Vector2<g_type>
project(
const Vector3<g_type>& v)
53 const g_type inv_z = g_type(1.0) / (std::abs(v(2)) < g_type(1e-12) ? g_type(1e-12) : v(2));
54 res(0) = v(0) * inv_z;
55 res(1) = v(1) * inv_z;
59 Vector3<g_type>
project(
const Vector4<g_type>& v)
62 const g_type inv_w = g_type(1.0) / (std::abs(v(3)) < g_type(1e-12) ? g_type(1e-12) : v(3));
63 res(0) = v(0) * inv_w;
64 res(1) = v(1) * inv_w;
65 res(2) = v(2) * inv_w;
The primary namespace for the NDEVR SDK.
Vector3< g_type > unproject(const Vector2< g_type > &)
Unprojects a 2D point to 3D by appending z=1.
Vector3< g_type > deltaR(const Matrix3< g_type > &R)
Extracts the rotation vector from a rotation matrix using the Rodrigues formula.
Matrix3< g_type > skew(const Vector3< g_type > &v)
Computes the 3x3 skew-symmetric matrix from a 3D vector.
Vector2< g_type > project(const Vector3< g_type > &)
Projects a 3D point to 2D by dividing by the z component.