public void SetOccupied(CallbackXY p, float SimZMinLevel, float SimZMaxLevel, float detail)
        {
            //float MinX = this.MinX + offset.X;
            //float MaxX = this.MaxX + offset.X;
            //float MinY = this.MinY + offset.Y;
            //float MaxY = this.MaxY + offset.Y;
            //float MinZ = this.MinZ + offset.Z;
            //float MaxZ = this.MaxZ + offset.Z;


            if (SimZMinLevel > MaxZ || SimZMaxLevel < MinZ)
            {
                // this box is not between the Z levels
                return;
            }

            // = SimPathStore.StepSize;
            for (float x = MinX; x <= MaxX; x += detail)
            {
                for (float y = MinY; y <= MaxY; y += detail)
                {
                    p(x, y, MinZ, MaxZ);
                }
            }
            /// the for/next loop probably missed this last point
            p(MaxX, MaxY, MinZ, MaxZ);
        }
示例#2
0
 public void SetOccupied(CallbackXY p, SimZMinMaxLevel MinMaxZ, float detail)
 {
     if (InnerBoxes.Count == 0)
     {
         CollisionPlane.Debug("using outerbox for " + this);
         OuterBox.SetOccupied(p, MinMaxZ, detail);
         return;
     }
     foreach (CollisionObject box in InnerBoxes)
     {
         box.SetOccupied(p, MinMaxZ, detail);
     }
 }
示例#3
0
 public void SetOccupied(CallbackXY p, SimZMinMaxLevel MinMaxZ, float detail)
 {
     if (InnerBoxes.Count == 0)
     {
         CollisionPlane.Debug("using outerbox for " + this);
         OuterBox.SetOccupied(p, MinMaxZ, detail);
         return;
     }
     foreach (CollisionObject box in InnerBoxes)
     {
         box.SetOccupied(p, MinMaxZ, detail);
     }
 }