daily update on 20240508 by nitload youmu, partical added

This commit is contained in:
YoumuLiu
2024-05-09 04:14:36 +08:00
parent fc19ab3298
commit 56459deec5
58 changed files with 1507 additions and 431 deletions
@@ -31,6 +31,8 @@
using StgSharp.Controlling;
using StgSharp.Math;
using System;
namespace StgSharp.Geometries
{
public class Parallelogram : Polygon4
@@ -38,8 +40,8 @@ namespace StgSharp.Geometries
internal Point center;
internal readonly GetLocationHandler movCenterOperation =
new GetLocationHandler(GeometryOperation.DefualtMotion);
internal readonly Func<int,vec3d> movCenterOperation =
new Func<int,vec3d>(GeometryOperation.DefaultMotion);
public Parallelogram(
float v0x, float v0y, float v0z,
@@ -54,17 +56,17 @@ namespace StgSharp.Geometries
)
{
if (
vertexMat.Colum0 + vertexMat.Colum2 !=
vertexMat.Colum1 + vertexMat.Colum3
vertexMat.colum0 + vertexMat.colum2 !=
vertexMat.colum1 + vertexMat.colum3
)
{
InternalIO.InternalWriteLog("Init of geometry item failed, because four vertices cannot form a rectangle.", LogType.Warning);
}
}
public GetLocationHandler MovCenterOperation => movCenterOperation;
public GetLocationHandler MovVertex01Operation => moveVertex0Operation;
public GetLocationHandler MovVertex02Operation => moveVertex1Operation;
public Func<int,vec3d> MovCenterOperation => movCenterOperation;
public Func<int,vec3d> MovVertex01Operation => moveVertex0Operation;
public Func<int,vec3d> MovVertex02Operation => moveVertex1Operation;
public virtual vec3d MovCenter(int tick)
{
@@ -72,22 +74,22 @@ namespace StgSharp.Geometries
}
/// <summary>
/// Move the third vertix. this is a useless method for Parallelograms.
/// Move the third vertex. this is a useless method for Parallelograms.
/// </summary>
/// <param name="tick">Current time tick</param>
/// <returns></returns>
/// <exception cref="UnusedVertexException">Geometry overdefined</exception>
/// <exception cref="UnusedVertexException">Geometry over defined</exception>
public override sealed vec3d MoveVertex2(int tick)
{
throw new UnusedVertexException();
}
/// <summary>
/// Move the third vertix. This method is useless for Parallelograms.
/// Move the third vertex. This method is useless for Parallelograms.
/// </summary>
/// <param name="tick">Current time tick</param>
/// <returns></returns>
/// <exception cref="UnusedVertexException">Geometry overdefined</exception>
/// <exception cref="UnusedVertexException">Geometry over defined</exception>
public override sealed vec3d MoveVertex3(int tick)
{
throw new UnusedVertexException();