コード例 #1
0
ファイル: Plane.hpp プロジェクト: hhsaez/crimild
		char whichSide( const VectorImpl &point ) const 
		{
			auto d = signedDistanceToPoint( point );
			if ( d > 0 ) {
				return +1;
			}
			else if ( d < 0 ) {
				return -1;
			}

			return 0;
		}
コード例 #2
0
 double Plane::distanceToPoint(const Eigen::Vector3d p)
 {
   return fabs(signedDistanceToPoint(p));
 }
コード例 #3
0
 double Plane::signedDistanceToPoint(const Eigen::Vector4f p)
 {
   return signedDistanceToPoint(Eigen::Vector3d(p[0], p[1], p[2]));
 }
コード例 #4
0
ファイル: Plane.hpp プロジェクト: hhsaez/crimild
		VectorImpl project( const VectorImpl &point ) const
		{
			return point - signedDistanceToPoint( point ) * getNormal();
		}
コード例 #5
0
ファイル: Plane.hpp プロジェクト: hhsaez/crimild
		PRECISION distanceToPoint( const VectorImpl &point ) const
		{
			return Numeric< PRECISION >::fabs( signedDistanceToPoint( point ) );
		}