Files
stgsharp/源代码/StgSharp/Geometries/Point.cs
T

56 lines
1.2 KiB
C#

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<Point>
{
internal StgSharp.ContainerNode<Point> _id;
internal vec2d _position;
internal GetLocationHandler getXHandler;
internal GetLocationHandler getYHandler;
ContainerNode<Point> INode<Point>.ID
{
get { return this._id; }
}
public float X
{
get { return this._position.X; }
}
public float Y
{
get { return this._position.Y; }
}
void INode<Point>.setID<T>(ContainerNode<T> id)
{
if (id == null)
{
_id = id as ContainerNode<Point>;
}
else
{
throw new ArgumentException("Cannot set id twice!");
}
}
public void OnRender()
{
this.getXHandler.Invoke(Control.TimeLine.tickCounter);
this.getYHandler.Invoke(Control.TimeLine.tickCounter);
}
}
}