Beispiel #1
0
		char whichSide( const VectorImpl &point ) const 
		{
			auto d = signedDistanceToPoint( point );
			if ( d > 0 ) {
				return +1;
			}
			else if ( d < 0 ) {
				return -1;
			}

			return 0;
		}
 double Plane::distanceToPoint(const Eigen::Vector3d p)
 {
   return fabs(signedDistanceToPoint(p));
 }
 double Plane::signedDistanceToPoint(const Eigen::Vector4f p)
 {
   return signedDistanceToPoint(Eigen::Vector3d(p[0], p[1], p[2]));
 }
Beispiel #4
0
		VectorImpl project( const VectorImpl &point ) const
		{
			return point - signedDistanceToPoint( point ) * getNormal();
		}
Beispiel #5
0
		PRECISION distanceToPoint( const VectorImpl &point ) const
		{
			return Numeric< PRECISION >::fabs( signedDistanceToPoint( point ) );
		}