[Namespaces changes]

trimesh->tri


clean up of some namespaces to comply the following naming:

Complexes (3 letters namespaces):
order 0 (point cloud    ) :vrt
order 1 (edge meshes)     :edg
order 2 (triangle meshes) :tri
order 3 (triangle meshes) :tet

Simplexes (extended namespaces):
order 0 (vertex)      :vertex 
order 1 (edge)        :edge 
order 2 (triangle)    :triangle (temporarily it remains "face")
order 3 (tetrahedron) :tetrahedron
This commit is contained in:
ganovelli 2008-09-30 10:52:37 +00:00
parent ac3321980c
commit 682865bf25
1 changed files with 3 additions and 3 deletions

View File

@ -53,7 +53,7 @@ compiling error resolved
namespace vcg {
namespace trimesh {
namespace tri {
template <class FaceSpatialIndexing,class TriMeshType>
class Inside
@ -79,7 +79,7 @@ namespace vcg {
{
ScalarType dist;
CoordType Norm, ip, nearest;
FaceType *f = vcg::trimesh::GetClosestFace< TriMeshType, FaceSpatialIndexing >( m, _g_mesh, test, m.bbox.Diag(), dist, nearest, Norm, ip );
FaceType *f = vcg::tri::GetClosestFace< TriMeshType, FaceSpatialIndexing >( m, _g_mesh, test, m.bbox.Diag(), dist, nearest, Norm, ip );
assert( f != NULL ); /// Check if there is any face in the mesh
/// If the point is on the face is considered inside.
if( ( test - nearest ).Norm() <= EPSILON ) return true;
@ -98,7 +98,7 @@ namespace vcg {
CoordType bary = vcg::Barycenter< FaceType >(*f);
/// Set ray : origin and direction
vcg::Ray3<ScalarType> r; r.Set( test, ( bary - test ) ); r.Normalize();
FaceType *f1 = vcg::trimesh::DoRay< TriMeshType, FaceSpatialIndexing >( m, _g_mesh, r, m.bbox.Diag(), dist );
FaceType *f1 = vcg::tri::DoRay< TriMeshType, FaceSpatialIndexing >( m, _g_mesh, r, m.bbox.Diag(), dist );
assert( f1 != NULL );
/// In this case normal direction is enough.
if( ( f1->N() * ( test - bary ) ) < 0 ) return true;