From 425c4951d1920e57ad3e9da486c396a2c65610b7 Mon Sep 17 00:00:00 2001 From: MeltyPlayer Date: Sat, 4 Jan 2025 23:26:16 -0600 Subject: [PATCH] Deleted more unneeded stuff from EarClipping. --- .../Formats/Vrml/Vrml/src/util/EarClipping.cs | 12 ----- .../Formats/Vrml/Vrml/src/util/Vector3m.cs | 48 +------------------ 2 files changed, 1 insertion(+), 59 deletions(-) diff --git a/FinModelUtility/Formats/Vrml/Vrml/src/util/EarClipping.cs b/FinModelUtility/Formats/Vrml/Vrml/src/util/EarClipping.cs index 7f6fbaa79..4e6a54350 100644 --- a/FinModelUtility/Formats/Vrml/Vrml/src/util/EarClipping.cs +++ b/FinModelUtility/Formats/Vrml/Vrml/src/util/EarClipping.cs @@ -260,16 +260,4 @@ internal void Remove(ConnectionEdge cur) { if (cur == this.start_) this.start_ = cur.prev_; } - - public bool Contains(Vector3m vector2M, out Vector3m res) { - foreach (var connectionEdge in this.GetPolygonCirculator()) { - if (connectionEdge.Origin.Equals(vector2M)) { - res = connectionEdge.Origin; - return true; - } - } - - res = null; - return false; - } } \ No newline at end of file diff --git a/FinModelUtility/Formats/Vrml/Vrml/src/util/Vector3m.cs b/FinModelUtility/Formats/Vrml/Vrml/src/util/Vector3m.cs index fe6b7945c..96c0cefe0 100644 --- a/FinModelUtility/Formats/Vrml/Vrml/src/util/Vector3m.cs +++ b/FinModelUtility/Formats/Vrml/Vrml/src/util/Vector3m.cs @@ -2,7 +2,7 @@ namespace vrml.util; -public class Vector3m : ICloneable { +public class Vector3m { internal DynamicProperties DynamicProperties = new DynamicProperties(); public Vector3m(ERational x, ERational y, ERational z) { @@ -11,12 +11,6 @@ public Vector3m(ERational x, ERational y, ERational z) { this.Z = z; } - public Vector3m(Vector3m v) { - this.X = v.X; - this.Y = v.Y; - this.Z = v.Z; - } - public static Vector3m Zero() { return new Vector3m(0, 0, 0); } @@ -25,42 +19,14 @@ public static Vector3m Zero() { public ERational Y { get; set; } public ERational Z { get; set; } - public object Clone() { - return new Vector3m(this.X, this.Y, this.Z); - } - - public Vector3m Plus(Vector3m a) { - return new Vector3m(this.X + a.X, this.Y + a.Y, this.Z + a.Z); - } - public Vector3m Minus(Vector3m a) { return new Vector3m(this.X - a.X, this.Y - a.Y, this.Z - a.Z); } - public Vector3m Times(ERational a) { - return new Vector3m(this.X * a, this.Y * a, this.Z * a); - } - - public Vector3m DividedBy(ERational a) { - return new Vector3m(this.X / a, this.Y / a, this.Z / a); - } - public ERational Dot(Vector3m a) { return this.X * a.X + this.Y * a.Y + this.Z * a.Z; } - public Vector3m Lerp(Vector3m a, ERational t) { - return this.Plus(a.Minus(this).Times(t)); - } - - public double Length() { - return System.Math.Sqrt(this.Dot(this).ToDouble()); - } - - public (double, double, double) ToDouble() { - return (this.X.ToDouble(), this.Y.ToDouble(), this.Z.ToDouble()); - } - public ERational LengthSquared() { return this.Dot(this); } @@ -89,19 +55,7 @@ public override int GetHashCode() { return this.X.GetHashCode() ^ this.Y.GetHashCode() ^ this.Z.GetHashCode(); } - public static Vector3m operator+(Vector3m a, Vector3m b) { - return a.Plus(b); - } - public static Vector3m operator-(Vector3m a, Vector3m b) { return a.Minus(b); } - - public static Vector3m operator*(Vector3m a, ERational d) { - return new Vector3m(a.X * d, a.Y * d, a.Z * d); - } - - public static Vector3m operator/(Vector3m a, ERational d) { - return a.DividedBy(d); - } } \ No newline at end of file