added CosWedge which returns the cos of a wedge
This commit is contained in:
parent
37057700b2
commit
0856e6a2eb
|
@ -419,6 +419,15 @@ typename TriangleType::ScalarType DoubleArea(const TriangleType &t)
|
||||||
return Norm( (t.P(1) - t.P(0)) ^ (t.P(2) - t.P(0)) );
|
return Norm( (t.P(1) - t.P(0)) ^ (t.P(2) - t.P(0)) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class TriangleType>
|
||||||
|
typename TriangleType::ScalarType CosWedge(const TriangleType &t, int k)
|
||||||
|
{
|
||||||
|
typename TriangleType::CoordType
|
||||||
|
e0 = t.P((k+1)%3) - t.P(k),
|
||||||
|
e1 = t.P((k+2)%3) - t.P(k);
|
||||||
|
return (e0*e1)/(e0.Norm()*e1.Norm());
|
||||||
|
}
|
||||||
|
|
||||||
template<class TriangleType>
|
template<class TriangleType>
|
||||||
Point3<typename TriangleType::ScalarType> Barycenter(const TriangleType &t)
|
Point3<typename TriangleType::ScalarType> Barycenter(const TriangleType &t)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue