using StgSharp.Math; using System; namespace StgSharp.Geometries { /// /// Part of a circle. All points on a arc has the same distance to their center. /// public class Arc : PlainGeometry { internal Point center; internal Point beginPoint; internal Point endPoint; internal GetLocationHandler movCenterOperation = new GetLocationHandler(GeometryOperation.DefualtMotion); internal GetLocationHandler movBeginOperation = new GetLocationHandler(GeometryOperation.DefualtMotion); internal GetLocationHandler movEndOperation = new GetLocationHandler(GeometryOperation.DefualtMotion); internal override int[] Indices => throw new NotImplementedException(); public virtual vec3d MoveCenter(uint tick) => movCenterOperation.Invoke(tick); public virtual vec3d MovBegin(uint tick) => movBeginOperation.Invoke(tick); public virtual vec3d MovEnd(uint tick) => movEndOperation.Invoke(tick); internal override void UpdateCoordinate(uint tick) { tick = time; center.Position = this.coordinate.origin + MoveCenter(tick); beginPoint.Position = this.coordinate.origin + MovBegin(tick); endPoint.Position = this.coordinate.origin + MovEnd(tick); } public override Line[] GetAllSides() => throw new NotImplementedException(); public override Plain GetPlain() { return new Plain(this.center, this.beginPoint, this.endPoint); } } }