Renamed Joi to JointPoint

This commit is contained in:
2026-06-13 21:20:32 +02:00
parent 035588e3db
commit d193583f37
10 changed files with 51 additions and 50 deletions

View File

@@ -305,7 +305,7 @@ namespace _2DGAMELIB
foreach (ShapePart p0 in array2)
{
Vector2D p = p0.Position;
if (array.All((ShapePart p1) => p0 == p1 || p1.JP.All((Joi j) => !(p1.ToGlobal(j.Joint).DistanceSquared(p) <= Join.IdentityDistance))))
if (array.All((ShapePart p1) => p0 == p1 || p1.JP.All((JointPoint j) => !(p1.ToGlobal(j.Joint).DistanceSquared(p) <= Join.IdentityDistance))))
{
return p0;
}

View File

@@ -14,7 +14,7 @@ namespace _2DGAMELIB
int num = 0;
List<int> list = new List<int>();
List<ShapePart> list2 = EnumPar.ToList();
foreach (Joi item in JoinRoot.JP)
foreach (JointPoint item in JoinRoot.JP)
{
Vector2D v = JoinRoot.ToGlobal(item.Joint);
int num2 = 0;
@@ -59,7 +59,7 @@ namespace _2DGAMELIB
{
ShapePart shapePart = js.Joins[i].Par1;
int num3 = 0;
foreach (Joi item in shapePart.JP)
foreach (JointPoint item in shapePart.JP)
{
Vector2D v = shapePart.ToGlobal(item.Joint);
int num4 = 0;
@@ -108,7 +108,7 @@ namespace _2DGAMELIB
if (JoinRoot != item2)
{
int num2 = 0;
foreach (Joi item3 in item.JP)
foreach (JointPoint item3 in item.JP)
{
Vector2D v = item.ToGlobal(item3.Joint);
foreach (ShapePart item4 in item2.EnumJoinRoot)
@@ -160,7 +160,7 @@ namespace _2DGAMELIB
if (difs != item2)
{
int num4 = 0;
foreach (Joi item3 in item.JP)
foreach (JointPoint item3 in item.JP)
{
Vector2D v = item.ToGlobal(item3.Joint);
foreach (ShapePart item4 in item2.EnumJoinRoot)

View File

@@ -6,16 +6,16 @@ namespace _2DGAMELIB
//its the position of a joint
[Serializable]
public class Joi
public class JointPoint
{
public Vector2D Joint = DataConsts.Vec2DZero;
public Joi(Joi Joi)
public JointPoint(JointPoint JointPoint)
{
Joint = Joi.Joint;
Joint = JointPoint.Joint;
}
public Joi(Vector2D Joint)
public JointPoint(Vector2D Joint)
{
this.Joint = Joint;
}

View File

@@ -228,7 +228,7 @@ namespace _2DGAMELIB
if (difs.EnumJoinRoot.All(delegate(ShapePart p0)
{
p = p0.Position;
return pa.All((ShapePart p1) => p0 == p1 || p1.JP.All((Joi j) => !(p1.ToGlobal(j.Joint).DistanceSquared(p) <= Join.IdentityDistance)));
return pa.All((ShapePart p1) => p0 == p1 || p1.JP.All((JointPoint j) => !(p1.ToGlobal(j.Joint).DistanceSquared(p) <= Join.IdentityDistance)));
}))
{
return difs;

View File

@@ -18,7 +18,8 @@ namespace _2DGAMELIB
.Add("_2DGAMELIB.Par", typeof(ShapePart))
.Add("_2DGAMELIB.ParT", typeof(ShapePartT))
.Add("_2DGAMELIB.Pars", typeof(PartGroup))
.Add("_2DGAMELIB.Out", typeof(CurveOutline));
.Add("_2DGAMELIB.Out", typeof(CurveOutline))
.Add("_2DGAMELIB.Joi", typeof(JointPoint));
private static BinaryFormatter NewFormatter()
{

View File

@@ -31,7 +31,7 @@ namespace _2DGAMELIB
protected List<CurveOutline> op = new List<CurveOutline>();
protected List<Joi> jp = new List<Joi>();
protected List<JointPoint> jp = new List<JointPoint>();
protected Vector2D basePointBase = DataConsts.Vec2DZero;
@@ -176,7 +176,7 @@ namespace _2DGAMELIB
}
}
public List<Joi> JP
public List<JointPoint> JP
{
get
{
@@ -188,7 +188,7 @@ namespace _2DGAMELIB
}
}
public IEnumerable<Joi> InitializeJP
public IEnumerable<JointPoint> InitializeJP
{
set
{
@@ -588,10 +588,10 @@ namespace _2DGAMELIB
{
op.Add(new CurveOutline(ShapePart.op[i]));
}
jp = new List<Joi>(ShapePart.jp.Count);
jp = new List<JointPoint>(ShapePart.jp.Count);
for (int j = 0; j < ShapePart.jp.Count; j++)
{
jp.Add(new Joi(ShapePart.jp[j]));
jp.Add(new JointPoint(ShapePart.jp[j]));
}
basePointBase = ShapePart.basePointBase;
basePointCont = ShapePart.basePointCont;

View File

@@ -69,11 +69,11 @@ namespace _2DGAMELIB
return vec2DZero / num;
}
public static Vector2D GetCenter(this IEnumerable<Joi> Joi)
public static Vector2D GetCenter(this IEnumerable<JointPoint> Joi)
{
double num = 0.0;
Vector2D vec2DZero = DataConsts.Vec2DZero;
foreach (Joi item in Joi)
foreach (JointPoint item in Joi)
{
vec2DZero += item.Joint;
num += 1.0;
@@ -200,60 +200,60 @@ namespace _2DGAMELIB
}
}
public static void ScalingX(this IEnumerable<Joi> Joi, Vector2D BP, double Rate)
public static void ScalingX(this IEnumerable<JointPoint> Joi, Vector2D BP, double Rate)
{
double num = BP.X - BP.X * Rate;
foreach (Joi item in Joi)
foreach (JointPoint item in Joi)
{
item.Joint.X = item.Joint.X * Rate + num;
}
}
public static void ScalingX(this IEnumerable<Joi> Joi, ref Vector2D BP, double Rate)
public static void ScalingX(this IEnumerable<JointPoint> Joi, ref Vector2D BP, double Rate)
{
double num = BP.X - BP.X * Rate;
foreach (Joi item in Joi)
foreach (JointPoint item in Joi)
{
item.Joint.X = item.Joint.X * Rate + num;
}
}
public static void ScalingY(this IEnumerable<Joi> Joi, Vector2D BP, double Rate)
public static void ScalingY(this IEnumerable<JointPoint> Joi, Vector2D BP, double Rate)
{
double num = BP.Y - BP.Y * Rate;
foreach (Joi item in Joi)
foreach (JointPoint item in Joi)
{
item.Joint.Y = item.Joint.Y * Rate + num;
}
}
public static void ScalingY(this IEnumerable<Joi> Joi, ref Vector2D BP, double Rate)
public static void ScalingY(this IEnumerable<JointPoint> Joi, ref Vector2D BP, double Rate)
{
double num = BP.Y - BP.Y * Rate;
foreach (Joi item in Joi)
foreach (JointPoint item in Joi)
{
item.Joint.Y = item.Joint.Y * Rate + num;
}
}
public static void ScalingXY(this IEnumerable<Joi> Joi, Vector2D BP, double Rate)
public static void ScalingXY(this IEnumerable<JointPoint> Joi, Vector2D BP, double Rate)
{
Vector2D vector2D = default(Vector2D);
vector2D.X = BP.X - BP.X * Rate;
vector2D.Y = BP.Y - BP.Y * Rate;
foreach (Joi item in Joi)
foreach (JointPoint item in Joi)
{
item.Joint.X = item.Joint.X * Rate + vector2D.X;
item.Joint.Y = item.Joint.Y * Rate + vector2D.Y;
}
}
public static void ScalingXY(this IEnumerable<Joi> Joi, ref Vector2D BP, double Rate)
public static void ScalingXY(this IEnumerable<JointPoint> Joi, ref Vector2D BP, double Rate)
{
Vector2D vector2D = default(Vector2D);
vector2D.X = BP.X - BP.X * Rate;
vector2D.Y = BP.Y - BP.Y * Rate;
foreach (Joi item in Joi)
foreach (JointPoint item in Joi)
{
item.Joint.X = item.Joint.X * Rate + vector2D.X;
item.Joint.Y = item.Joint.Y * Rate + vector2D.Y;
@@ -308,19 +308,19 @@ namespace _2DGAMELIB
Out.Reverse();
}
public static void ReverseX(this List<Joi> Joi, ref Vector2D BP)
public static void ReverseX(this List<JointPoint> Joi, ref Vector2D BP)
{
double num = BP.X - (1.0 - BP.X);
foreach (Joi item in Joi)
foreach (JointPoint item in Joi)
{
item.Joint.X = 1.0 - item.Joint.X + num;
}
}
public static void ReverseY(this List<Joi> Joi, ref Vector2D BP)
public static void ReverseY(this List<JointPoint> Joi, ref Vector2D BP)
{
double num = BP.Y - (1.0 - BP.Y);
foreach (Joi item in Joi)
foreach (JointPoint item in Joi)
{
item.Joint.Y = 1.0 - item.Joint.Y + num;
}
@@ -400,9 +400,9 @@ namespace _2DGAMELIB
}
}
public static void ExpansionX(this List<Joi> Joi, ref Vector2D BP, double Rate)
public static void ExpansionX(this List<JointPoint> Joi, ref Vector2D BP, double Rate)
{
foreach (Joi item in Joi)
foreach (JointPoint item in Joi)
{
Vector2D vector2D = (item.Joint - BP).newNormalize();
vector2D.Y = 0.0;
@@ -410,9 +410,9 @@ namespace _2DGAMELIB
}
}
public static void ExpansionY(this List<Joi> Joi, ref Vector2D BP, double Rate)
public static void ExpansionY(this List<JointPoint> Joi, ref Vector2D BP, double Rate)
{
foreach (Joi item in Joi)
foreach (JointPoint item in Joi)
{
Vector2D vector2D = (item.Joint - BP).newNormalize();
vector2D.X = 0.0;
@@ -420,17 +420,17 @@ namespace _2DGAMELIB
}
}
public static void ExpansionXY(this List<Joi> Joi, Vector2D BP, double Rate)
public static void ExpansionXY(this List<JointPoint> Joi, Vector2D BP, double Rate)
{
foreach (Joi item in Joi)
foreach (JointPoint item in Joi)
{
item.Joint += (item.Joint - BP).newNormalize() * Rate;
}
}
public static void ExpansionXY(this List<Joi> Joi, ref Vector2D BP, double Rate)
public static void ExpansionXY(this List<JointPoint> Joi, ref Vector2D BP, double Rate)
{
foreach (Joi item in Joi)
foreach (JointPoint item in Joi)
{
item.Joint += (item.Joint - BP).newNormalize() * Rate;
}

View File

@@ -161,7 +161,7 @@ namespace SlaveMatrix
MaiB.Closed = true;
MaiB.BrushColor = Color.FromArgb(160, Col.Black);
MaiB.Hit = false;
MaiB.JP.Add(new Joi(MaiB.OP.GetCenter()));
MaiB.JP.Add(new JointPoint(MaiB.OP.GetCenter()));
Mai = new Tex("Tex1", vector2D, num2, num3 * 0.98, num4 * 0.91, new Font("MS Gothic", 1f), 0.08, 0, " ", Col.White, Col.Black, Color.Transparent, 19.0, Col.White, delegate(Tex sp)
{
sp.Text = sp.Text;
@@ -180,7 +180,7 @@ namespace SlaveMatrix
Mai2B.Closed = true;
Mai2B.BrushColor = Color.FromArgb(160, Col.Black);
Mai2B.Hit = false;
Mai2B.JP.Add(new Joi(Mai2B.OP.GetCenter()));
Mai2B.JP.Add(new JointPoint(Mai2B.OP.GetCenter()));
Mai2 = new Tex("Tex3", vector2D, num2, num3 * 0.98, num5 * 0.97, new Font("MS Gothic", 1f), 0.08, 0, " ", Col.White, Col.Black, Color.Transparent, 19.0, Col.White, delegate(Tex sp)
{
sp.Text = sp.Text;
@@ -200,7 +200,7 @@ namespace SlaveMatrix
SubB.Closed = true;
SubB.BrushColor = Color.FromArgb(160, Col.Black);
SubB.Hit = false;
SubB.JP.Add(new Joi(SubB.OP.GetCenter()));
SubB.JP.Add(new JointPoint(SubB.OP.GetCenter()));
Sub = new Tex("Tex4", vector2D, num2 * 1.01, num3 * 0.98, num4 * 0.91, new Font("MS Gothic", 1f), 0.07, 0, " ", Col.White, Col.Black, Color.Transparent, 15.0);
Sub.ShapePartT.BasePointBase = Sub.ShapePartT.OP.GetCenter().MulY(y);
Sub.Position = SubB.ToGlobal(SubB.JP[0].Joint);
@@ -216,7 +216,7 @@ namespace SlaveMatrix
Sub2B.Closed = true;
Sub2B.BrushColor = Color.FromArgb(160, Col.Black);
Sub2B.Hit = false;
Sub2B.JP.Add(new Joi(SubB.OP.GetCenter()));
Sub2B.JP.Add(new JointPoint(SubB.OP.GetCenter()));
Sub2 = new Tex("Tex3", Sub2B.PositionBase, num2 * 1.01, num3 * 0.98, num4 * 0.91, new Font("MS Gothic", 1f), 0.07, 0, "", Col.White, Col.Black, Color.Transparent, 15.0);
Sub2.ShapePartT.BasePointBase = Sub2.ShapePartT.OP.GetCenter().MulY(y);
Sub2.Position = Sub2B.ToGlobal(Sub2B.JP[0].Joint);

View File

@@ -306,7 +306,7 @@ namespace SlaveMatrix
num++;
}
}
shapePart.JP[0] = new Joi(vec2DZero / num);
shapePart.JP[0] = new JointPoint(vec2DZero / num);
P();
B = (shapePart.GetArea() / X0Y0_鎖1.GetArea()).Sqrt() * 1.2;
}

View File

@@ -5265,9 +5265,9 @@ namespace SlaveMatrix
}
if (IsSingleEye)
{
.X0Y0_Head.JP[7] = new Joi(.X0Y0_Head.JP[7].Joint.MulY(0.96));
.X0Y0_Head.JP[17] = new Joi(.X0Y0_Head.JP[17].Joint.MulY(0.96));
.X0Y0_Head.JP[18] = new Joi(.X0Y0_Head.JP[18].Joint.MulY(0.96));
.X0Y0_Head.JP[7] = new JointPoint(.X0Y0_Head.JP[7].Joint.MulY(0.96));
.X0Y0_Head.JP[17] = new JointPoint(.X0Y0_Head.JP[17].Joint.MulY(0.96));
.X0Y0_Head.JP[18] = new JointPoint(.X0Y0_Head.JP[18].Joint.MulY(0.96));
.1_ = false;
.X0Y0_紅潮左.AngleBase = 20.0;
.X0Y0_紅潮弱左.AngleBase = 20.0;