daily update on 20230322 by nitload youmu, new geometry structure rewritten 70%

This commit is contained in:
Nitload
2023-03-22 20:32:17 +08:00
parent db2ca36fd7
commit eedab82f6e
66 changed files with 1382 additions and 785 deletions
+47 -22
View File
@@ -1,4 +1,5 @@
using System;
using StgSharp.Math;
using System;
using System.Collections.Generic;
using System.Text;
@@ -6,45 +7,69 @@ namespace StgSharp
{
public class Circle : IGeometry
{
private StgSharp.ContainerNode<INode> _id;
internal Point _referencePoint;
internal float _vecX;
internal float _vecY;
internal Point _baseCenter;
internal Point _center;
internal Point _radiusVec;
internal RenderMode _renderMode;
public Point ReferencePoint
public override Point BasePoint => _baseCenter;
public override Point RefPoint => _center;
public override Point RefVec01 => _radiusVec;
public override Point RefVec02 => default;
public override RenderMode renderMode => _renderMode;
internal override void CalcVec01(uint tick)
{
get { return _referencePoint; }
_center._position = _baseCenter._position + MoveCenter(tick);
}
float IGeometry.ExpressionX => throw new NotImplementedException();
float IGeometry.ExpressionY => throw new NotImplementedException();
ContainerNode<INode> INode.ID
internal override void CalcVec02(vec2d vec, uint tick)
{
get { return _id; }
_radiusVec._position = vec + UpdateRadius(tick);
}
public float SetArrayX(Counter<uint> tickCounter)
internal override void CalcVec03(vec2d vec, uint tick)
{
throw new NotImplementedException();
}
public float SetArrayY(Counter<uint> tickCounter)
public virtual vec2d MoveCenter(uint tick) => default;
public virtual vec2d UpdateRadius(uint tick) => default;
public override float SetArrayX()
{
throw new NotImplementedException();
}
void INode.setID<T>(ContainerNode<T> id)
public override float SetArrayY()
{
if (_id == default(ContainerNode<INode>))
throw new NotImplementedException();
}
internal override void OnRender(uint tick)
{
CalcVec01(tick);
switch (_renderMode)
{
_id = id as ContainerNode<INode>;
}
else
{
throw new ArgumentException();
case RenderMode.BasePoint:
CalcVec02(_baseCenter._position,tick);
CalcVec03(_baseCenter._position,tick);
break;
case RenderMode.RefPoint:
CalcVec02(_center._position, tick);
CalcVec03(_center._position, tick);
break;
default:
break;
}
}
}
}