Beispiel #1
0
        private static ObjVisiBorder CalNonShelterVisiBorder(IHasBorderObj obj, Rader rader)
        {
            CircleListNode <BorderPoint> curNode = obj.BorderData.First;
            CircleList <BordPoint>       points  = new CircleList <BordPoint>();

            for (int i = 0; i < obj.BorderData.Length; i++)
            {
                if (rader.PointInRader(Vector2.Transform(ConvertHelper.PointToVector2(curNode.value.p), obj.WorldTrans)))
                {
                    points.AddLast(new BordPoint(i, curNode.value.p));
                }
                curNode = curNode.next;
            }
            if (points.Length != 0)
            {
                return(new ObjVisiBorder(obj, points));
            }
            else
            {
                return(null);
            }
        }
Beispiel #2
0
 public ObjVisiBorder(IHasBorderObj obj, CircleList <VisiBordPoint> visiBorder)
 {
     this.obj        = obj;
     this.visiBorder = visiBorder;
     this.visiBorder.LinkLastAndFirst();
 }
Beispiel #3
0
 private static ObjVisiBorder CalNonShelterVisiBorder( IHasBorderObj obj, Rader rader )
 {
     CircleListNode<BorderPoint> curNode = obj.BorderData.First;
     CircleList<VisiBordPoint> points = new CircleList<VisiBordPoint>();
     for (int i = 0; i < obj.BorderData.Length; i++)
     {
         if (rader.PointInRader( Vector2.Transform( ConvertHelper.PointToVector2( curNode.value.p ), obj.WorldTrans ) ))
         {
             points.AddLast( new VisiBordPoint( i, curNode.value.p ) );
         }
         curNode = curNode.next;
     }
     if (points.Length != 0)
         return new ObjVisiBorder( obj, points );
     else
         return null;
 }
Beispiel #4
0
 public ObjVisiBorder ( IHasBorderObj obj, CircleList<VisiBordPoint> visiBorder )
 {
     this.obj = obj;
     this.visiBorder = visiBorder;
     this.visiBorder.LinkLastAndFirst();
 }