From 501a728532deabc67e75908de98342ee703327ae Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Fri, 13 Feb 2009 20:40:57 +0000 Subject: [PATCH] Marked the swizzle properties with the XmlIgnoreAttribute. --- Source/OpenTK/Math/Vector3.cs | 6 +++++- Source/OpenTK/Math/Vector3d.cs | Bin 81648 -> 81796 bytes Source/OpenTK/Math/Vector3h.cs | 7 +++++-- Source/OpenTK/Math/Vector4.cs | 3 +++ Source/OpenTK/Math/Vector4d.cs | 3 +++ Source/OpenTK/Math/Vector4h.cs | 8 ++++++-- 6 files changed, 22 insertions(+), 5 deletions(-) diff --git a/Source/OpenTK/Math/Vector3.cs b/Source/OpenTK/Math/Vector3.cs index 8d60d20a..bf4c6a26 100644 --- a/Source/OpenTK/Math/Vector3.cs +++ b/Source/OpenTK/Math/Vector3.cs @@ -24,10 +24,13 @@ SOFTWARE. using System; using System.Runtime.InteropServices; +using System.Xml.Serialization; namespace OpenTK.Math { - /// Represents a 3D vector using three single-precision floating-point numbers. + /// + /// Represents a 3D vector using three single-precision floating-point numbers. + /// /// /// The Vector3 structure is suitable for interoperation with unmanaged code requiring three consecutive floats. /// @@ -1009,6 +1012,7 @@ namespace OpenTK.Math /// /// Gets or sets an OpenTK.Math.Vector2 with the X and Y components of this instance. /// + [XmlIgnore] public Vector2 Xy { get { return new Vector2(X, Y); } set { X = value.X; Y = value.Y; } } #endregion diff --git a/Source/OpenTK/Math/Vector3d.cs b/Source/OpenTK/Math/Vector3d.cs index e70ce1884c1a6a1e8bd7a114227333eadc00760d..3473064886ae2db51e90672adca734fab1cc8e5b 100644 GIT binary patch delta 128 zcmezHm!;)D%Z3=v$saf*l=T=Q7;+hM81xu|8B!UF7%~|WfxJwHDj;0~r1Kf_CWmq+ zPEO$BnLLM+gE45jz9FON3-component Vector of the Half type. Occupies 6 Byte total. + /// + /// 3-component Vector of the Half type. Occupies 6 Byte total. + /// [Serializable, StructLayout(LayoutKind.Sequential)] public struct Vector3h : ISerializable, IEquatable { @@ -194,6 +196,7 @@ namespace OpenTK.Math /// /// Gets or sets an OpenTK.Math.Vector2h with the X and Y components of this instance. /// + [XmlIgnore] public Vector2h Xy { get { return new Vector2h(X, Y); } set { X = value.X; Y = value.Y; } } #endregion diff --git a/Source/OpenTK/Math/Vector4.cs b/Source/OpenTK/Math/Vector4.cs index 893a7977..3800e6ae 100644 --- a/Source/OpenTK/Math/Vector4.cs +++ b/Source/OpenTK/Math/Vector4.cs @@ -24,6 +24,7 @@ SOFTWARE. using System; using System.Runtime.InteropServices; +using System.Xml.Serialization; namespace OpenTK.Math { @@ -830,11 +831,13 @@ namespace OpenTK.Math /// /// Gets or sets an OpenTK.Math.Vector2 with the X and Y components of this instance. /// + [XmlIgnore] public Vector2 Xy { get { return new Vector2(X, Y); } set { X = value.X; Y = value.Y; } } /// /// Gets or sets an OpenTK.Math.Vector3 with the X, Y and Z components of this instance. /// + [XmlIgnore] public Vector3 Xyz { get { return new Vector3(X, Y, Z); } set { X = value.X; Y = value.Y; Z = value.Z; } } #endregion diff --git a/Source/OpenTK/Math/Vector4d.cs b/Source/OpenTK/Math/Vector4d.cs index b1914c7a..d4e0fb06 100644 --- a/Source/OpenTK/Math/Vector4d.cs +++ b/Source/OpenTK/Math/Vector4d.cs @@ -24,6 +24,7 @@ SOFTWARE. using System; using System.Runtime.InteropServices; +using System.Xml.Serialization; namespace OpenTK.Math { @@ -827,11 +828,13 @@ namespace OpenTK.Math /// /// Gets or sets an OpenTK.Math.Vector2d with the X and Y components of this instance. /// + [XmlIgnore] public Vector2d Xy { get { return new Vector2d(X, Y); } set { X = value.X; Y = value.Y; } } /// /// Gets or sets an OpenTK.Math.Vector3d with the X, Y and Z components of this instance. /// + [XmlIgnore] public Vector3d Xyz { get { return new Vector3d(X, Y, Z); } set { X = value.X; Y = value.Y; Z = value.Z; } } #endregion diff --git a/Source/OpenTK/Math/Vector4h.cs b/Source/OpenTK/Math/Vector4h.cs index 83c0e550..2665ea94 100644 --- a/Source/OpenTK/Math/Vector4h.cs +++ b/Source/OpenTK/Math/Vector4h.cs @@ -26,11 +26,13 @@ using System; using System.IO; using System.Runtime.InteropServices; using System.Runtime.Serialization; +using System.Xml.Serialization; namespace OpenTK.Math { - - /// 4-component Vector of the Half type. Occupies 8 Byte total. + /// + /// 4-component Vector of the Half type. Occupies 8 Byte total. + /// [Serializable, StructLayout(LayoutKind.Sequential)] public struct Vector4h : ISerializable, IEquatable { @@ -211,11 +213,13 @@ namespace OpenTK.Math /// /// Gets or sets an OpenTK.Math.Vector2h with the X and Y components of this instance. /// + [XmlIgnore] public Vector2h Xy { get { return new Vector2h(X, Y); } set { X = value.X; Y = value.Y; } } /// /// Gets or sets an OpenTK.Math.Vector3h with the X, Y and Z components of this instance. /// + [XmlIgnore] public Vector3h Xyz { get { return new Vector3h(X, Y, Z); } set { X = value.X; Y = value.Y; Z = value.Z; } } #endregion