MeshRendererComponentEditor

- Explicit conversion from VectorX to float[X]
- Expose "Columns" and "Rows" properties of BufferVariable
- Effects: VariableDescriptors
This commit is contained in:
Simon Lübeß
2022-05-10 22:29:40 +02:00
parent 2e0cc289df
commit f4c9dd8ade
10 changed files with 387 additions and 72 deletions
+7 -3
View File
@@ -282,12 +282,16 @@ namespace GlitchyEngine.Math
public override void ToString(String strBuffer) => strBuffer.AppendF("X:{0} Y:{1}", X, Y);
[Inline]
public static explicit operator Self(float value) => Self(value);
public bool Equals(Vector2 v, float epsilon = Math.[Friend]sMachineEpsilonFloat)
{
return (Math.Abs(v.X - X) < epsilon) && (Math.Abs(v.Y - Y) < epsilon);
}
[Inline]
public static explicit operator Self(float value) => Self(value);
[Inline]
#unwarn
public static explicit operator float[2](Vector2 value) => *(float[2]*)&value;
}
}
+4
View File
@@ -339,5 +339,9 @@ namespace GlitchyEngine.Math
[Inline]
public static explicit operator Self(float value) => Self(value);
[Inline]
#unwarn
public static explicit operator float[3](Vector3 value) => *(float[3]*)&value;
}
}
+4
View File
@@ -320,5 +320,9 @@ namespace GlitchyEngine.Math
[Inline]
public static explicit operator Self(float value) => Self(value);
[Inline]
#unwarn
public static explicit operator float[4](Vector4 value) => *(float[4]*)&value;
}
}