예제 #1
0
 public List <List <IntPoint> > GetDelPolys(CompEntityPoly compsToInspect)
 {
     return(GetDelPolysOfMe(this, new List <CompEntityPoly>()
     {
         compsToInspect
     }));
 }
예제 #2
0
 public List <List <IntPoint> > ApplyEffectPref(List <List <IntPoint> > spaceSoFar,
                                                CompEntityPoly newAdder,
                                                bool withAdd = true)
 {
     return(ApplyMe(spaceSoFar, new List <CompEntityPoly>()
     {
         newAdder
     }, withAdd));
 }
예제 #3
0
        public List <List <IntPoint> > GetAreaPoly(CompEntityPoly adder)
        {
            var polys = new List <List <IntPoint> >();

            if (adder is BubbleEntityPoly)
            {
                BumpersHandler.AddBumpsAreaForBubble(ref polys, this, adder as BubbleEntityPoly);
            }
            else
            {
                polys = new List <List <IntPoint> >()
                {
                    AreaCompPolyHandler.GetBumperPoly((BumpRigid)CompObj, adder.PositionXNACenter2D)
                };
            }
            //EntraDrawer.DrawIntoFileTesting(polys);
            return(polys);
        }
예제 #4
0
        private void AddToLog(List <List <IntPoint> > initialPoly, CompEntityPoly adder)
        {
            List <PolyLog> polys       = this.EntraAgentSimple.PolysLogger.GetLog();
            APPair         addedAPPair = null;

            foreach (PolyLog polyLog in polys)
            {
                if (polyLog.Comp == this)
                {
                    foreach (APPair apPair in polyLog.ApPairs)
                    {
                        if (apPair.AdderComp == adder)
                        {
                            addedAPPair = apPair;
                        }
                    }
                    if (addedAPPair != null)
                    {
                        polyLog.ApPairs.Remove(addedAPPair);
                    }
                }
            }
            this.EntraAgentSimple.PolysLogger.Log(new PolyLog(this, initialPoly, adder));
        }
예제 #5
0
 public override List <List <IntPoint> > ApplyEffect(List <List <IntPoint> > spaceSoFar, CompEntityPoly newAdder)
 {
     return(ApplyMe(spaceSoFar, new List <CompEntityPoly>()
     {
         newAdder
     }, true));
 }
예제 #6
0
 public abstract List <List <IntPoint> > ApplyEffect(List <List <IntPoint> > spaceSoFar, CompEntityPoly adderComp);
예제 #7
0
        public override List <List <IntPoint> > ApplyEffect(List <List <IntPoint> > spaceSoFar, CompEntityPoly adder)
        {
            List <List <IntPoint> > result = new List <List <IntPoint> >();
            var initialPoly = this.GetAreaPoly();

            EntraDrawer.DrawIntoFile(initialPoly);

            if (adder is BlowerEntityPoly)
            {
                AddBlowersEffect(ref initialPoly);
            }
            EntraDrawer.DrawIntoFile(initialPoly);
            this.EntraAgentSimple.PolysLogger.Log(new PolyLog(this, initialPoly, adder));

            result = EntraSolver.GetPolySolution(initialPoly, spaceSoFar, ClipType.ctUnion);
            EntraDrawer.DrawIntoFile(result);
            return(result);
        }
예제 #8
0
 public override List <List <IntPoint> > ApplyEffect(List <List <IntPoint> > spaceSoFar, CompEntityPoly adder)
 {
     throw new NotImplementedException();
 }
예제 #9
0
        public override List <List <IntPoint> > ApplyEffect(List <List <IntPoint> > spaceSoFar, CompEntityPoly adder)
        {
            List <List <IntPoint> > result = new List <List <IntPoint> >();

            var initialPoly = this.GetAreaPoly();

            //BumpersHandler.ReAddNewlyAddedBumpsAreas(ref initialPoly, this);
            this.EntraAgentSimple.PolysLogger.Log(new PolyLog(this, initialPoly, adder));

            result = EntraSolver.GetPolySolution(initialPoly, spaceSoFar, ClipType.ctUnion);
            EntraDrawer.DrawIntoFile(result);
            return(result);
        }
예제 #10
0
        public override List <List <IntPoint> > ApplyEffect(List <List <IntPoint> > spaceSoFar, CompEntityPoly adder)
        {
            var initialPoly = this.GetAreaPoly();

            this.EntraAgentSimple.PolysLogger.Log(new PolyLog(this, initialPoly, null));

            var result = EntraSolver.GetPolySolution(initialPoly, spaceSoFar, ClipType.ctUnion);

            return(result);
        }