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,4 +1,34 @@
using StgSharp.Controlling;
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
// file="Polygon6.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 StgSharp.Math.Linear;
@@ -8,6 +38,7 @@ namespace StgSharp.Geometries
{
public class Polygon6 : PlainGeometry
{
internal Point _refOrigin;
internal GetLocationHandler movVertex0Operation;
internal GetLocationHandler movVertex1Operation;
@@ -17,61 +48,51 @@ namespace StgSharp.Geometries
internal GetLocationHandler movVertex5Operation;
internal mat6 vertexMat;
public GetLocationHandler MovVertex0Operation { get => movVertex0Operation; }
public GetLocationHandler MovVertex1Operation { get => movVertex1Operation; }
public GetLocationHandler MovVertex2Operation { get => movVertex2Operation; }
public GetLocationHandler MovVertex3Operation { get => movVertex3Operation; }
public GetLocationHandler MovVertex4Operation { get => movVertex4Operation; }
public GetLocationHandler MovVertex5Operation { get => movVertex5Operation; }
internal override int[] Indices
{
get
{
return new int[12] {
0,1,2,
0,2,3,
0,3,4,
0,4,5};
}
}
public GetLocationHandler MovVertex0Operation => movVertex0Operation;
public GetLocationHandler MovVertex1Operation => movVertex1Operation;
public GetLocationHandler MovVertex2Operation => movVertex2Operation;
public GetLocationHandler MovVertex3Operation => movVertex3Operation;
public GetLocationHandler MovVertex4Operation => movVertex4Operation;
public GetLocationHandler MovVertex5Operation => movVertex5Operation;
public Point Vertex0
{
get => new Point(vertexMat.vec0);
set { vertexMat.vec0 = value.position.vec; }
set => vertexMat.vec0 = value.position.vec;
}
public Point Vertex1
{
get => new Point(vertexMat.vec1);
set { vertexMat.vec1 = value.position.vec; }
set => vertexMat.vec1 = value.position.vec;
}
public Point Vertex2
{
get => new Point(vertexMat.vec2);
set { vertexMat.vec2 = value.position.vec; }
set => vertexMat.vec2 = value.position.vec;
}
public Point Vertex3
{
get => new Point(vertexMat.vec3);
set { vertexMat.vec3 = value.position.vec; }
set => vertexMat.vec3 = value.position.vec;
}
public Point Vertex4
{
get => new Point(vertexMat.vec4);
set { vertexMat.vec4 = value.position.vec; }
set => vertexMat.vec4 = value.position.vec;
}
public Point Vertex5
{
get => new Point(vertexMat.vec5);
set { vertexMat.vec5 = value.position.vec; }
set => vertexMat.vec5 = value.position.vec;
}
internal override int[] Indices => new int[12] { 0, 1, 2, 0, 2, 3, 0, 3, 4, 0, 4, 5 };
public override Line[] GetAllSides()
{
return new Line[6]
@@ -131,5 +152,6 @@ namespace StgSharp.Geometries
vertexMat.vec4 = origin + movVertex4(nowTick).vec;
vertexMat.vec5 = origin + movVertex5(nowTick).vec;
}
}
}