added Mirror function

This commit is contained in:
Nico Pietroni 2014-04-07 06:29:32 +00:00
parent 7bb5f1d041
commit b400ca4b75
1 changed files with 8 additions and 1 deletions

View File

@ -116,7 +116,14 @@ public:
ScalarType k = p.dot(_dir) - _offset;
return p - _dir * k;
}
///Mirror the point wrt the plane
PointType Mirror(const PointType &p) const {
PointType mirr=Projection(p);
mirr+=mirr-p;
return mirr;
}
/// Function to normalize direction
void Normalize() {
_dir.Normalize();