ProjectOntoLine() public static method

public static ProjectOntoLine ( Vector3D nl, Vector3D pl, Vector3D point ) : Vector3D
nl Vector3D
pl Vector3D
point Vector3D
return Vector3D
コード例 #1
0
 public static void TranslateSphere(Sphere s, Vector3D t)
 {
     if (s.IsPlane)
     {
         Vector3D offsetAlongNormal = Euclidean3D.ProjectOntoLine(s.Normal, new Vector3D(), t);
         s.Offset += offsetAlongNormal;
     }
     else
     {
         s.Center += t;
     }
 }