Small changes in the long long way to making meshlab and the vcglib really float/double independent
This commit is contained in:
parent
c5efcad9a2
commit
e768943f3e
|
|
@ -244,6 +244,7 @@ public:
|
|||
template <class FaceType>
|
||||
void byFace(FaceType &f, math::Quadric<double> &q1, math::Quadric<double> &q2, math::Quadric<double> &q3, bool QualityQuadric, ScalarType BorderWeight)
|
||||
{
|
||||
typedef typename FaceType::VertexType::CoordType CoordType;
|
||||
double q = QualityFace(f);
|
||||
|
||||
// if quality==0 then the geometrical quadric has just zeroes
|
||||
|
|
@ -260,10 +261,10 @@ public:
|
|||
{
|
||||
Quadric5<double> temp;
|
||||
TexCoord2f newtex;
|
||||
Point3f newpoint = (f.P0(j)+f.P1(j))/2.0 + (f.N()/f.N().Norm())*Distance(f.P0(j),f.P1(j));
|
||||
CoordType newpoint = (f.P0(j)+f.P1(j))/2.0 + (f.N()/f.N().Norm())*Distance(f.P0(j),f.P1(j));
|
||||
newtex.u() = (f.WT( (j+0)%3 ).u()+f.WT( (j+1)%3 ).u())/2.0;
|
||||
newtex.v() = (f.WT( (j+0)%3 ).v()+f.WT( (j+1)%3 ).v())/2.0;
|
||||
Point3f oldpoint = f.P2(j);
|
||||
CoordType oldpoint = f.P2(j);
|
||||
TexCoord2f oldtex = f.WT((j+2)%3);
|
||||
|
||||
f.P2(j)=newpoint;
|
||||
|
|
|
|||
Loading…
Reference in New Issue