00001 // This is brl/bbas/imesh/imesh_vertex.cxx 00002 00003 //: 00004 // \file 00005 00006 00007 #include "imesh_vertex.h" 00008 00009 00010 //: compute the vector normal to the plane defined by 3 vertices 00011 vgl_vector_3d<double> imesh_tri_normal(const imesh_vertex<3>& a, 00012 const imesh_vertex<3>& b, 00013 const imesh_vertex<3>& c) 00014 { 00015 vgl_vector_3d<double> ac(c[0]-a[0],c[1]-a[1],c[2]-a[2]); 00016 vgl_vector_3d<double> ab(b[0]-a[0],b[1]-a[1],b[2]-a[2]); 00017 return cross_product(ab,ac); 00018 }