コード例 #1
0
        internal void BuildBBHierarchy()
        {
            List <ObjectWithBox> objectsWithBox = new List <ObjectWithBox>();

            foreach (DObject dObject in Entities)
            {
                dObject.BbNode = BuildBBHierarchyUnderDObject(dObject);
                objectsWithBox.Add(dObject);
            }

            BbNode = SpatialAlgorithm.CreateBBNodeOnGeometries(objectsWithBox);
        }
コード例 #2
0
ファイル: DGraph.cs プロジェクト: 0xbeecaffe/MSAGL
        static BBNode BuildBBHierarchyUnderDEdge(DEdge dEdge)
        {
            if (dEdge.DrawingEdge.GeometryObject == null ||
                dEdge.Edge.GeometryEdge.Curve == null)
            {
                return(null);
            }
            List <ObjectWithBox> geometries = Tessellator.TessellateCurve(dEdge,
                                                                          dEdge.MarkedForDragging
                                                                                                                                                                                                                                                                                         ? dEdge.RadiusOfPolylineCorner
                                                                                                                                                                                                                                                                                         : 0);

            return(SpatialAlgorithm.CreateBBNodeOnGeometries(geometries));
        }
コード例 #3
0
ファイル: DGraph.cs プロジェクト: 0xbeecaffe/MSAGL
        internal void BuildBBHierarchy()
        {
            var objectsWithBox = new List <ObjectWithBox>();

            foreach (DObject dObject in Entities)
            {
                dObject.BbNode = BuildBBHierarchyUnderDObject(dObject);
                if (dObject.BbNode == null)
                {
                    return;                     //the graph is not ready
                }
                objectsWithBox.Add(dObject);
            }

            BbNode = SpatialAlgorithm.CreateBBNodeOnGeometries(objectsWithBox);
        }
コード例 #4
0
 static internal BBNode CreateBBNodeOnGeometries(List<ObjectWithBox> geoms){
     SpatialAlgorithm sa=new SpatialAlgorithm(geoms);
     return sa.CalcHierachy();
 }
コード例 #5
0
        static internal BBNode CreateBBNodeOnGeometries(List <ObjectWithBox> geoms)
        {
            SpatialAlgorithm sa = new SpatialAlgorithm(geoms);

            return(sa.CalcHierachy());
        }