public void Dispose() { if (selectedTransportQuadtreeItem != null) { selectedTransportQuadtreeItem.Delete(); ShapeLib.ShapeType shapeType = selectedTransportQuadtreeItem.Parent.Type; if (shapeType == ShapeLib.ShapeType.MultiPoint) layerManager.TransportPointLayer.removePoint(selectedTransportQuadtreeItem.Parent); else if (shapeType == ShapeLib.ShapeType.PolyLine) layerManager.TransportPolylineLayer.removePolyline(selectedTransportQuadtreeItem.Parent); else if (shapeType == ShapeLib.ShapeType.PolyLine) layerManager.TransportPolygonLayer.removePolygon(selectedTransportQuadtreeItem.Parent); selectedTransportQuadtreeItem = null; } }
public void Dispose() { if (selectedTransportQuadtreeItem != null) { selectedTransportQuadtreeItem.Delete(); ShapeLib.ShapeType shapeType = selectedTransportQuadtreeItem.Parent.Type; if (shapeType == ShapeLib.ShapeType.MultiPoint) { layerManager.TransportPointLayer.removePoint(selectedTransportQuadtreeItem.Parent); } else if (shapeType == ShapeLib.ShapeType.PolyLine) { layerManager.TransportPolylineLayer.removePolyline(selectedTransportQuadtreeItem.Parent); } else if (shapeType == ShapeLib.ShapeType.PolyLine) { layerManager.TransportPolygonLayer.removePolygon(selectedTransportQuadtreeItem.Parent); } selectedTransportQuadtreeItem = null; } }
public NoPhysicsComponent(ObjectShell parent) : base(parent) { collisionObject = null; size = Vector2.Zero; }
public RemoveShapeAction(QuadTreePositionItem <IShape> item, LayerManager layerManager) { this.selectedTransportQuadtreeItem = item; this.layerManager = layerManager; }
public RemoveShapeAction(QuadTreePositionItem<IShape> item,LayerManager layerManager) { this.selectedTransportQuadtreeItem = item; this.layerManager = layerManager; }
public void closeTransportPolyline() { currentlyEditedIShape = null; selectedTransportQuadtreeItem = null; }
/// <summary> /// Creates a new polyline object in the appr. layer, adds it to the quadtree /// (despite the fact that is has only one point at the moment) and set the /// currentlyEditedIShape to this shape. /// </summary> /// <param name="x">The x offset of the new shape</param> /// <param name="y">The y offset of the new shape</param> public ShapeInformation addTransportPolyline(double x, double y) { //int width = 2 * transportPolylineLayer.BbWidthMargin // + config.ExPLineLayerPointWidth; //int height = 2 * transportPolylineLayer.BbHeightMargin // + config.ExPLineLayerPointWidth; currentlyEditedIShape = transportPolylineLayer.addPolyline(x, y, scale); selectedTransportQuadtreeItem = transportLayerQuadtree.Insert(currentlyEditedIShape, new Vector2(x * firstScale, y * firstScale), new Vector2(1, 1)); //new Vector2(width, height)); currentlyEditedIShape.Reference = selectedTransportQuadtreeItem; selectedTransportQuadtreeItem.reactOnZoom((4.0 * firstScale) / scale); ShapeInformation shpInfo; shpInfo.quadTreePosItemInf = selectedTransportQuadtreeItem; shpInfo.iShapeInf = currentlyEditedIShape; return shpInfo; }
public void setDrawShapeInformation(DrawShapeInformation drawEnum,ShapeInformation shpInfo,LayerType lType) { this.currentlyEditedIShape = shpInfo.iShapeInf; this.selectedTransportQuadtreeItem = shpInfo.quadTreePosItemInf; this.DrawInfChanged(drawEnum,lType); }
public void RemoveTransportComplexShape(ShapeInformation shpInfo,LayerType lType) { if (shpInfo.quadTreePosItemInf.Parent.Type == ShapeLib.ShapeType.PolyLine) transportPolylineLayer.removePolyline(shpInfo.quadTreePosItemInf.Parent); else if (shpInfo.quadTreePosItemInf.Parent.Type == ShapeLib.ShapeType.PolyLine) transportPolygonLayer.removePolygon(shpInfo.quadTreePosItemInf.Parent); shpInfo.quadTreePosItemInf.Delete(); this.setDrawShapeInformation(DrawShapeInformation.EditStopped, shpInfo, lType); selectedTransportQuadtreeItem = null; }