Daily update on 20230803 by nitload youmu, problem of parameter displacement solved, rewriting other linear math
This commit is contained in:
@@ -4,14 +4,14 @@ namespace StgSharp.Geometries
|
||||
{
|
||||
public unsafe class Plain
|
||||
{
|
||||
internal vec3d origin;
|
||||
internal vec3d vec1;
|
||||
internal vec3d vec2;
|
||||
internal Vec3d origin;
|
||||
internal Vec3d vec1;
|
||||
internal Vec3d vec2;
|
||||
|
||||
internal vec3d plainParameter;
|
||||
internal Vec3d plainParameter;
|
||||
internal readonly float d = -1;
|
||||
|
||||
public Plain(vec3d o, vec3d v1, vec3d v2)
|
||||
public Plain(Vec3d o, Vec3d v1, Vec3d v2)
|
||||
{
|
||||
this.origin = o;
|
||||
this.vec1 = v1 - v2 * (v1.Y / v2.Y); //计算平面在xz平面上的方向投影
|
||||
@@ -30,9 +30,9 @@ namespace StgSharp.Geometries
|
||||
|
||||
public Plain(Point p1, Point p2, Point p3)
|
||||
{
|
||||
vec3d origin = p1.Position;
|
||||
vec3d v1 = p2.Position - origin;
|
||||
vec3d v2 = p3.Position - origin;
|
||||
Vec3d origin = p1.Position;
|
||||
Vec3d v1 = p2.Position - origin;
|
||||
Vec3d v2 = p3.Position - origin;
|
||||
|
||||
|
||||
vec1 = v1 - v2 * (v1.Y / v2.Y); //计算平面在xz平面上的方向投影
|
||||
|
||||
Reference in New Issue
Block a user