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