Ejemplo n.º 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;
		}
Ejemplo n.º 2
0
 double Plane::distanceToPoint(const Eigen::Vector3d p)
 {
   return fabs(signedDistanceToPoint(p));
 }
Ejemplo n.º 3
0
 double Plane::signedDistanceToPoint(const Eigen::Vector4f p)
 {
   return signedDistanceToPoint(Eigen::Vector3d(p[0], p[1], p[2]));
 }
Ejemplo n.º 4
0
		VectorImpl project( const VectorImpl &point ) const
		{
			return point - signedDistanceToPoint( point ) * getNormal();
		}
Ejemplo n.º 5
0
		PRECISION distanceToPoint( const VectorImpl &point ) const
		{
			return Numeric< PRECISION >::fabs( signedDistanceToPoint( point ) );
		}