OpenMesh has its VectorT class which I believe is used to carry out all sorts of position vector operations (additions/subtractions, inner and outer products, etc.). Are there any examples available on how to actually use it? I would be in particular interested in
mesh.point(vhandle)
which, however, returns a Point()
type.Edit: Apparently Point
is some kind of VectorT
itself because the VectorT
member functions work on Point
objects as well.
Examples for math operation using OpenMesh native point type:
OpenMesh::Vec3f myVec = OpenMesh::Vec3f(0, 0, 0);
float distance = (point1 - point2).norm();
also available: l1_norm()
, l8_norm()
, sqrnorm()
Point interpolated_point = (1 - a) * point1 + a * point2;
Vec3f crossProduct = vec1 % vec2;
only defined for Vec3
(and as you mentioned Point
)
Vec3f dotProduct = vec1 | vec2;