40 lines
1.4 KiB
C#
40 lines
1.4 KiB
C#
using StgSharp.Math;
|
|
using System;
|
|
|
|
namespace StgSharp.Geometries
|
|
{
|
|
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 -= bornTick;
|
|
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);
|
|
}
|
|
|
|
}
|
|
}
|