31using System.Runtime.InteropServices;
33using System.Xml.Serialization;
41 [StructLayout(LayoutKind.Sequential, Size = Vector4D.Size)]
42 [AdvBrowsableOrder(
"X,Y,Z,W")]
43#if !CompactFramework && !WindowsCE && !PocketPC && !XBOX360 && !SILVERLIGHT && !WINDOWS_PHONE && !NETFX_CORE
59 #region readonly fields
89 #region static methods
92 Copy(ref vector, destArray, 0);
98 destArray[index] = vector.X;
99 destArray[++index] = vector.Y;
100 destArray[++index] = vector.Z;
101 destArray[++index] = vector.W;
105 Copy(sourceArray, 0, out result);
111 result.X = sourceArray[index];
112 result.Y = sourceArray[++index];
113 result.Z = sourceArray[++index];
114 result.W = sourceArray[++index];
149 Lerp(ref left, ref right, ref amount, out result);
154 result.X = (right.X - left.X) * amount + left.X;
155 result.Y = (right.Y - left.Y) * amount + left.Y;
156 result.Z = (right.Z - left.Z) * amount + left.Z;
157 result.W = (right.W - left.W) * amount + left.W;
162 Lerp(ref left, ref right, ref amount, out result);
167 result.X = (right.X - left.X) * amount.X + left.X;
168 result.Y = (right.Y - left.Y) * amount.Y + left.Y;
169 result.Z = (right.Z - left.Z) * amount.Z + left.Z;
170 result.W = (right.W - left.W) * amount.W + left.W;
176 Distance(ref left, ref right, out result);
182 Subtract(ref left, ref right, out diff);
194 Subtract(ref left, ref right, out diff);
208 result.
X = left.
X + right.
X;
209 result.
Y = left.
Y + right.
Y;
210 result.
Z = left.
Z + right.
Z;
211 result.
W = left.
W + right.
W;
216 result.X = left.X + right.X;
217 result.Y = left.Y + right.Y;
218 result.Z = left.Z + right.Z;
219 result.W = left.W + right.W;
225 Add(ref left, ref right, out result);
230 result.X = left.X + right.X;
231 result.Y = left.Y + right.Y;
232 result.Z = left.Z + right.Z;
238 Add(ref left, ref right, out result);
243 result.X = left.X + right.X;
244 result.Y = left.Y + right.Y;
251 Add(ref left, ref right, out result);
256 result.X = left.X + right.X;
257 result.Y = left.Y + right.Y;
258 result.Z = left.Z + right.Z;
264 Add(ref left, ref right, out result);
269 result.X = left.X + right.X;
270 result.Y = left.Y + right.Y;
287 result.
X = left.
X - right.
X;
288 result.
Y = left.
Y - right.
Y;
289 result.
Z = left.
Z - right.
Z;
290 result.
W = left.
W - right.
W;
295 result.X = left.X - right.X;
296 result.Y = left.Y - right.Y;
297 result.Z = left.Z - right.Z;
298 result.W = left.W - right.W;
305 Subtract(ref left, ref right, out result);
310 result.X = left.X - right.X;
311 result.Y = left.Y - right.Y;
312 result.Z = left.Z - right.Z;
318 Subtract(ref left, ref right, out result);
323 result.X = left.X - right.X;
324 result.Y = left.Y - right.Y;
331 Subtract(ref left, ref right, out result);
336 result.X = left.X - right.X;
337 result.Y = left.Y - right.Y;
338 result.Z = left.Z - right.Z;
344 Subtract(ref left, ref right, out result);
349 result.X = left.X - right.X;
350 result.Y = left.Y - right.Y;
366 result.
X = source.
X * scalar;
367 result.
Y = source.
Y * scalar;
368 result.
Z = source.
Z * scalar;
369 result.
W = source.
W * scalar;
374 result.X = source.X * scalar;
375 result.Y = source.Y * scalar;
376 result.Z = source.Z * scalar;
377 result.W = source.W * scalar;
389 result.
X = scalar * source.
X;
390 result.
Y = scalar * source.
Y;
391 result.
Z = scalar * source.
Z;
392 result.
W = scalar * source.
W;
397 result.X = scalar * source.X;
398 result.Y = scalar * source.Y;
399 result.Z = scalar * source.Z;
400 result.W = scalar * source.W;
407 result.
X = vector.
X * matrix.
m00 + vector.
Y * matrix.
m01 + vector.
Z * matrix.
m02 + vector.
W * matrix.
m03;
408 result.
Y = vector.
X * matrix.
m10 + vector.
Y * matrix.
m11 + vector.
Z * matrix.
m12 + vector.
W * matrix.
m13;
409 result.
Z = vector.
X * matrix.
m20 + vector.
Y * matrix.
m21 + vector.
Z * matrix.
m22 + vector.
W * matrix.
m23;
410 result.
W = vector.
X * matrix.
m30 + vector.
Y * matrix.
m31 + vector.
Z * matrix.
m32 + vector.
W * matrix.
m33;
419 result.X =
X * matrix.m00 +
Y * matrix.m01 +
Z * matrix.m02 + vector.W * matrix.m03;
420 result.Y =
X * matrix.m10 +
Y * matrix.m11 +
Z * matrix.m12 + vector.W * matrix.m13;
421 result.Z =
X * matrix.m20 +
Y * matrix.m21 +
Z * matrix.m22 + vector.W * matrix.m23;
422 result.W =
X * matrix.m30 +
Y * matrix.m31 +
Z * matrix.m32 + vector.W * matrix.m33;
429 result.
X = vector.
X * matrix.
m00 + vector.
Y * matrix.
m10 + vector.
Z * matrix.
m20 + vector.
W * matrix.
m30;
430 result.
Y = vector.
X * matrix.
m01 + vector.
Y * matrix.
m11 + vector.
Z * matrix.
m21 + vector.
W * matrix.
m31;
431 result.
Z = vector.
X * matrix.
m02 + vector.
Y * matrix.
m12 + vector.
Z * matrix.
m22 + vector.
W * matrix.
m32;
432 result.
W = vector.
X * matrix.
m03 + vector.
Y * matrix.
m13 + vector.
Z * matrix.
m23 + vector.
W * matrix.
m33;
441 result.X =
X * matrix.m00 +
Y * matrix.m10 +
Z * matrix.m20 + vector.W * matrix.m30;
442 result.Y =
X * matrix.m01 +
Y * matrix.m11 +
Z * matrix.m21 + vector.W * matrix.m31;
443 result.Z =
X * matrix.m02 +
Y * matrix.m12 +
Z * matrix.m22 + vector.W * matrix.m32;
444 result.W =
X * matrix.m03 +
Y * matrix.m13 +
Z * matrix.m23 + vector.W * matrix.m33;
456 return left.
Y * right.
Y + left.
X * right.
X + left.
Z * right.
Z + left.
W * right.
W;
460 result = left.Y * right.Y + left.X * right.X + left.Z * right.Z + left.W * right.W;
469 return source.
X * source.
X + source.
Y * source.
Y + source.
Z * source.
Z + source.
W * source.
W;
473 result = source.X * source.X + source.Y * source.Y + source.Z * source.Z + source.W * source.W;
482 return MathHelper.
Sqrt(source.
X * source.
X + source.
Y * source.
Y + source.
Z * source.
Z + source.
W * source.
W);
486 result =
MathHelper.
Sqrt(source.X * source.X + source.Y * source.Y + source.Z * source.Z + source.W * source.W);
504 if (oldmagnitude > 0 && magnitude != 0)
506 oldmagnitude = (magnitude / oldmagnitude);
507 Multiply(ref source, ref oldmagnitude, out result);
522 result.
X = -source.
X;
523 result.
Y = -source.
Y;
524 result.
Z = -source.
Z;
525 result.
W = -source.
W;
530 Negate(ref source, out source);
534 result.X = -source.X;
535 result.Y = -source.Y;
536 result.Z = -source.Z;
537 result.W = -source.W;
549 if (oldmagnitude == 0) {
return Zero; }
550 oldmagnitude = (1 / oldmagnitude);
552 result.
X = source.
X * oldmagnitude;
553 result.
Y = source.
Y * oldmagnitude;
554 result.
Z = source.
Z * oldmagnitude;
555 result.
W = source.
W * oldmagnitude;
562 if (oldmagnitude == 0) { result =
Zero;
return; }
563 oldmagnitude = (1 / oldmagnitude);
564 result.
X = source.X * oldmagnitude;
565 result.Y = source.Y * oldmagnitude;
566 result.Z = source.Z * oldmagnitude;
567 result.W = source.W * oldmagnitude;
583 Project(ref left, ref right, out result);
589 Dot(ref left, ref right, out tmp);
592 Multiply(ref right, ref tmp, out result);
603 middle.
Y, middle.
Z, middle.
W,
604 bottom.
Y, bottom.
Z, bottom.
W);
608 middle.
X, middle.
Z, middle.
W,
609 bottom.
X, bottom.
Z, bottom.
W);
613 middle.
X, middle.
Y, middle.
W,
614 bottom.
X, bottom.
Y, bottom.
W);
618 middle.
X, middle.
Y, middle.
Z,
619 bottom.
X, bottom.
Y, bottom.
Z);
627 CatmullRom(ref value1, ref value2, ref value3, ref value4, amount, out result);
632 Scalar amountSq = amount * amount;
633 Scalar amountCu = amountSq * amount;
635 0.5f * ((2 * value2.X) +
636 (-value1.X + value3.X) * amount +
637 (2 * value1.X - 5 * value2.X + 4 * value3.X - value4.X) * amountSq +
638 (-value1.X + 3 * value2.X - 3 * value3.X + value4.X) * amountCu);
640 0.5f * ((2 * value2.Y) +
641 (-value1.Y + value3.Y) * amount +
642 (2 * value1.Y - 5 * value2.Y + 4 * value3.Y - value4.Y) * amountSq +
643 (-value1.Y + 3 * value2.Y - 3 * value3.Y + value4.Y) * amountCu);
645 0.5f * ((2 * value2.Z) +
646 (-value1.Z + value3.Z) * amount +
647 (2 * value1.Z - 5 * value2.Z + 4 * value3.Z - value4.Z) * amountSq +
648 (-value1.Z + 3 * value2.Z - 3 * value3.Z + value4.Z) * amountCu);
650 0.5f * ((2 * value2.W) +
651 (-value1.W + value3.W) * amount +
652 (2 * value1.W - 5 * value2.W + 4 * value3.W - value4.W) * amountSq +
653 (-value1.W + 3 * value2.W - 3 * value3.W + value4.W) * amountCu);
659 Max(ref value1, ref value2, out result);
664 result.X = (value1.X < value2.X) ? (value2.X) : (value1.X);
665 result.Y = (value1.Y < value2.Y) ? (value2.Y) : (value1.Y);
666 result.Z = (value1.Z < value2.Z) ? (value2.Z) : (value1.Z);
667 result.W = (value1.W < value2.W) ? (value2.W) : (value1.W);
673 Min(ref value1, ref value2, out result);
678 result.X = (value1.X > value2.X) ? (value2.X) : (value1.X);
679 result.Y = (value1.Y > value2.Y) ? (value2.Y) : (value1.Y);
680 result.Z = (value1.Z > value2.Z) ? (value2.Z) : (value1.Z);
681 result.W = (value1.W > value2.W) ? (value2.W) : (value1.W);
687 Hermite(ref value1, ref tangent1, ref value2, ref tangent2, amount, out result);
694 result.X = h1 * value1.X + h2 * value2.X + h3 * tangent1.X + h4 * tangent2.X;
695 result.Y = h1 * value1.Y + h2 * value2.Y + h3 * tangent1.Y + h4 * tangent2.Y;
696 result.Z = h1 * value1.Z + h2 * value2.Z + h3 * tangent1.Z + h4 * tangent2.Z;
697 result.W = h1 * value1.W + h2 * value2.W + h3 * tangent1.W + h4 * tangent2.W;
708 [
System.ComponentModel.Description(
"The Magnitude on the X-Axis")]
717 [
System.ComponentModel.Description(
"The Magnitude on the Y-Axis")]
726 [
System.ComponentModel.Description(
"The Magnitude on the Z-Axis")]
735 [
System.ComponentModel.Description(
"The Magnitude on the W-Axis")]
748 [InstanceConstructor(
"X,Y,Z,W")]
759 Copy(vals, index, out
this);
771 public Scalar this[
int index]
778 fixed (
Scalar* ptr = &this.X)
786 ThrowHelper.CheckIndex(
"index", index,
Count);
789 fixed (
Scalar* ptr = &this.X)
810 return MathHelper.
Sqrt(this.X * this.X + this.Y * this.Y + this.Z * this.Z + this.W * this.W);
824 return this.X * this.X + this.Y * this.Y + this.Z * this.Z + this.W * this.
W;
843 #region public methods
847 Copy(ref
this, array, 0);
852 Copy(array, index, out
this);
856 Copy(ref
this, array, index);
870 result.
X = left.
X + right.
X;
871 result.
Y = left.
Y + right.
Y;
872 result.
Z = left.
Z + right.
Z;
873 result.
W = left.
W + right.
W;
879 Add(ref left, ref right, out result);
885 Add(ref left, ref right, out result);
891 Add(ref left, ref right, out result);
897 Add(ref left, ref right, out result);
910 result.
X = left.
X - right.
X;
911 result.
Y = left.
Y - right.
Y;
912 result.
Z = left.
Z - right.
Z;
913 result.
W = left.
W - right.
W;
919 Subtract(ref left, ref right, out result);
925 Subtract(ref left, ref right, out result);
931 Subtract(ref left, ref right, out result);
937 Subtract(ref left, ref right, out result);
950 result.
X = source.
X * scalar;
951 result.
Y = source.
Y * scalar;
952 result.
Z = source.
Z * scalar;
953 result.
W = source.
W * scalar;
966 result.
X = scalar * source.
X;
967 result.
Y = scalar * source.
Y;
968 result.
Z = scalar * source.
Z;
969 result.
W = scalar * source.
W;
981 return left.
X * right.
X + left.
Y * right.
Y + left.
Z * right.
Z + left.
W * right.
W;
989 result.
X = vector.
X * matrix.
m00 + vector.
Y * matrix.
m01 + vector.
Z * matrix.
m02 + vector.
W * matrix.
m03;
990 result.
Y = vector.
X * matrix.
m10 + vector.
Y * matrix.
m11 + vector.
Z * matrix.
m12 + vector.
W * matrix.
m13;
991 result.
Z = vector.
X * matrix.
m20 + vector.
Y * matrix.
m21 + vector.
Z * matrix.
m22 + vector.
W * matrix.
m23;
992 result.
W = vector.
X * matrix.
m30 + vector.
Y * matrix.
m31 + vector.
Z * matrix.
m32 + vector.
W * matrix.
m33;
1001 result.
X = vector.
X * matrix.
m00 + vector.
Y * matrix.
m10 + vector.
Z * matrix.
m20 + vector.
W * matrix.
m30;
1002 result.
Y = vector.
X * matrix.
m01 + vector.
Y * matrix.
m11 + vector.
Z * matrix.
m21 + vector.
W * matrix.
m31;
1003 result.
Z = vector.
X * matrix.
m02 + vector.
Y * matrix.
m12 + vector.
Z * matrix.
m22 + vector.
W * matrix.
m32;
1004 result.
W = vector.
X * matrix.
m03 + vector.
Y * matrix.
m13 + vector.
Z * matrix.
m23 + vector.
W * matrix.
m33;
1017 result.
X = -source.
X;
1018 result.
Y = -source.
Y;
1019 result.
Z = -source.
Z;
1020 result.
W = -source.
W;
1031 return left.
X == right.
X && left.
Y == right.
Y && left.
Z == right.
Z && left.
W == right.
W;
1041 return !(left.
X == right.
X && left.
Y == right.
Y && left.
Z == right.
Z && left.
W == right.
W);
1048 result.
X = source.
X;
1049 result.
Y = source.
Y;
1050 result.
Z = source.
Z;
1071#if !CompactFramework && !WindowsCE && !PocketPC && !XBOX360 && !SILVERLIGHT
1080 if (vals.Length !=
Count)
1085 if (
Scalar.TryParse(vals[0], out result.X) &&
1086 Scalar.TryParse(vals[1], out result.Y) &&
1087 Scalar.TryParse(vals[2], out result.Z) &&
1088 Scalar.TryParse(vals[3], out result.W))
1104 throw new ArgumentNullException(
"s");
1107 if (vals.Length !=
Count)
1112 value.
X =
Scalar.Parse(vals[0]);
1113 value.
Y =
Scalar.Parse(vals[1]);
1114 value.
Z =
Scalar.Parse(vals[2]);
1115 value.
W =
Scalar.Parse(vals[3]);
1131 return X.GetHashCode() ^
Y.GetHashCode() ^
Z.GetHashCode() ^
W.GetHashCode();
1146 return Equals(ref
this, ref other);
1151 left.
X == right.
X &&
1152 left.
Y == right.
Y &&
1153 left.
Z == right.
Z &&
1159 left.X == right.X &&
1160 left.Y == right.Y &&
1161 left.Z == right.Z &&
static Scalar Clamp(Scalar value, Scalar min, Scalar max)
static Scalar Sqrt(Scalar d)
static void HermiteHelper(Scalar amount, out Scalar h1, out Scalar h2, out Scalar h3, out Scalar h4)
static string CreateVectorFormatableString(int Count)
static string CreateVectorFormatString(int Count)
static string[] SplitStringVector(string s)
static void ThrowVectorFormatException(string value, int count, string format)
static void CheckCopy(Scalar[] array, int index, int count)
int Count
Gets a 32-bit integer that represents the total number of elements in all the dimensions of IAdvanceV...
A 3x3 matrix which can represent rotations around axes.
static Scalar GetDeterminant(Matrix3x3 source)
This is the Vector Class.
A Vector with 3 dimensions.
Scalar X
This is the X value.
Scalar Y
This is the Y value.
Scalar Z
This is the Z value.
A Vector with 4 dimensions.
static readonly Vector4D WAxis
Vector4D(0,0,0,1)
static void Project(ref Vector4D left, ref Vector4D right, out Vector4D result)
static readonly Vector4D Zero
Vector4D(0,0,0,0)
static void GetMagnitude(ref Vector4D source, out Scalar result)
string ToString(string format)
static void Lerp(ref Vector4D left, ref Vector4D right, ref Scalar amount, out Vector4D result)
Vector4D(Scalar X, Scalar Y, Scalar Z, Scalar W)
Creates a New Vector4D Instance on the Stack.
static Vector4D Add(Vector4D left, Vector3D right)
static readonly string FormatableString
static Scalar DistanceSq(Vector4D left, Vector4D right)
static Vector4D Add(Vector4D left, Vector2D right)
static bool TryParse(string s, out Vector4D result)
Scalar MagnitudeSq
Gets the Squared Magnitude of the Vector4D.
static readonly string FormatString
Scalar X
This is the X value.
static void Add(ref Vector4D left, ref Vector4D right, out Vector4D result)
Scalar Y
This is the Y value.
static void Add(ref Vector4D left, ref Vector3D right, out Vector4D result)
static void Copy(Scalar[] sourceArray, int index, out Vector4D result)
static void SetMagnitude(ref Vector4D source, ref Scalar magnitude, out Vector4D result)
bool Equals(Vector4D other)
static void Subtract(ref Vector4D left, ref Vector3D right, out Vector4D result)
void CopyTo(Scalar[] array, int index)
static void Copy(Scalar[] sourceArray, out Vector4D result)
static Vector4D Add(Vector4D left, Vector4D right)
Adds 2 Vectors2Ds.
string ToStringInternal(string FormatString)
static Vector4D Negate(Vector4D source)
Negates a Vector4D.
static Vector4D operator+(Vector4D left, Vector4D right)
Adds 2 Vectors2Ds.
static Vector4D Subtract(Vector4D left, Vector2D right)
static void Add(ref Vector4D left, ref Vector2D right, out Vector4D result)
static void Subtract(ref Vector4D left, ref Vector2D right, out Vector4D result)
static Scalar GetMagnitudeSq(Vector4D source)
Gets the Squared Magnitude of the Vector4D that is passed.
Vector4D Normalized
Gets the Normalized Vector4D. (Unit Vector)
static void Add(ref Vector2D left, ref Vector4D right, out Vector4D result)
static Vector4D Subtract(Vector3D left, Vector4D right)
static void Subtract(ref Vector3D left, ref Vector4D right, out Vector4D result)
static Vector4D Lerp(Vector4D left, Vector4D right, Scalar amount)
static void Subtract(ref Vector2D left, ref Vector4D right, out Vector4D result)
static void Lerp(ref Vector4D left, ref Vector4D right, ref Vector4D amount, out Vector4D result)
static void Clamp(ref Vector4D value, ref Vector4D min, ref Vector4D max, out Vector4D result)
override int GetHashCode()
Provides a unique hash code based on the member variables of this class. This should be done because ...
static void Copy(ref Vector4D vector, Scalar[] destArray)
static void Transform(ref Vector4D vector, ref Matrix4x4 matrix, out Vector4D result)
override string ToString()
static void Multiply(ref Vector4D source, ref Scalar scalar, out Vector4D result)
static void CatmullRom(ref Vector4D value1, ref Vector4D value2, ref Vector4D value3, ref Vector4D value4, Scalar amount, out Vector4D result)
static void Copy(ref Vector3D source, ref Vector4D dest)
static Vector4D Hermite(Vector4D value1, Vector4D tangent1, Vector4D value2, Vector4D tangent2, Scalar amount)
static void Multiply(ref Scalar scalar, ref Vector4D source, out Vector4D result)
static Vector4D CatmullRom(Vector4D value1, Vector4D value2, Vector4D value3, Vector4D value4, Scalar amount)
const int Size
The Size of the class in bytes;
static readonly Vector4D YAxis
Vector4D(0,1,0,0)
static void Subtract(ref Vector4D left, ref Vector4D right, out Vector4D result)
static Vector4D Lerp(Vector4D left, Vector4D right, Vector4D amount)
static void DistanceSq(ref Vector4D left, ref Vector4D right, out Scalar result)
static Vector4D Parse(string s)
Vector4D(Scalar[] vals, int index)
static Vector4D Add(Vector2D left, Vector4D right)
static Vector4D Normalize(Vector4D source)
This returns the Normalized Vector4D that is passed. This is also known as a Unit Vector.
Scalar Z
This is the Z value.
static Scalar GetMagnitude(Vector4D source)
Gets the Magnitude of the Vector4D that is passed.
static bool operator==(Vector4D left, Vector4D right)
Specifies whether the Vector4Ds contain the same coordinates.
static void Distance(ref Vector4D left, ref Vector4D right, out Scalar result)
static void Copy(ref Vector4D vector, Scalar[] destArray, int index)
static void Hermite(ref Vector4D value1, ref Vector4D tangent1, ref Vector4D value2, ref Vector4D tangent2, Scalar amount, out Vector4D result)
static Vector4D Clamp(Vector4D value, Vector4D min, Vector4D max)
static Vector4D Multiply(Scalar scalar, Vector4D source)
Does Scaler Multiplication on a Vector4D.
static Vector4D TripleCross(Vector4D top, Vector4D middle, Vector4D bottom)
static Vector4D Transform(Matrix4x4 matrix, Vector4D vector)
static Vector4D Project(Vector4D left, Vector4D right)
Thie Projects the left Vector4D onto the Right Vector4D.
static Vector4D Multiply(Vector4D source, Scalar scalar)
Does Scaler Multiplication on a Vector4D.
static readonly Vector4D One
Vector4D(1,1,1,1)
static Vector4D Max(Vector4D value1, Vector4D value2)
static void Add(ref Vector3D left, ref Vector4D right, out Vector4D result)
static bool Equals(ref Vector4D left, ref Vector4D right)
static Vector4D Subtract(Vector4D left, Vector3D right)
static void Normalize(ref Vector4D source)
static void GetMagnitudeSq(ref Vector4D source, out Scalar result)
override bool Equals(object obj)
Compares this Vector to another object. This should be done because the equality operators (==,...
static Vector4D Subtract(Vector2D left, Vector4D right)
static Vector4D Transform(Vector4D vector, Matrix4x4 matrix)
static void Dot(ref Vector4D left, ref Vector4D right, out Scalar result)
static Vector4D operator-(Vector4D left, Vector4D right)
Subtracts 2 Vector4Ds.
static readonly Vector4D XAxis
Vector4D(1,0,0,0)
int IAdvanceValueType. Count
The Number of Variables accesable though the indexer.
static Scalar Distance(Vector4D left, Vector4D right)
static Scalar Dot(Vector4D left, Vector4D right)
Does a Dot Operation Also know as an Inner Product.
Scalar Magnitude
Gets or Sets the Magnitude (Length) of the Vector4D.
Scalar W
This is the W value.
static Vector4D Add(Vector3D left, Vector4D right)
static void Min(ref Vector4D value1, ref Vector4D value2, out Vector4D result)
static void Negate(ref Vector4D source)
const int Count
The number of Scalar values in the class.
static Vector4D Subtract(Vector4D left, Vector4D right)
Subtracts 2 Vector4Ds.
static Vector4D SetMagnitude(Vector4D source, Scalar magnitude)
Sets the Magnitude of a Vector4D.
static void Max(ref Vector4D value1, ref Vector4D value2, out Vector4D result)
static void Negate(ref Vector4D source, out Vector4D result)
static bool Equals(Vector4D left, Vector4D right)
void CopyFrom(Scalar[] array, int index)
static void Normalize(ref Vector4D source, out Vector4D result)
static void Transform(ref Matrix4x4 matrix, ref Vector4D vector, out Vector4D result)
static Vector4D operator*(Vector4D source, Scalar scalar)
Does Scaler Multiplication on a Vector4D.
static void Copy(ref Vector2D source, ref Vector4D dest)
static Vector4D Min(Vector4D value1, Vector4D value2)
static bool operator!=(Vector4D left, Vector4D right)
Specifies whether the Vector4Ds do not contain the same coordinates.
static readonly Vector4D ZAxis
Vector4D(0,0,1,0)