daily update on 20230516 by nitload youmu, geometry interfaces created between cs and c
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user