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;
}
}
}