Eigen::Vector3f u, v;
u(0) = 1.0;
u(1) = 0.0;
u(2) = 0.0;
// Another way of initializing a vector/matrix
v << 0.0, 1.0, 0.0;cout << "u: " << u.transpose() << endl;
cout << "v: " << v.transpose() << endl;Eigen::Vector3f w = u.cross(v);
cout << u.transpose() << " cross " << v.transpose() << " = " << w.transpose() << endl;
double dot = u.dot(v);
cout << u.transpose() << " dot " << v.transpose() << " = " << dot << endl;Eigen::Vector3f uHat = u.normalized(); // uHat contains u after normalization
u.normalize(); // in-place normalization of u (both have now the same value)
double normU = u.norm();
double normUHat = uHat.norm();
cout << "normU: " << normU << endl; //will output 1 (since it was normalized)
cout << "normUHat: " << normUHat << endl; //same here
u = u.transpose() //NOTE: Be careful when doing stuff like that
//see the "Aliasing" topic in Eigen's documentationEigen::Matrix2f m;
m(0, 0) = 3;
m(1, 0) = 2.5;
m(0, 1) = -1;
m(1, 1) = m(1, 0) + m(0, 1);
cout << "\nMatrix m:\n" << m << endl;// Again, initialize with comma initializer
Eigen::Matrix3f n;
n << 1, 2, 3,
4, 5, 6,
7, 8, 9;
cout << "\nMatrix n:\n" << n << endl;Eigen::Matrix3f m1 = m + n; // This will fail.
Eigen::Matrix2f m2 = Eigen::Matrix2f::Identity();
Eigen::Matrix2f m3 = m + m2; // This will not.
cout << "\nMatrix m3:\n" << m3 << endl;A geometry processing framework
More on http://openflipper.org/Documentation/latest/index.html
git clone --recursive https://graphics.rwth-aachen.de:9000/OpenFlipper-Free/OpenFlipper-Free.git~$ cd /path/to/OpenFlipper-Repo/
~$ mkdir build && cd build
~$ cmake ..
~$ make -j~$ ./Build/OpenFlipper.app/Contents/MacOS/OpenFlipper~$ ./Build/bin/OpenFlippermake -j and not simply make if building from the terminal