daily update on 20230927 by nitload youmu, all polygon4 display available, optimizing on C/C# interoperation
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using StgSharp.Math;
|
||||
using System.Numerics;
|
||||
|
||||
namespace StgSharp.Geometries
|
||||
{
|
||||
@@ -6,11 +7,24 @@ namespace StgSharp.Geometries
|
||||
{
|
||||
internal Point center;
|
||||
|
||||
public sealed override Point RefPoint01 => center;
|
||||
public sealed override Point RefPoint0 => center;
|
||||
|
||||
public sealed override Point RefPoint02 => vertex01;
|
||||
public sealed override Point RefPoint1 => new Point(vertexMat.transpose.colum0);
|
||||
|
||||
public sealed override Point RefPoint03 => vertex02;
|
||||
public sealed override Point RefPoint2 => new Point(vertexMat.transpose.colum1);
|
||||
|
||||
public Rectangle(
|
||||
float v0x, float v0y, float v0z,
|
||||
float v1x, float v1y, float v1z,
|
||||
float v2x, float v2y, float v2z,
|
||||
float v3x, float v3y, float v3z
|
||||
)
|
||||
{
|
||||
vertexMat.mat.colum0 = new Vector4(v0x, v0y, v0z, 0);
|
||||
vertexMat.mat.colum1 = new Vector4(v1x, v1y, v1z, 0);
|
||||
vertexMat.mat.colum2 = new Vector4(v2x, v2y, v2z, 0);
|
||||
vertexMat.mat.colum3 = new Vector4(v3x, v3y, v3z, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -21,14 +35,16 @@ namespace StgSharp.Geometries
|
||||
/// <returns></returns>
|
||||
public virtual Vec3d MovCenter(uint tick) => default(Vec3d);
|
||||
|
||||
public sealed override Vec3d MovVertex03(uint tick)
|
||||
public sealed override Vec3d MoveVertex2(uint tick)
|
||||
{
|
||||
return this.center.Position * 2 - this.vertex01.Position;
|
||||
return
|
||||
new Vec3d(this.center.position.vec * 2 - vertexMat.mat.colum0);
|
||||
}
|
||||
|
||||
public sealed override Vec3d MovVertex04(uint tick)
|
||||
public sealed override Vec3d MoveVertex3(uint tick)
|
||||
{
|
||||
return this.center.Position * 2 - this.vertex02.Position;
|
||||
return
|
||||
new Vec3d(this.center.position.vec * 2 - vertexMat.mat.colum1);
|
||||
}
|
||||
|
||||
internal sealed override void OnRender(uint tick)
|
||||
|
||||
Reference in New Issue
Block a user