changed several calls of CrossVector function
This commit is contained in:
parent
4af26f2df2
commit
5fee62fbb1
|
@ -110,6 +110,18 @@ namespace vcg {
|
||||||
return alpha;
|
return alpha;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///return the direction of the cross field in 3D
|
||||||
|
///given a first direction
|
||||||
|
static void CrossVector(const CoordType &dir0,
|
||||||
|
const CoordType &norm,
|
||||||
|
CoordType axis[4])
|
||||||
|
{
|
||||||
|
axis[0]=dir0;
|
||||||
|
axis[1]=norm^axis[0];
|
||||||
|
axis[2]=-axis[0];
|
||||||
|
axis[3]=-axis[1];
|
||||||
|
}
|
||||||
|
|
||||||
///return the direction of the cross field in 3D
|
///return the direction of the cross field in 3D
|
||||||
static void CrossVector(MeshType &mesh,
|
static void CrossVector(MeshType &mesh,
|
||||||
const FaceType &f,
|
const FaceType &f,
|
||||||
|
@ -119,10 +131,8 @@ namespace vcg {
|
||||||
assert(CrossDir0);
|
assert(CrossDir0);
|
||||||
MeshType::PerFaceAttributeHandle<CoordType> Fh0=
|
MeshType::PerFaceAttributeHandle<CoordType> Fh0=
|
||||||
vcg::tri::Allocator<MeshType>::GetPerFaceAttribute<CoordType>(mesh,std::string("CrossDir0"));
|
vcg::tri::Allocator<MeshType>::GetPerFaceAttribute<CoordType>(mesh,std::string("CrossDir0"));
|
||||||
axis[0]=Fh0[&f];
|
CoordType dir0=Fh0[&f];
|
||||||
axis[1]=f.cN()^axis[0];
|
CrossVector(dir0,f.cN(),axis);
|
||||||
axis[2]=-axis[0];
|
|
||||||
axis[3]=-axis[1];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///return a specific direction given an integer 0..3
|
///return a specific direction given an integer 0..3
|
||||||
|
|
Loading…
Reference in New Issue