COSC-4P80-Assignment-2/lib/eigen-3.4.0/doc/snippets/MatrixBase_hnormalized.cpp

7 lines
377 B
C++
Raw Normal View History

2024-10-21 16:42:03 -04:00
Vector4d v = Vector4d::Random();
Projective3d P(Matrix4d::Random());
cout << "v = " << v.transpose() << "]^T" << endl;
cout << "v.hnormalized() = " << v.hnormalized().transpose() << "]^T" << endl;
cout << "P*v = " << (P*v).transpose() << "]^T" << endl;
cout << "(P*v).hnormalized() = " << (P*v).hnormalized().transpose() << "]^T" << endl;