aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/snippets/MatrixBase_homogeneous.cpp
diff options
context:
space:
mode:
authorGravatar Konstantinos Margaritis <konstantinos.margaritis@freevec.org>2014-09-21 14:02:51 +0300
committerGravatar Konstantinos Margaritis <konstantinos.margaritis@freevec.org>2014-09-21 14:02:51 +0300
commit60e093a9dce2f8d4c0f3b2ea3e0386d5f01bff8d (patch)
tree05442eeff0bcfe7fe85ce59cf5fa72aa06ee2a07 /doc/snippets/MatrixBase_homogeneous.cpp
parent56408504e4e3fa5f9c59d9edac14ca1ba1255e5a (diff)
parent03dd4dd91a5d8963f56eebe3b9d2eb924bc06e02 (diff)
Merged eigen/eigen into default
Diffstat (limited to 'doc/snippets/MatrixBase_homogeneous.cpp')
-rw-r--r--doc/snippets/MatrixBase_homogeneous.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/snippets/MatrixBase_homogeneous.cpp b/doc/snippets/MatrixBase_homogeneous.cpp
new file mode 100644
index 000000000..457c28f91
--- /dev/null
+++ b/doc/snippets/MatrixBase_homogeneous.cpp
@@ -0,0 +1,6 @@
+Vector3d v = Vector3d::Random(), w;
+Projective3d P(Matrix4d::Random());
+cout << "v = [" << v.transpose() << "]^T" << endl;
+cout << "h.homogeneous() = [" << v.homogeneous().transpose() << "]^T" << endl;
+cout << "(P * v.homogeneous()) = [" << (P * v.homogeneous()).transpose() << "]^T" << endl;
+cout << "(P * v.homogeneous()).hnormalized() = [" << (P * v.homogeneous()).eval().hnormalized().transpose() << "]^T" << endl; \ No newline at end of file