Altered PolyMesh template to work with Eigen's Vectors
This commit is contained in:
@@ -406,7 +406,7 @@ public:
|
||||
{
|
||||
Normal edge_vec;
|
||||
calc_edge_vector(_heh, edge_vec);
|
||||
return edge_vec.sqrnorm();
|
||||
return sqrnorm(edge_vec);
|
||||
}
|
||||
|
||||
/** Calculates the midpoint of the halfedge _heh, defined by the positions of
|
||||
@@ -444,7 +444,7 @@ public:
|
||||
{
|
||||
Normal v0, v1;
|
||||
calc_sector_vectors(_in_heh, v0, v1);
|
||||
Scalar denom = v0.norm()*v1.norm();
|
||||
Scalar denom = length(v0)*length(v1);
|
||||
if ( denom == Scalar(0))
|
||||
{
|
||||
return 0;
|
||||
@@ -470,7 +470,7 @@ public:
|
||||
Normal in_vec, out_vec;
|
||||
calc_edge_vector(_in_heh, in_vec);
|
||||
calc_edge_vector(next_halfedge_handle(_in_heh), out_vec);
|
||||
Scalar denom = in_vec.norm()*out_vec.norm();
|
||||
Scalar denom = length(in_vec)*length(out_vec);
|
||||
if (is_zero(denom))
|
||||
{
|
||||
_cos_a = 1;
|
||||
@@ -479,7 +479,7 @@ public:
|
||||
else
|
||||
{
|
||||
_cos_a = dot(in_vec, out_vec)/denom;
|
||||
_sin_a = cross(in_vec, out_vec).norm()/denom;
|
||||
_sin_a = length(cross(in_vec, out_vec))/denom;
|
||||
}
|
||||
}
|
||||
*/
|
||||
@@ -499,7 +499,7 @@ public:
|
||||
{
|
||||
Normal sector_normal;
|
||||
calc_sector_normal(_in_heh, sector_normal);
|
||||
return sector_normal.norm()/2;
|
||||
return length(sector_normal)/2;
|
||||
}
|
||||
|
||||
/** calculates the dihedral angle on the halfedge _heh
|
||||
@@ -539,7 +539,7 @@ public:
|
||||
calc_sector_normal(_heh, n0);
|
||||
calc_sector_normal(this->opposite_halfedge_handle(_heh), n1);
|
||||
calc_edge_vector(_heh, he);
|
||||
Scalar denom = n0.norm()*n1.norm();
|
||||
Scalar denom = length(n0)*length(n1);
|
||||
if (denom == Scalar(0))
|
||||
{
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user