daily update on 20230418 by nitload youmu.

rewrite of geometry is completed.
ready for release of ver0.1.0
This commit is contained in:
Nitload
2023-04-18 01:59:26 +08:00
parent a58537a003
commit 906becc265
35 changed files with 338 additions and 633 deletions
+32 -33
View File
@@ -1,6 +1,5 @@
using Steamworks;
using StgSharp.Control;
using StgSharp.Linear;
using StgSharp.Math;
using System;
using System.Collections.Generic;
@@ -17,77 +16,77 @@ namespace StgSharp.Geometries
internal Point vertex3;
internal Point vertex4;
internal Point vertex5;
internal RenderMode _renderMode;
internal readonly int _vertexCount;
public override Point RefOrigin => _refOrigin;
public override Point RefPoint01 => vertex1;
public override Point RefPoint02 => vertex2;
public override Point RefPoint03 => vertex3;
public override RenderMode renderMode => throw new NotImplementedException();
internal GetLocationHandler movP01Operation = default;
internal GetLocationHandler movP02Operation = default;
internal GetLocationHandler movP03Operation = default;
internal GetLocationHandler movP04Operation = default;
internal GetLocationHandler movP05Operation = default;
public GetLocationHandler MovP01Operation { get => movP01Operation; }
public GetLocationHandler MovP02Operation { get => movP02Operation; }
public GetLocationHandler MovP03Operation { get => movP03Operation; }
public GetLocationHandler MovP04Operation { get => movP04Operation; }
public GetLocationHandler MovP05Operation { get => movP05Operation; }
public virtual vec3d movPoint01(uint tick)
{
return movP01Operation.Invoke(GameTimeLine.tickCounter);
return movP01Operation.Invoke(GameTimeLine.tickCounter._value);
}
internal GetLocationHandler movP01Operation = default;
public GetLocationHandler MovP01Operation { get => movP01Operation ; }
public virtual vec3d movPoint02(uint tick)
{
return movP02Operation.Invoke(GameTimeLine.tickCounter);
return movP02Operation.Invoke(GameTimeLine.tickCounter._value);
}
internal GetLocationHandler movP02Operation = default;
public GetLocationHandler MovP02Operation { get => movP02Operation ; }
public virtual vec3d movPoint03(uint tick)
{
return movP03Operation.Invoke(GameTimeLine.tickCounter);
return movP03Operation.Invoke(GameTimeLine.tickCounter._value);
}
internal GetLocationHandler movP03Operation = default;
public GetLocationHandler MovP03Operation { get => movP03Operation; }
public virtual vec3d movPoint04(uint tick)
{
return movP04Operation.Invoke(GameTimeLine.tickCounter);
return movP04Operation.Invoke(GameTimeLine.tickCounter._value);
}
internal GetLocationHandler movP04Operation = default;
public GetLocationHandler MovP04Operation { get => movP04Operation; }
public virtual vec3d movPoint05(uint tick)
{
return movP05Operation.Invoke(GameTimeLine.tickCounter);
return movP05Operation.Invoke(GameTimeLine.tickCounter._value);
}
internal GetLocationHandler movP05Operation = default;
public GetLocationHandler MovP05Operation { get => movP05Operation; }
internal override void OnRender(uint tick)
{
}
public override float SetArrayX()
{
throw new NotImplementedException();
}
public override float SetArrayY()
{
throw new NotImplementedException();
uint nowTick = tick - BornTime;
vertex1._position = RefOrigin._position + movPoint01(nowTick);
vertex2._position = RefOrigin._position + movPoint02(nowTick);
vertex3._position = RefOrigin._position + movPoint03(nowTick);
vertex4._position = RefOrigin._position + movPoint04(nowTick);
vertex5._position = RefOrigin._position + movPoint05(nowTick);
}
public override Line[] GetAllSides()
{
throw new NotImplementedException();
return new Line[5]
{
new Line(vertex1,vertex2),
new Line(vertex2,vertex3),
new Line(vertex3,vertex4),
new Line(vertex4,vertex5),
new Line(vertex5,vertex1)
};
}
public override Plain GetPlain()
{
throw new NotImplementedException();
return new Plain(vertex1,vertex2,vertex3);
}
}
}