Exemple #1
0
        static public bool IsIntersecting(this PlaneSpace item, Plane plane, out Plane2 output)
        {
            Ray ray;

            if (item.plane.IsIntersecting(plane, out ray))
            {
                output = Plane2Extensions.CreatePointsAndInsidePoint(
                    item.ProjectPoint(ray.origin),
                    item.ProjectPoint(ray.origin + ray.direction),
                    item.ProjectPoint(ray.origin - plane.normal)
                    );
                return(true);
            }

            output = default(Plane2);
            return(false);
        }
Exemple #2
0
 static public Plane2 GetFlipped(this Plane2 item)
 {
     return(Plane2Extensions.CreateNormalAndPoint(-item.normal, item.GetOrigin()));
 }