#133 FPlane::PlaneDot   UE4     vector     5 years ago (owner) Document
 /**
  * Calculates distance between plane and a point.
  *
  * @param P The other point.
  * @return >0: point is in front of the plane, <0: behind, =0: on the plane.
  */
 FORCEINLINE float FPlane::PlaneDot(const FVector &P) const
 {
 	return X * P.X + Y * P.Y + Z * P.Z - W;
 }
从其注释表明,这是计算点到Plane的距离的函数,同时要知道,Plane将空间分成了两部分,其法线正向所在的部分定义为正,另一部分定义为负。在正空间的点到Plane的距离为正,负空间的点到Plane的距离为负。
上面的图1和图2中,BasePoint为定义Plane时所用的那个点,FPlane里存储的W值已在图中标出,W存储的是Normal.Dot(BasePoint),即BasePoint在Normal上的投影。所以W为如图所示。图1和图2中分别演示了2种Plane的情形,P点各演示了3种可能的情形,最终得出的distance都是N.Dot(P) - W
#189的解释简单直接