Esempio n. 1
0
 public float GetDistanceToPoint(Vec3 point)
 {
     return(Vec3.Dot(normal, point) + distance);
 }
Esempio n. 2
0
 public static MyPlane Translate(MyPlane plane, Vec3 translation)
 {
     return(new MyPlane(plane.normal, plane.distance += Vec3.Dot(plane.normal, translation)));
 }
Esempio n. 3
0
 public void Translate(Vec3 translation)
 {
     distance += Vec3.Dot(normal, translation);
 }
Esempio n. 4
0
 public MyPlane(Vec3 inNormal, Vec3 inPoint)
 {
     normal   = inNormal.normalized;
     distance = -Vec3.Dot(normal, inPoint);
 }
Esempio n. 5
0
 public void SetNormalAndPosition(Vec3 inNormal, Vec3 inPoint)
 {
     normal   = inNormal.normalized;
     distance = -Vec3.Dot(inNormal, inPoint);
 }