//----------------------------------------------------------------// float USDist::VecToPlane ( const USVec3D& v, const USPlane3D& p ) { float d = v.Dot ( p.mNorm ) + p.mDist; return (( d < FP_NEAR ) && ( d > -FP_NEAR )) ? 0.0f : d; }
//----------------------------------------------------------------// void USPlane3D::Init ( USVec3D& p, USVec3D& n ) { mNorm = n; mDist = -p.Dot ( n ); }