Exemple #1
0
 public Face(int x, int y, PBUtilities.Axis direction, Grid2d grid)
 {
     _grid     = grid;
     Index     = new Vector2dInt(x, y);
     Direction = direction;
     Center    = GetCenter();
 }
Exemple #2
0
        public SmartCell(Vector2d location, double _resolution, Grid2d grid)
        {
            _grid            = grid;
            this._resolution = _resolution;
            this.location    = location;
            int roundedX = (int)location.X;

            roundedX *= 5;
            int roundedY = (int)(location.Y);

            roundedY *= 5;

            //index = new Vector2d(Math.Round(roundedX / this._resolution * 5.0), Math.Round(roundedX / this._resolution * 5.0));

            index = new Vector2dInt((int)Math.Round(location.X / this._resolution), (int)Math.Round(location.Y / this._resolution));

            this.metric1      = 0.0;
            this.metric2      = 0.0;
            this.metric3      = 0.0;
            this.metric4      = 0.0;
            this.metric5      = 0.0;
            this.mspRaw       = 0.0;
            this.tempMetric   = 0.0;
            this.neighSize    = 0.0;
            this.neighSizeRaw = 0.0;
            this.covidMetric  = 0;
            Interval interval = new Interval(-this._resolution / 2.0, this._resolution / 2.0);
            Plane    plane    = new Plane(new Point3d(location.X, location.Y, 0), Vector3d.ZAxis);

            rect     = new Rectangle3d(plane, interval, interval);
            isActive = true;

            isovistIndeces    = new List <Vector2dInt>();
            rtreeIndices      = new List <Vector2dInt>();
            this.clusterRaw   = 0.0;
            this.clusterRemap = 0.0;
            isoPolyline       = new Polyline();
        }