daily update on 20240427 by nitload youmu

This commit is contained in:
YoumuLiu
2024-04-27 05:09:38 +08:00
parent dd6e8247bf
commit f83a130074
52 changed files with 1470 additions and 271 deletions
@@ -11,13 +11,19 @@ namespace StgSharp.Geometries
public abstract class ICoord
{
protected Matrix44 coordMat;
protected List<vec4d> pointBuffer;
public ICoord()
{
pointBuffer = new List<vec4d>();
}
public abstract Matrix44 GlobalCoordTransformation
{
get;
}
public abstract vec3d Center
public abstract vec3d Origin
{
get;
}
@@ -36,5 +42,18 @@ namespace StgSharp.Geometries
{
get;
}
public T BuildGeometry<T>(params vec4d[] defaultVertex) where T : IGeometry
{
T ret = Activator.CreateInstance<T>();
ret.GetVertexHandle(this, ret.VertexCount);
for (int i = 0; i < ret.VertexCount; i++)
{
ret[i] = defaultVertex[i];
}
return ret;
}
}
}
@@ -1,4 +1,6 @@
using System;
using StgSharp.Math;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -6,9 +8,18 @@ using System.Threading.Tasks;
namespace StgSharp.Geometries
{
public class StreamLocalCoordinate:ICoord
public class StreamLocalCoordinate : ICoord
{
public override Matrix44 GlobalCoordTransformation => throw new NotImplementedException();
public override vec3d Origin => Vec3d.Zero;
public override vec3d X_axis => coordMat.colum0.XYZ;
public override vec3d Y_axis => throw new NotImplementedException();
public override vec3d Z_axis => throw new NotImplementedException();
}
}