daily update on 20230301 by nitload youmu, file struct cahnged and more vec func added

This commit is contained in:
Nitload
2023-03-02 01:30:46 +08:00
parent d09105c9c1
commit bb71567e51
594 changed files with 368 additions and 2601 deletions
+50
View File
@@ -0,0 +1,50 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace StgSharp
{
public class Circle : IGeometry
{
private StgSharp.ContainerNode<INode> _id;
internal Point _referencePoint;
internal float _vecX;
internal float _vecY;
public Point ReferencePoint
{
get { return _referencePoint; }
}
float IGeometry.ExpressionX => throw new NotImplementedException();
float IGeometry.ExpressionY => throw new NotImplementedException();
ContainerNode<INode> INode.ID
{
get { return _id; }
}
public float SetArrayX(Counter<uint> tickCounter)
{
throw new NotImplementedException();
}
public float SetArrayY(Counter<uint> tickCounter)
{
throw new NotImplementedException();
}
void INode.setID<T>(ContainerNode<T> id)
{
if (_id == default(ContainerNode<INode>))
{
_id = id as ContainerNode<INode>;
}
else
{
throw new ArgumentException();
}
}
}
}
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace StgSharp
{
public delegate float ExpressionHandler
(
Counter<uint> tickCounter,
float beginRange,
float endRange
);
}
@@ -0,0 +1,9 @@
using StgSharp;
using System;
using System.Collections.Generic;
using System.Text;
namespace StgSharp
{
public delegate float GetLocationHandler(Counter<uint> tickCounter);
}
@@ -0,0 +1,30 @@
using StgSharp;
using System;
using System.Collections.Generic;
using System.Text;
namespace StgSharp
{
public interface IGeometry:INode
{
public Point ReferencePoint
{
get;
}
internal float ExpressionX
{
get;
}
internal float ExpressionY
{
get;
}
public float SetArrayX(Counter<uint> tickCounter);
public float SetArrayY(Counter<uint> tickCounter);
}
}
+60
View File
@@ -0,0 +1,60 @@
using StgSharp;
using System;
using System.Collections.Generic;
using System.Text;
namespace StgSharp
{
public class Line:IGeometry
{
private ContainerNode<INode> _id;
internal Point _referencePoint;
internal float _vecX;
internal float _vecY;
public Point ReferencePoint
{
get { return _referencePoint; }
}
ContainerNode<INode> INode.ID
{
get { return _id; }
}
float IGeometry.ExpressionX => throw new NotImplementedException();
float IGeometry.ExpressionY => throw new NotImplementedException();
public Line( Point referencePoint, float vecX, float vecY)
{
_referencePoint = referencePoint;
_vecX = vecX;
_vecY = vecY;
}
public float SetArrayX(Counter<uint> tickCounter)
{
return 0.0f;
}
public float SetArrayY(Counter<uint> tickCounter)
{
return 0.0f;
}
void INode.setID<T>(ContainerNode<T> id)
{
if (id == null)
{
_id = id as ContainerNode<INode>;
}
else
{
throw new ArgumentNullException("Cannot set id teice!");
}
}
}
}
+55
View File
@@ -0,0 +1,55 @@
using GLFWDotNet;
using StgSharp;
using StgSharp.Math;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Security.Cryptography;
using System.Text;
namespace StgSharp
{
public class Point: INode
{
internal StgSharp.ContainerNode<INode> _id;
internal Vec2D _position;
internal GetLocationHandler getXHandler;
internal GetLocationHandler getYHandler;
ContainerNode<INode> INode.ID
{
get { return this._id; }
}
public float X
{
get { return this._position.X; }
}
public float Y
{
get { return this._position.Y; }
}
void INode.setID<T>(ContainerNode<T> id)
{
if (id == null)
{
_id = id as ContainerNode<INode>;
}
else
{
throw new ArgumentException("Cannot set id twice!");
}
}
public void OnRender()
{
this.getXHandler.Invoke(Control.TimeLine.tickCounter);
this.getYHandler.Invoke(Control.TimeLine.tickCounter);
}
}
}
+46
View File
@@ -0,0 +1,46 @@
using StgSharp;
using System;
using System.Collections.Generic;
using System.Text;
namespace StgSharp
{
public class Triangle
{
internal ContainerNode<INode> _id;
internal Point _referencePoint;
internal GetLocationHandler _setArrayXHandler;
internal GetLocationHandler _setArrayYHandler;
public Point ReferencePoint
{
get { return _referencePoint; }
}
public float VecX
{
get { return _referencePoint.X; }
}
public float VecY
{
get { return _referencePoint.Y; }
}
public float SetArrayX(Counter<uint> tickCounter)
{
return _setArrayXHandler.Invoke(tickCounter);
}
public float SetArrayY(Counter<uint> tickCounter)
{
return _setArrayYHandler.Invoke(tickCounter);
}
}
}