daily update on 2024.03.18 by itload youmu

This commit is contained in:
YoumuLiu
2024-03-19 02:41:04 +08:00
parent 15bf989285
commit 0c50c6282e
200 changed files with 7663 additions and 3455 deletions
@@ -1,11 +1,43 @@
using StgSharp.Controlling;
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
// file="Polygon4.cs"
// Project: StgSharp
// AuthorGroup: Nitload Space
// Copyright (c) Nitload Space. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the “Software”), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software,
// and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and
// this permission notice shall be included in all copies
// or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED “AS IS”,
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
using StgSharp.Controlling;
using StgSharp.Math;
using System.Numerics;
namespace StgSharp.Geometries
{
public class Polygon4 : PlainGeometry
{
internal readonly GetLocationHandler moveVertex0Operation = new GetLocationHandler(GeometryOperation.DefualtMotion);
internal readonly GetLocationHandler moveVertex1Operation = new GetLocationHandler(GeometryOperation.DefualtMotion);
internal readonly GetLocationHandler moveVertex2Operation = new GetLocationHandler(GeometryOperation.DefualtMotion);
@@ -61,50 +93,39 @@ namespace StgSharp.Geometries
vertexMat.mat.colum3 = new Vector4(v3x, v3y, v3z, 0);
}
public GetLocationHandler MovVertex0Operaion { get { return moveVertex0Operation; } }
public GetLocationHandler MovVertex1Operaion { get { return moveVertex1Operation; } }
public GetLocationHandler MovVertex2Operaion { get { return moveVertex2Operation; } }
public GetLocationHandler MovVertex3Operaion { get { return moveVertex3Operation; } }
internal sealed override int[] Indices
{
get
{
return new int[6] {
0,1,2,
0,2,3};
}
}
public Mat4 VertexBuffer
{
get { return vertexMat.mat; }
}
public GetLocationHandler MovVertex0Operaion => moveVertex0Operation;
public GetLocationHandler MovVertex1Operaion => moveVertex1Operation;
public GetLocationHandler MovVertex2Operaion => moveVertex2Operation;
public GetLocationHandler MovVertex3Operaion => moveVertex3Operation;
public Point Vertex0
{
get => new Point(vertexMat.mat.colum0);
set { vertexMat.mat.colum0 = value.position.vec; }
set => vertexMat.mat.colum0 = value.position.vec;
}
public Point Vertex1
{
get => new Point(vertexMat.mat.colum1);
set { vertexMat.mat.colum1 = value.position.vec; }
set => vertexMat.mat.colum1 = value.position.vec;
}
public Point Vertex2
{
get => new Point(vertexMat.mat.colum2);
set { vertexMat.mat.colum1 = value.position.vec; }
set => vertexMat.mat.colum1 = value.position.vec;
}
public Mat4 VertexBuffer => vertexMat.mat;
internal override sealed int[] Indices => new int[6] { 0, 1, 2, 0, 2, 3 };
internal Point Vertex3
{
get => new Point(vertexMat.mat.colum3);
set { vertexMat.mat.colum1 = value.position.vec; }
set => vertexMat.mat.colum1 = value.position.vec;
}
@@ -131,21 +152,30 @@ namespace StgSharp.Geometries
}
public virtual vec3d MoveVertex0(uint tick)
=> moveVertex0Operation(tick);
{
return moveVertex0Operation(tick);
}
public virtual vec3d MoveVertex1(uint tick)
=> moveVertex1Operation(tick);
{
return moveVertex1Operation(tick);
}
public virtual vec3d MoveVertex2(uint tick)
=> moveVertex2Operation(tick);
{
return moveVertex2Operation(tick);
}
public virtual vec3d MoveVertex3(uint tick)
=> moveVertex3Operation(tick);
{
return moveVertex3Operation(tick);
}
internal override void UpdateCoordinate(uint tick)
{
}
}
}