Ejemplo n.º 1
0
                public bool insideRoute(SimpleKMPs.Routes.RouteGroup grp)
                {
                    List <Extensions.pointInPoly.Point> poly = new List <Extensions.pointInPoly.Point>();

                    foreach (var en in grp.Entries)
                    {
                        poly.Add(new Extensions.pointInPoly.Point(en.PositionX, en.PositionZ));
                    }
                    Extensions.pointInPoly.Point[] arr = poly.ToArray();
                    if (Extensions.pointInPoly.isInside(arr, 4, new Extensions.pointInPoly.Point(minX, minZ)) ||
                        Extensions.pointInPoly.isInside(arr, 4, new Extensions.pointInPoly.Point(minX, maxZ)) ||
                        Extensions.pointInPoly.isInside(arr, 4, new Extensions.pointInPoly.Point(maxX, maxZ)) ||
                        Extensions.pointInPoly.isInside(arr, 4, new Extensions.pointInPoly.Point(maxX, minZ)))
                    {
                        return(true);
                    }
                    return(false);
                }
Ejemplo n.º 2
0
 public IntroCamePlayer(Form1 Parent, SimpleKMP kmp, Camera.CameraEntry entry)
 {
     this.Parent    = Parent;
     this.entry     = entry;
     this.kmp       = kmp;
     needsRendering = false;
     route          = kmp.Routes.Entries[entry.RouteID];
     currindex      = 0;
     UpdateLookAtValues();
     UpdateFOVValues();
     try
     {
         UpdateValues();
     } catch
     {
         stop = true;
         pos  = routetopos(route.Entries[currindex]);
     }
     Start();
 }