47 lines
1.6 KiB
C#
47 lines
1.6 KiB
C#
using StgSharp.Math;
|
|
using System;
|
|
|
|
namespace StgSharp.Geometries
|
|
{
|
|
/// <summary>
|
|
/// A collection of all point on the same plain and has the same distance to a point
|
|
/// </summary>
|
|
public class Circle : PlainGeometry
|
|
{
|
|
internal Point center;
|
|
internal Point pointOnCircle;
|
|
internal Point pointOnPlain;
|
|
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 UpdateRadius(uint tick) => movBeginOperation.Invoke(tick);
|
|
|
|
public virtual vec3d UpdatePlain(uint tick) => movEndOperation.Invoke(tick);
|
|
|
|
public override Plain GetPlain()
|
|
{
|
|
return new Plain(center, pointOnCircle, pointOnPlain);
|
|
}
|
|
|
|
|
|
internal override void UpdateCoordinate(uint tick)
|
|
{
|
|
tick = time;
|
|
center.Position = this.coordinate.origin + MoveCenter(tick);
|
|
pointOnCircle.Position = this.coordinate.origin + UpdateRadius(tick);
|
|
pointOnPlain.Position = this.coordinate.origin + UpdatePlain(tick);
|
|
}
|
|
|
|
public override Line[] GetAllSides()
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|