daily update on 20230111 by nitload youmu
This commit is contained in:
@@ -6,9 +6,9 @@ using System.Text;
|
||||
|
||||
namespace StgSharp.Geometries
|
||||
{
|
||||
public class Circle : IGeometry
|
||||
public class Circle : IGeometrySimple
|
||||
{
|
||||
private Logic.LinkedListNode<INode> _id;
|
||||
private Logic.ContainerNode<INode> _id;
|
||||
internal Point _referencePoint;
|
||||
internal float _vecX;
|
||||
internal float _vecY;
|
||||
@@ -18,20 +18,17 @@ namespace StgSharp.Geometries
|
||||
get { return _referencePoint; }
|
||||
}
|
||||
|
||||
public float vecX
|
||||
public float VecX
|
||||
{
|
||||
get { return _vecX; }
|
||||
}
|
||||
|
||||
public float vecY
|
||||
public float VecY
|
||||
{
|
||||
get { return _vecY; }
|
||||
}
|
||||
|
||||
public Logic.LinkedListNode<INode> ID
|
||||
{
|
||||
get { return _id; }
|
||||
}
|
||||
|
||||
|
||||
public float SetArrayX(Counter<uint> tickCounter)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp.Geometries
|
||||
{
|
||||
public interface IGeometryComplex
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
+7
-2
@@ -7,14 +7,19 @@ namespace StgSharp.Geometries
|
||||
{
|
||||
|
||||
|
||||
public interface IGeometry:INode
|
||||
public interface IGeometrySimple:INode
|
||||
{
|
||||
public Point ReferencePoint
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
public float vecX
|
||||
public float VecX
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
public float VecY
|
||||
{
|
||||
get;
|
||||
}
|
||||
@@ -6,9 +6,10 @@ using System.Text;
|
||||
|
||||
namespace StgSharp.Geometries
|
||||
{
|
||||
public class Line:IGeometry
|
||||
public class Line:IGeometrySimple
|
||||
{
|
||||
private Logic.LinkedListNode<INode> _id;
|
||||
private Logic.ContainerNode<INode> _id;
|
||||
|
||||
internal Point _referencePoint;
|
||||
internal float _vecX;
|
||||
internal float _vecY;
|
||||
@@ -18,20 +19,16 @@ namespace StgSharp.Geometries
|
||||
get { return _referencePoint; }
|
||||
}
|
||||
|
||||
public float vecX
|
||||
public float VecX
|
||||
{
|
||||
get { return _vecX; }
|
||||
}
|
||||
|
||||
internal float vecY
|
||||
public float VecY
|
||||
{
|
||||
get { return _vecY; }
|
||||
}
|
||||
|
||||
public Logic.LinkedListNode<INode> ID
|
||||
{
|
||||
get { return _id; }
|
||||
}
|
||||
|
||||
public Line( Point referencePoint, float vecX, float vecY)
|
||||
{
|
||||
@@ -48,7 +45,7 @@ namespace StgSharp.Geometries
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -5,10 +5,31 @@ using System.Text;
|
||||
|
||||
namespace StgSharp.Geometries
|
||||
{
|
||||
public class Rectangle
|
||||
{
|
||||
public class Rectangle:IGeometryComplex
|
||||
{
|
||||
|
||||
internal Point _vertex;
|
||||
|
||||
internal float _vecX1;
|
||||
internal float _vecX2;
|
||||
|
||||
internal float _vecY1;
|
||||
internal float _vecY2;
|
||||
|
||||
|
||||
public Rectangle( Line side1, Line side2 )
|
||||
{
|
||||
_vecX1 = side1.VecX;
|
||||
_vecX2 = side2.VecX;
|
||||
|
||||
_vecY1 = side1.VecY;
|
||||
_vecY2 = side2.VecY;
|
||||
|
||||
if (_vecX1 * _vecX2 + _vecY1 * _vecY2 !=0 )
|
||||
{
|
||||
throw new ArgumentException("Given lines cannot form a rectangle!");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,33 +5,35 @@ using System.Text;
|
||||
|
||||
namespace StgSharp.Geometries
|
||||
{
|
||||
public class Square:IGeometry
|
||||
public class Square:IGeometrySimple
|
||||
{
|
||||
private Logic.LinkedListNode<INode> _id;
|
||||
private readonly Logic.ContainerNode<INode> _id;
|
||||
internal Point _referrencePoint;
|
||||
public float _vecX;
|
||||
public float _vecY;
|
||||
|
||||
public Logic.LinkedListNode<INode> ID
|
||||
{
|
||||
get { return _id; }
|
||||
}
|
||||
|
||||
|
||||
public Point ReferencePoint
|
||||
{
|
||||
get { return _referrencePoint; }
|
||||
}
|
||||
|
||||
public float vecX
|
||||
public float VecX
|
||||
{
|
||||
get { return _vecX; }
|
||||
}
|
||||
|
||||
public float vecY
|
||||
public float VecY
|
||||
{
|
||||
get { return _vecY; }
|
||||
get
|
||||
{
|
||||
return _vecY;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public float SetArrayX(Counter<uint> tickCounter)
|
||||
{
|
||||
return 0.0f;
|
||||
@@ -41,5 +43,7 @@ namespace StgSharp.Geometries
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,15 +12,13 @@ namespace StgSharp.Geometries
|
||||
{
|
||||
public class Point: INode
|
||||
{
|
||||
private Logic.LinkedListNode<INode> _id;
|
||||
private Logic.ContainerNode<Point> _id;
|
||||
|
||||
internal float x;
|
||||
internal float y;
|
||||
internal float _x;
|
||||
internal float _y;
|
||||
|
||||
public Logic.LinkedListNode<INode> ID
|
||||
{
|
||||
get { return _id; }
|
||||
}
|
||||
public GetLocationHandler getXHandler;
|
||||
public GetLocationHandler getYHandler;
|
||||
|
||||
public float X
|
||||
{
|
||||
@@ -37,8 +35,6 @@ namespace StgSharp.Geometries
|
||||
}
|
||||
}
|
||||
|
||||
public GetLocationHandler getXHandler;
|
||||
public GetLocationHandler getYHandler;
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user