Exemple #1
0
//----------------------------------------------------------------//
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;
}
Exemple #2
0
//----------------------------------------------------------------//
void USPlane3D::Init ( USVec3D& p, USVec3D& n ) {
	mNorm = n;
	mDist = -p.Dot ( n );
}