daily update on 20230516 by nitload youmu, geometry interfaces created between cs and c

This commit is contained in:
Nitload
2023-05-17 02:14:23 +08:00
parent dd891f7319
commit 3532f09fed
83 changed files with 1431 additions and 1220 deletions
@@ -3,25 +3,43 @@ using StgSharp.Math;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Security.Cryptography;
using System.Runtime.InteropServices;
using System.Text;
namespace StgSharp.Geometries
{
public class Point : INode<Point>
public unsafe class Point : INode<Point>
{
internal vec3d* postionPtr;
internal vec3d _position;
internal Point(vec3d* ptr)
{
postionPtr = ptr;
}
public vec3d Position
{
get { return (*this.postionPtr); }
set { (*this.postionPtr) = value; }
}
public float X
{
get { return this._position.X; }
get { return (*this.postionPtr).X; }
set { (*this.postionPtr).X = value; }
}
public float Y
{
get { return this._position.Y; }
get { return (*this.postionPtr).Y; }
set { (*this.postionPtr).Y = value; }
}
public float Z
{
get { return (*this.postionPtr).Z; }
set { (*this.postionPtr).Z = value; }
}
internal readonly bool isVertex;
@@ -43,8 +61,10 @@ namespace StgSharp.Geometries
public bool IsOnPlain(IPlainGeometry geo)
{
return this._position * geo.GetPlain().plainParameter == 1;
return (*this.postionPtr) * geo.GetPlain().plainParameter == 1;
}
}
}