openmesh向量及运算符基本操作
openmesh元素的操作
Vec3d运算符的操作
OpenMesh::Vec3d ps(xs0, ys0, zs0);
OpenMesh::Vec3d pt(xt0, yt0, zt0);
OpenMesh::Vec3d src_normal;
double AC_dist = (pt - ps) | src_normal / src_normal.sqrnorm();
ps%pt;
|:compute scalar product,数乘,点积,x1x2 + y1y2 + z1z2
%:叉积,(y1z2-y2z1, x2z1-x1z2, x1y2-x2*y1)
/:component-wise division by with scalar,分量上用标量除
减法-是里面的向量可以直接相减
//提取网格的对应索引的点
mesh src_mesh_;
src_mesh_->vertex_handle(点的索引);//只是得到这个点的顶点句柄
//然后使用函数point()根据点的句柄得到src中点的坐标
src_mesh_->point(src_mesh_->vertex_handle(点的索引);
//或者使用函数normal()根据点的句柄得到src中点的法式,返回值是vec3d
OpenMesh::Vec3d src_normal = src_mesh_->normal(src_mesh_->vertex_handle(点的索引);
向量长度的操作
转