public static void ReAddRocketTrajectoryMissingAreas(RocketEntityPoly rocketEntityPoly,
                                                             BumperEntityPoly bumperEntity,
                                                             ref List <List <IntPoint> > delPolys)
        {
            var bumpRigid     = bumperEntity.CompObj as BumpRigid;
            var bumpPosXNA    = bumpRigid.PositionXNA2D;
            var bumpPosCenter = bumpRigid.PositionXNACenter2D;

            Vector2 bP1, bP2;

            ProjectionHandler.FindBumperTwoBorderPoints(bumperEntity, out bP1, out bP2);
            Vector2 rP1, rP2;

            ProjectionHandler.FindRocketTwoBorderPoints(rocketEntityPoly, out rP1, out rP2);

            Vector2 interP;

            MathHelperModule.FindIntersection(bP1, bP2, rP1, rP2, out interP);

            Vector2 cutP = GetBumperCutStartingPoint(bumpRigid.Dir, bP1, bP2,
                                                     (rocketEntityPoly.CompObj as RocketCarrierService).PositionXNACenter2D);

            if (!RigidsHelperModule.IsCloseEnough(interP,
                                                  (bumperEntity.CompObj as BumpRigid).PositionXNACenter2D,
                                                  20))
            // if the bump is not on the collision course with the rocket
            {
                // Rocket is not on a collision course with the bump, so cut down the del poly area vertically
                List <IntPoint> polyInverseCutVertical = GetInverseCutPolygon(cutP, rocketEntityPoly);

                EntraDrawer.DrawIntoFile(new List <List <IntPoint> >()
                {
                    polyInverseCutVertical
                });

                delPolys = EntraSolver.GetPolySolution(delPolys, polyInverseCutVertical, ClipType.ctIntersection);
                EntraDrawer.DrawIntoFile(delPolys);
            }
        }
        private static List <IntPoint> GetInverseCutPolygon(Vector2 cutP, RocketEntityPoly rocketEntityPoly)
        {
            RocketCarrierService rocket = rocketEntityPoly.CompObj as RocketCarrierService;

            return(GetInverseCutPolygon(cutP, rocket.PositionXNACenter2D));
        }
        public static void FindRocketTwoBorderPoints(RocketEntityPoly rocketEntity, out Vector2 p1, out Vector2 p2)
        {
            RocketCarrierService rocket = (rocketEntity.CompObj as RocketCarrierService);

            FindRocketTwoBorderPoints(rocket, out p1, out p2);
        }