daily update on 20230322 by nitload youmu, new geometry structure rewritten 70%
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
using StgSharp.Math;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp.Geometries
|
||||
{
|
||||
public class Rectangle : IGeometry
|
||||
{
|
||||
internal Point _basePoint;
|
||||
internal Point _center;
|
||||
internal Point _centerToCorner1;
|
||||
internal Point _centerToCorner2;
|
||||
internal GetLocationHandler _centerMov;
|
||||
internal GetLocationHandler _CTC1Handler;
|
||||
internal GetLocationHandler _CTC2Handler;
|
||||
|
||||
|
||||
Point IGeometry.BasePoint
|
||||
{
|
||||
get { return _basePoint; }
|
||||
}
|
||||
Point IGeometry.RefPoint
|
||||
{
|
||||
get { return _center; }
|
||||
}
|
||||
|
||||
Point IGeometry.RefVec01
|
||||
{
|
||||
get { return _centerToCorner1; }
|
||||
}
|
||||
|
||||
Point IGeometry.RefVec02
|
||||
{
|
||||
get { return _centerToCorner2; }
|
||||
}
|
||||
|
||||
|
||||
void IGeometry.OnRender()
|
||||
{
|
||||
|
||||
this._CTC2Handler.Invoke(_centerToCorner2._position, Control.TimeLine.tickCounter);
|
||||
}
|
||||
|
||||
float IGeometry.SetArrayX()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
float IGeometry.SetArrayY()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
void INode<IGeometry>.setID<T>(ContainerNode<T> id)
|
||||
{
|
||||
if (_id != default(ContainerNode<IGeometry>))
|
||||
{
|
||||
throw new ArgumentException();
|
||||
}
|
||||
else
|
||||
{
|
||||
_id = id as ContainerNode<IGeometry>;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user