daily update on 20240610 by nitload youmu

This commit is contained in:
Nitload
2024-06-10 15:11:01 +08:00
parent c0093f7b5c
commit f6963b8e00
96 changed files with 2927 additions and 2290 deletions
@@ -42,33 +42,54 @@ namespace StgSharp.Geometries
public unsafe class Triangle : PlainGeometry
{
public Triangle()
public Triangle():base(PlainCoordinate.StandardPlainCoordination)
{
vertexMat = new vec4d[3];
}
public Triangle(
vec3d vertex01,
vec3d vertex02,
vec3d vertex03
)
Point vertex01,
Point vertex02,
Point vertex03
) : base(PlainCoordinate.StandardPlainCoordination)
{
this[0] = new vec4d( vertex01.vec);
this[1] = new vec4d( vertex02.vec);
this[2] = new vec4d( vertex03.vec);
this[0] = vertex01;
this[1] = vertex02;
this[2] = vertex03;
}
public Triangle(
float v0x, float v0y, float v0z,
float v1x, float v1y, float v1z,
float v2x, float v2y, float v2z
)
float v0x, float v0y,
float v1x, float v1y,
float v2x, float v2y
) : base(PlainCoordinate.StandardPlainCoordination)
{
this[0] = new vec4d(v0x, v0y, v0z, 0);
this[1] = new vec4d(v1x, v1y, v1z, 0);
this[2] = new vec4d(v2x, v2y, v2z, 0);
this[0] = new Point(v0x, v0y, 0);
this[1] = new Point(v1x, v1y, 0);
this[2] = new Point(v2x, v2y, 0);
}
public Triangle(PlainCoordinate coordination,
Point vertex01,
Point vertex02,
Point vertex03
) : base(coordination)
{
this[0] = vertex01;
this[1] = vertex02;
this[2] = vertex03;
}
public Triangle(PlainCoordinate coordination,
float v0x, float v0y,
float v1x, float v1y,
float v2x, float v2y
) : base(coordination)
{
this[0] = new Point(v0x, v0y, 0);
this[1] = new Point(v1x, v1y, 0);
this[2] = new Point(v2x, v2y, 0);
}
internal static int[] Indices = [ 0, 1, 2 ];
public override ReadOnlySpan<int> VertexIndices => Indices;