bool isInSegment(Points p, Points p2, Points p3, Util.eView view) { float delta = 10f; Points p0 = (Points)p2.Clone(); Points p1 = (Points)p3.Clone(); p0.X += centerPoint.X; p1.X += centerPoint.X; p0.Y += centerPoint.Y; p1.Y += centerPoint.Y; p0.Z += centerPoint.Z; p1.Z += centerPoint.Z; if (view == Util.eView.x) { return(_isInSegment(delta, p.Y, p.Z, p0.Y, p0.Z, p1.Y, p1.Z)); } if (view == Util.eView.y) { return(_isInSegment(delta, p.X, p.Z, p0.X, p0.Z, p1.X, p1.Z)); } if (view == Util.eView.z) { return(_isInSegment(delta, p.X, p.Y, p0.X, p0.Y, p1.X, p1.Y)); } return(false); }
public GpxTrack Clone() { GpxTrack info = MemberwiseClone() as GpxTrack; info.Points = Points.Clone() as GpxPointCollection; return(info); }
public XGraphicsPathItem Clone() { XGraphicsPathItem item = (XGraphicsPathItem)MemberwiseClone(); item.Points = (XPoint[])Points.Clone(); return(item); }
/// <summary> /// Get Transformed Points /// </summary> /// <param name="owner"></param> /// <returns></returns> public PointF[] GetTransformedPoints(Figure owner) { var points = (PointF[])Points.Clone(); owner.Transform.Matrix.TransformPoints(points); return(points); }
public override Object Clone() { Lines me = new Lines(); me.SegmentType = SegmentType; me.CloseFigure = CloseFigure; me.StartFigure = StartFigure; if (Points != null) { me.Points = (PointF[])Points.Clone(); me.PointIndex = PointIndex; } return(me); }
public DrawRecord Copy(int offsetStartX = 0, int offsetStartY = 0, int offsetEndX = 0, int offsetEndY = 0) { var temp = new DrawRecord { Shape = Shape, Color = Color, Width = Width, Points = Points.Clone() }; if (temp.Points.Count > 0) { temp.Points.First().Offset(offsetStartX, offsetStartY); } if (temp.Points.Count > 1) { temp.Points.Last().Offset(offsetEndX, offsetEndY); } return(temp); }
public object Clone() { var model = new Model { Blocks = Blocks.Clone(), Points = Points.Clone(), Order = Order.Clone(), Topology = Topology.Clone(), }; if (Distances != null) { var size = Distances.GetLength(0); model.Distances = new double[size][]; for (var i = 0; i < size; i++) { model.Distances[i] = Distances[i].Select(_ => _).ToArray(); } } return(model); }
public LineChartGenerator() { Points = Points.Clone(); ItemPoints = new ItemPointCollection(); }