示例#1
0
        public Plane(Vec3 p1, Vec3 p2, Vec3 p3)
        {
            Vec3 v1         = p2 - p1;
            Vec3 v2         = p3 - p1;
            Vec3 plane_norm = v1.Cross(v2);

            plane_norm.Normalize();

            A = plane_norm.X;
            B = plane_norm.Y;
            C = plane_norm.Z;
            D = -A * p1.X - B * p1.Y - C * p1.Z;
        }