Example #1
0
        /// <summary>
        /// Overrides <see cref="CADability.GeoObject.IGeoObjectImpl.GetQuadTreeItem (Projection, ExtentPrecision)"/>
        /// </summary>
        /// <param name="projection"></param>
        /// <param name="extentPrecision"></param>
        /// <returns></returns>
        public override IQuadTreeInsertableZ GetQuadTreeItem(Projection projection, ExtentPrecision extentPrecision)
        {
            Block blk = Flattened;
            QuadTreeCollection res = blk.GetQuadTreeItem(projection, extentPrecision) as QuadTreeCollection;

            res.SetOwner(this);
            return(res);
        }
Example #2
0
 /// <summary>
 /// Overrides <see cref="CADability.GeoObject.IGeoObjectImpl.GetExtent (Projection, ExtentPrecision)"/>
 /// </summary>
 /// <param name="projection"></param>
 /// <param name="extentPrecision"></param>
 /// <returns></returns>
 public override BoundingRect GetExtent(Projection projection, ExtentPrecision extentPrecision)
 {
     if (compoundShape == null)
     {
         return(BoundingRect.EmptyBoundingRect);
     }
     return(compoundShape.Project(this.plane, projection.ProjectionPlane).GetExtent());
 }
Example #3
0
        /// <summary>
        /// Overrides <see cref="CADability.GeoObject.IGeoObjectImpl.GetQuadTreeItem (Projection, ExtentPrecision)"/>
        /// </summary>
        /// <param name="projection"></param>
        /// <param name="extentPrecision"></param>
        /// <returns></returns>
        public override IQuadTreeInsertableZ GetQuadTreeItem(Projection projection, ExtentPrecision extentPrecision)
        {
            QuadTreeCollection res = new QuadTreeCollection(this, projection);

            lock (this)
            {
                for (int i = 0; i < containedObjects.Count; ++i)
                {
                    res.Add(containedObjects[i].GetQuadTreeItem(projection, extentPrecision));
                }
            }
            return(res);
        }
Example #4
0
        /// <summary>
        /// Overrides <see cref="CADability.GeoObject.IGeoObjectImpl.GetExtent (Projection, ExtentPrecision)"/>
        /// </summary>
        /// <param name="projection"></param>
        /// <param name="extentPrecision"></param>
        /// <returns></returns>
        public override BoundingRect GetExtent(Projection projection, ExtentPrecision extentPrecision)
        {
            BoundingRect res = BoundingRect.EmptyBoundingRect;

            // lock (this) kann sich containedObjects währenddessen ändern???
            {
                foreach (IGeoObject go in containedObjects)
                {
                    res.MinMax(go.GetExtent(projection, extentPrecision));
                }
            }
            return(res);
        }
Example #5
0
        /// <summary>
        /// Overrides <see cref="CADability.GeoObject.IGeoObjectImpl.GetExtent (Projection, ExtentPrecision)"/>
        /// </summary>
        /// <param name="projection"></param>
        /// <param name="extentPrecision"></param>
        /// <returns></returns>
        public override BoundingRect GetExtent(Projection projection, ExtentPrecision extentPrecision)
        {
            BoundingRect res = new BoundingRect(projection.Project(location));

            return(res);
        }
Example #6
0
 /// <summary>
 /// Overrides <see cref="CADability.GeoObject.IGeoObjectImpl.GetQuadTreeItem (Projection, ExtentPrecision)"/>
 /// </summary>
 /// <param name="projection"></param>
 /// <param name="extentPrecision"></param>
 /// <returns></returns>
 public override IQuadTreeInsertableZ GetQuadTreeItem(Projection projection, ExtentPrecision extentPrecision)
 {
     return(null);
 }
Example #7
0
        /// <summary>
        /// Overrides <see cref="CADability.GeoObject.IGeoObjectImpl.GetExtent (Projection, ExtentPrecision)"/>
        /// </summary>
        /// <param name="projection"></param>
        /// <param name="extentPrecision"></param>
        /// <returns></returns>
        public override BoundingRect GetExtent(Projection projection, ExtentPrecision extentPrecision)
        {
            BoundingRect res = new BoundingRect(projection.ProjectUnscaled(location), projection.ProjectUnscaled(location + directionWidth), projection.ProjectUnscaled(location + directionHeight), projection.ProjectUnscaled(location + directionWidth + directionHeight));

            return(res);
        }
Example #8
0
 /// <summary>
 /// Overrides <see cref="CADability.GeoObject.IGeoObjectImpl.GetQuadTreeItem (Projection, ExtentPrecision)"/>
 /// </summary>
 /// <param name="projection"></param>
 /// <param name="extentPrecision"></param>
 /// <returns></returns>
 public override IQuadTreeInsertableZ GetQuadTreeItem(Projection projection, ExtentPrecision extentPrecision)
 {
     ConditionalRecalc();
     return(base.GetQuadTreeItem(projection, extentPrecision));
 }
Example #9
0
 public override BoundingRect GetExtent(Projection projection, ExtentPrecision extentPrecision)
 {
     return(new BoundingRect(projection.ProjectUnscaled(location)));
 }
Example #10
0
 /// <summary>
 /// Overrides <see cref="CADability.GeoObject.IGeoObjectImpl.GetQuadTreeItem (Projection, ExtentPrecision)"/>
 /// </summary>
 /// <param name="projection"></param>
 /// <param name="extentPrecision"></param>
 /// <returns></returns>
 public override IQuadTreeInsertableZ GetQuadTreeItem(Projection projection, ExtentPrecision extentPrecision)
 {
     return(new QuadTreePoint(this, projection));
 }
Example #11
0
 /// <summary>
 /// Overrides <see cref="CADability.GeoObject.IGeoObjectImpl.GetExtent (Projection, ExtentPrecision)"/>
 /// </summary>
 /// <param name="projection"></param>
 /// <param name="extentPrecision"></param>
 /// <returns></returns>
 public override BoundingRect GetExtent(Projection projection, ExtentPrecision extentPrecision)
 {
     return(new BoundingRect(projection.ProjectUnscaled(startPoint), projection.ProjectUnscaled(endPoint)));
 }
Example #12
0
 /// <summary>
 /// Overrides <see cref="CADability.GeoObject.IGeoObjectImpl.GetQuadTreeItem (Projection, ExtentPrecision)"/>
 /// </summary>
 /// <param name="projection"></param>
 /// <param name="extentPrecision"></param>
 /// <returns></returns>
 public override IQuadTreeInsertableZ GetQuadTreeItem(Projection projection, ExtentPrecision extentPrecision)
 {
     return(new QuadTreeLine(this, startPoint, endPoint, projection));
 }
Example #13
0
 /// <summary>
 /// Overrides <see cref="CADability.GeoObject.IGeoObjectImpl.GetExtent (Projection, ExtentPrecision)"/>
 /// </summary>
 /// <param name="projection"></param>
 /// <param name="extentPrecision"></param>
 /// <returns></returns>
 public override BoundingRect GetExtent(Projection projection, ExtentPrecision extentPrecision)
 {
     return(Flattened.GetExtent(projection, extentPrecision));
 }