daily update on 20230529 by nitload youmu

This commit is contained in:
Nitload
2023-05-29 04:36:01 +08:00
parent 9ca4a69a2a
commit 1874b32fb0
62 changed files with 1142 additions and 1250 deletions
@@ -13,18 +13,31 @@ namespace StgSharp.Geometries
public unsafe class Point : INode<Point>, INullable
{
internal vec3d* positionPtr;
internal readonly bool isVertex;
internal Point(vec3d* ptr)
{
positionPtr = ptr;
}
public Point()
{
IntPtr ptr = Marshal.AllocHGlobal(sizeof(vec3d));
positionPtr = (vec3d*)ptr.ToPointer();
}
public vec3d Position
{
get { return *positionPtr; }
set { *positionPtr = value; }
}
public vec3d* PositionPtr
{
get { return positionPtr; }
set { positionPtr = value; }
}
public float X
{
get { return (*this.positionPtr).X; }
@@ -43,7 +56,6 @@ namespace StgSharp.Geometries
set { (*this.positionPtr).Z = value; }
}
internal readonly bool isVertex;
public bool IsVertex => isVertex;