[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:
parent
ac3321980c
commit
682865bf25
|
@ -53,7 +53,7 @@ compiling error resolved
|
||||||
|
|
||||||
namespace vcg {
|
namespace vcg {
|
||||||
|
|
||||||
namespace trimesh {
|
namespace tri {
|
||||||
|
|
||||||
template <class FaceSpatialIndexing,class TriMeshType>
|
template <class FaceSpatialIndexing,class TriMeshType>
|
||||||
class Inside
|
class Inside
|
||||||
|
@ -79,7 +79,7 @@ namespace vcg {
|
||||||
{
|
{
|
||||||
ScalarType dist;
|
ScalarType dist;
|
||||||
CoordType Norm, ip, nearest;
|
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
|
assert( f != NULL ); /// Check if there is any face in the mesh
|
||||||
/// If the point is on the face is considered inside.
|
/// If the point is on the face is considered inside.
|
||||||
if( ( test - nearest ).Norm() <= EPSILON ) return true;
|
if( ( test - nearest ).Norm() <= EPSILON ) return true;
|
||||||
|
@ -98,7 +98,7 @@ namespace vcg {
|
||||||
CoordType bary = vcg::Barycenter< FaceType >(*f);
|
CoordType bary = vcg::Barycenter< FaceType >(*f);
|
||||||
/// Set ray : origin and direction
|
/// Set ray : origin and direction
|
||||||
vcg::Ray3<ScalarType> r; r.Set( test, ( bary - test ) ); r.Normalize();
|
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 );
|
assert( f1 != NULL );
|
||||||
/// In this case normal direction is enough.
|
/// In this case normal direction is enough.
|
||||||
if( ( f1->N() * ( test - bary ) ) < 0 ) return true;
|
if( ( f1->N() * ( test - bary ) ) < 0 ) return true;
|
||||||
|
|
Loading…
Reference in New Issue