daily update on 20230120 by nitload youmu, struct of project fixed, math lib created

This commit is contained in:
Nitload
2023-01-20 00:45:19 +08:00
parent e9116ca11b
commit c14b7ae7f8
50 changed files with 202 additions and 159 deletions
+19 -7
View File
@@ -1,14 +1,13 @@
using StgSharp.Control;
using StgSharp.Logic;
using StgSharp;
using System;
using System.Collections.Generic;
using System.Text;
namespace StgSharp.Geometries
namespace StgSharp
{
public class Line:IGeometrySimple
public class Line:IGeometry
{
private Logic.ContainerNode<INode> _id;
private ContainerNode<INode> _id;
internal Point _referencePoint;
internal float _vecX;
@@ -29,6 +28,10 @@ namespace StgSharp.Geometries
get { return _vecY; }
}
ContainerNode<INode> INode.ID
{
get { return _id; }
}
public Line( Point referencePoint, float vecX, float vecY)
{
@@ -45,8 +48,17 @@ namespace StgSharp.Geometries
{
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!");
}
}
}
}