Orthography lenght -> length
This commit is contained in:
parent
33e1231056
commit
dfc9192715
|
@ -91,14 +91,14 @@ namespace vcg{
|
||||||
*/
|
*/
|
||||||
static bool check_feasible(HEdgePointer hp, CoordType &V1, CoordType &V2, TriMeshType &tm, GRID &grid)
|
static bool check_feasible(HEdgePointer hp, CoordType &V1, CoordType &V2, TriMeshType &tm, GRID &grid)
|
||||||
{
|
{
|
||||||
float lenght = Distance( V1, V2 );
|
float length = Distance( V1, V2 );
|
||||||
|
|
||||||
Fitmap_attr M_Fit = tri::Allocator<TriMeshType>::template GetPerVertexAttribute<float>(tm,"M-Fitmap");
|
Fitmap_attr M_Fit = tri::Allocator<TriMeshType>::template GetPerVertexAttribute<float>(tm,"M-Fitmap");
|
||||||
|
|
||||||
CoordType P = (V1+V2)/2;
|
CoordType P = (V1+V2)/2;
|
||||||
float fitmap = compute_fitmap(hp, P, tm, grid, M_Fit);
|
float fitmap = compute_fitmap(hp, P, tm, grid, M_Fit);
|
||||||
|
|
||||||
return lenght <= fitmap/Mfit_coeff();
|
return length <= fitmap/Mfit_coeff();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Computes the weight of a diagonal using S-Fitmap
|
/*! Computes the weight of a diagonal using S-Fitmap
|
||||||
|
|
|
@ -216,7 +216,7 @@ public:
|
||||||
*/
|
*/
|
||||||
inline bool IsEmpty() const { return min==max; }
|
inline bool IsEmpty() const { return min==max; }
|
||||||
|
|
||||||
/// Computes lenght of diagonal
|
/// Computes length of diagonal
|
||||||
ScalarType Diag() const
|
ScalarType Diag() const
|
||||||
{
|
{
|
||||||
return Distance(min,max);
|
return Distance(min,max);
|
||||||
|
|
|
@ -106,7 +106,7 @@ public:
|
||||||
ScalarType Length() const
|
ScalarType Length() const
|
||||||
{ return (_p0 - _p1).Norm(); }
|
{ return (_p0 - _p1).Norm(); }
|
||||||
|
|
||||||
/// return segment squared lenght
|
/// return segment squared length
|
||||||
ScalarType SquaredLength()
|
ScalarType SquaredLength()
|
||||||
{ return (_p0 - _p1).SquaredNorm(); }
|
{ return (_p0 - _p1).SquaredNorm(); }
|
||||||
/// flips: a-b becomes b-a
|
/// flips: a-b becomes b-a
|
||||||
|
@ -150,10 +150,10 @@ Point2<ScalarType> ClosestPoint( Segment2<ScalarType> s, const Point2<ScalarType
|
||||||
l.Set(s.P0(),s.P1()-s.P0());
|
l.Set(s.P0(),s.P1()-s.P0());
|
||||||
ScalarType t = l.Projection(p);
|
ScalarType t = l.Projection(p);
|
||||||
Point2<ScalarType> clos = l.P(t);
|
Point2<ScalarType> clos = l.P(t);
|
||||||
ScalarType lenght = s.Length();
|
ScalarType length = s.Length();
|
||||||
if (t <= 0)
|
if (t <= 0)
|
||||||
return s.P0();
|
return s.P0();
|
||||||
else if (t >= lenght)
|
else if (t >= length)
|
||||||
return s.P1();
|
return s.P1();
|
||||||
else
|
else
|
||||||
return clos;
|
return clos;
|
||||||
|
|
Loading…
Reference in New Issue