Skip to content

Commit

Permalink
Removed swizzles that had duplicate components.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robmaister committed Jan 17, 2013
1 parent c0fcbb6 commit 1712057
Show file tree
Hide file tree
Showing 9 changed files with 238 additions and 5,600 deletions.
12 changes: 0 additions & 12 deletions Source/OpenTK/Math/Vector2.cs
Expand Up @@ -975,24 +975,12 @@ public static void Transform(ref Vector2 vec, ref Quaternion quat, out Vector2 r

#region Swizzle

/// <summary>
/// Gets or sets an OpenTK.Vector2 with the X component of this instance.
/// </summary>
[XmlIgnore]
public Vector2 Xx { get { return new Vector2(X, X); } }

/// <summary>
/// Gets or sets an OpenTK.Vector2 with the Y and X components of this instance.
/// </summary>
[XmlIgnore]
public Vector2 Yx { get { return new Vector2(Y, X); } set { Y = value.X; X = value.Y; } }

/// <summary>
/// Gets or sets an OpenTK.Vector2 with the Y component of this instance.
/// </summary>
[XmlIgnore]
public Vector2 Yy { get { return new Vector2(Y, Y); } }

#endregion

#region Operators
Expand Down
12 changes: 0 additions & 12 deletions Source/OpenTK/Math/Vector2d.cs
Expand Up @@ -836,24 +836,12 @@ public static void Transform(ref Vector2d vec, ref Quaterniond quat, out Vector2

#region Swizzle

/// <summary>
/// Gets or sets an OpenTK.Vector2d with the X component of this instance.
/// </summary>
[XmlIgnore]
public Vector2d Xx { get { return new Vector2d(X, X); } }

/// <summary>
/// Gets or sets an OpenTK.Vector2d with the Y and X components of this instance.
/// </summary>
[XmlIgnore]
public Vector2d Yx { get { return new Vector2d(Y, X); } set { Y = value.X; X = value.Y; } }

/// <summary>
/// Gets or sets an OpenTK.Vector2d with the Y component of this instance.
/// </summary>
[XmlIgnore]
public Vector2d Yy { get { return new Vector2d(Y, Y); } }

#endregion

#region Operators
Expand Down
12 changes: 0 additions & 12 deletions Source/OpenTK/Math/Vector2h.cs
Expand Up @@ -195,24 +195,12 @@ public Vector2h(ref Vector2d v, bool throwOnError)

#region Swizzle

/// <summary>
/// Gets or sets an OpenTK.Vector2h with the X component of this instance.
/// </summary>
[XmlIgnore]
public Vector2h Xx { get { return new Vector2h(X, X); } }

/// <summary>
/// Gets or sets an OpenTK.Vector2h with the Y and X components of this instance.
/// </summary>
[XmlIgnore]
public Vector2h Yx { get { return new Vector2h(Y, X); } set { Y = value.X; X = value.Y; } }

/// <summary>
/// Gets or sets an OpenTK.Vector2h with the Y component of this instance.
/// </summary>
[XmlIgnore]
public Vector2h Yy { get { return new Vector2h(Y, Y); } }

#endregion

#region Half -> Single
Expand Down
146 changes: 2 additions & 144 deletions Source/OpenTK/Math/Vector3.cs
Expand Up @@ -348,6 +348,8 @@ public void Scale(ref Vector3 scale)

#endregion

#endregion

#region Static

#region Fields
Expand Down Expand Up @@ -1215,12 +1217,6 @@ public static void CalculateAngle(ref Vector3 first, ref Vector3 second, out flo

#region 2-component

/// <summary>
/// Gets or sets an OpenTK.Vector2 with the X and X components of this instance.
/// </summary>
[XmlIgnore]
public Vector2 Xx { get { return new Vector2(X, X); } }

/// <summary>
/// Gets or sets an OpenTK.Vector2 with the X and Y components of this instance.
/// </summary>
Expand All @@ -1239,12 +1235,6 @@ public static void CalculateAngle(ref Vector3 first, ref Vector3 second, out flo
[XmlIgnore]
public Vector2 Yx { get { return new Vector2(Y, X); } set { Y = value.X; X = value.Y; } }

/// <summary>
/// Gets or sets an OpenTK.Vector2 with the Y and Y components of this instance.
/// </summary>
[XmlIgnore]
public Vector2 Yy { get { return new Vector2(Y, Y); } }

/// <summary>
/// Gets or sets an OpenTK.Vector2 with the Y and Z components of this instance.
/// </summary>
Expand All @@ -1263,172 +1253,40 @@ public static void CalculateAngle(ref Vector3 first, ref Vector3 second, out flo
[XmlIgnore]
public Vector2 Zy { get { return new Vector2(Z, Y); } set { Z = value.X; Y = value.Y; } }

/// <summary>
/// Gets or sets an OpenTK.Vector2 with the Z and Z components of this instance.
/// </summary>
[XmlIgnore]
public Vector2 Zz { get { return new Vector2(Z, Z); } }

#endregion

#region 3-component

/// <summary>
/// Gets or sets an OpenTK.Vector3 with the X, X, and X components of this instance.
/// </summary>
[XmlIgnore]
public Vector3 Xxx { get { return new Vector3(X, X, X); } }

/// <summary>
/// Gets or sets an OpenTK.Vector3 with the X, X, and Y components of this instance.
/// </summary>
[XmlIgnore]
public Vector3 Xxy { get { return new Vector3(X, X, Y); } }

/// <summary>
/// Gets or sets an OpenTK.Vector3 with the X, X and Z components of this instance.
/// </summary>
[XmlIgnore]
public Vector3 Xxz { get { return new Vector3(X, X, Z); } }

/// <summary>
/// Gets or sets an OpenTK.Vector3 with the X, Y, and X components of this instance.
/// </summary>
[XmlIgnore]
public Vector3 Xyx { get { return new Vector3(X, Y, X); } }

/// <summary>
/// Gets or sets an OpenTK.Vector3 with the X, Y, and Y components of this instance.
/// </summary>
[XmlIgnore]
public Vector3 Xyy { get { return new Vector3(X, Y, Y); } }

/// <summary>
/// Gets or sets an OpenTK.Vector3 with the X, Z, and X components of this instance.
/// </summary>
[XmlIgnore]
public Vector3 Xzx { get { return new Vector3(X, Z, X); } }

/// <summary>
/// Gets or sets an OpenTK.Vector3 with the X, Z, and Y components of this instance.
/// </summary>
[XmlIgnore]
public Vector3 Xzy { get { return new Vector3(X, Z, Y); } set { X = value.X; Z = value.Y; Y = value.Z; } }

/// <summary>
/// Gets or sets an OpenTK.Vector3 with the X, Z, and Z components of this instance.
/// </summary>
[XmlIgnore]
public Vector3 Xzz { get { return new Vector3(X, Z, Z); } }

/// <summary>
/// Gets or sets an OpenTK.Vector3 with the Y, X, and X components of this instance.
/// </summary>
[XmlIgnore]
public Vector3 Yxx { get { return new Vector3(Y, X, X); } }

/// <summary>
/// Gets or sets an OpenTK.Vector3 with the Y, X, and Y components of this instance.
/// </summary>
[XmlIgnore]
public Vector3 Yxy { get { return new Vector3(Y, X, Y); } }

/// <summary>
/// Gets or sets an OpenTK.Vector3 with the Y, X, and Z components of this instance.
/// </summary>
[XmlIgnore]
public Vector3 Yxz { get { return new Vector3(Y, X, Z); } set { Y = value.X; X = value.Y; Z = value.Z; } }

/// <summary>
/// Gets or sets an OpenTK.Vector3 with the Y, Y, and X components of this instance.
/// </summary>
[XmlIgnore]
public Vector3 Yyx { get { return new Vector3(Y, Y, X); } }

/// <summary>
/// Gets or sets an OpenTK.Vector3 with the Y, Y, and Y components of this instance.
/// </summary>
[XmlIgnore]
public Vector3 Yyy { get { return new Vector3(Y, Y, Y); } }

/// <summary>
/// Gets or sets an OpenTK.Vector3 with the Y, Y, and Z components of this instance.
/// </summary>
[XmlIgnore]
public Vector3 Yyz { get { return new Vector3(Y, Y, Z); } }

/// <summary>
/// Gets or sets an OpenTK.Vector3 with the Y, Z, and X components of this instance.
/// </summary>
[XmlIgnore]
public Vector3 Yzx { get { return new Vector3(Y, Z, X); } set { Y = value.X; Z = value.Y; X = value.Z; } }

/// <summary>
/// Gets or sets an OpenTK.Vector3 with the Y, Z, and Y components of this instance.
/// </summary>
[XmlIgnore]
public Vector3 Yzy { get { return new Vector3(Y, Z, Y); } }

/// <summary>
/// Gets or sets an OpenTK.Vector3 with the Y, Z, and Z components of this instance.
/// </summary>
[XmlIgnore]
public Vector3 Yzz { get { return new Vector3(Y, Z, Z); } }

/// <summary>
/// Gets or sets an OpenTK.Vector3 with the Z, X, and X components of this instance.
/// </summary>
[XmlIgnore]
public Vector3 Zxx { get { return new Vector3(Z, X, X); } }

/// <summary>
/// Gets or sets an OpenTK.Vector3 with the Z, X, and Y components of this instance.
/// </summary>
[XmlIgnore]
public Vector3 Zxy { get { return new Vector3(Z, X, Y); } set { Z = value.X; X = value.Y; Y = value.Z; } }

/// <summary>
/// Gets or sets an OpenTK.Vector3 with the Z, X, and Z components of this instance.
/// </summary>
[XmlIgnore]
public Vector3 Zxz { get { return new Vector3(Z, X, Z); } }

/// <summary>
/// Gets or sets an OpenTK.Vector3 with the Z, Y, and X components of this instance.
/// </summary>
[XmlIgnore]
public Vector3 Zyx { get { return new Vector3(Z, Y, X); } set { Z = value.X; Y = value.Y; X = value.Z; } }

/// <summary>
/// Gets or sets an OpenTK.Vector3 with the Z, Y, and Y components of this instance.
/// </summary>
[XmlIgnore]
public Vector3 Zyy { get { return new Vector3(Z, Y, Y); } }

/// <summary>
/// Gets or sets an OpenTK.Vector3 with the Z, Y, and Z components of this instance.
/// </summary>
[XmlIgnore]
public Vector3 Zyz { get { return new Vector3(Z, Y, Z); } }

/// <summary>
/// Gets or sets an OpenTK.Vector3 with the Z, Z, and X components of this instance.
/// </summary>
[XmlIgnore]
public Vector3 Zzx { get { return new Vector3(Z, Z, X); } }

/// <summary>
/// Gets or sets an OpenTK.Vector3 with the Z, Z, and Y components of this instance.
/// </summary>
[XmlIgnore]
public Vector3 Zzy { get { return new Vector3(Z, Z, Y); } }

/// <summary>
/// Gets or sets an OpenTK.Vector3 with the Z, Z, and Z components of this instance.
/// </summary>
[XmlIgnore]
public Vector3 Zzz { get { return new Vector3(Z, Z, Z); } }

#endregion

#endregion
Expand Down

0 comments on commit 1712057

Please sign in to comment.