5using Microsoft.Xna.Framework.Design;
13 [SuppressMessage(
"Microsoft.Design",
"CA1051:DoNotDeclareVisibleInstanceFields")]
16 [SuppressMessage(
"Microsoft.Design",
"CA1051:DoNotDeclareVisibleInstanceFields")]
19 [SuppressMessage(
"Microsoft.Design",
"CA1051:DoNotDeclareVisibleInstanceFields")]
22 [SuppressMessage(
"Microsoft.Design",
"CA1051:DoNotDeclareVisibleInstanceFields")]
49 public Vector4(
float x,
float y,
float z,
float w)
81 return string.Format(currentCulture,
"{{X:{0} Y:{1} Z:{2} W:{3}}}",
X.ToString(currentCulture),
Y.ToString(currentCulture),
Z.ToString(currentCulture),
W.ToString(currentCulture));
105 return X.GetHashCode() +
Y.GetHashCode() +
Z.GetHashCode() +
W.GetHashCode();
110 float num =
X *
X +
Y *
Y +
Z *
Z +
W *
W;
116 return X *
X +
Y *
Y +
Z *
Z +
W *
W;
121 float num = value1.X - value2.
X;
122 float num2 = value1.Y - value2.
Y;
123 float num3 = value1.Z - value2.
Z;
124 float num4 = value1.W - value2.
W;
125 float num5 = num * num + num2 * num2 + num3 * num3 + num4 * num4;
131 float num = value1.X - value2.X;
132 float num2 = value1.Y - value2.Y;
133 float num3 = value1.Z - value2.Z;
134 float num4 = value1.W - value2.W;
135 float num5 = num * num + num2 * num2 + num3 * num3 + num4 * num4;
141 float num = value1.X - value2.
X;
142 float num2 = value1.Y - value2.
Y;
143 float num3 = value1.Z - value2.
Z;
144 float num4 = value1.W - value2.
W;
145 return num * num + num2 * num2 + num3 * num3 + num4 * num4;
150 float num = value1.X - value2.X;
151 float num2 = value1.Y - value2.Y;
152 float num3 = value1.Z - value2.Z;
153 float num4 = value1.W - value2.W;
154 result = num * num + num2 * num2 + num3 * num3 + num4 * num4;
159 return vector1.X * vector2.X + vector1.Y * vector2.Y + vector1.Z * vector2.Z + vector1.W * vector2.
W;
164 result = vector1.X * vector2.X + vector1.Y * vector2.Y + vector1.Z * vector2.Z + vector1.W * vector2.W;
169 float num =
X *
X +
Y *
Y +
Z *
Z +
W *
W;
170 float num2 = 1f / (float)
Math.
Sqrt(num);
179 float num = vector.X * vector.X + vector.Y * vector.Y + vector.Z * vector.Z + vector.W * vector.
W;
180 float num2 = 1f / (float)
Math.
Sqrt(num);
182 result.X = vector.X * num2;
183 result.Y = vector.Y * num2;
184 result.Z = vector.Z * num2;
185 result.W = vector.W * num2;
191 float num = vector.X * vector.X + vector.Y * vector.Y + vector.Z * vector.Z + vector.W * vector.W;
192 float num2 = 1f / (float)
Math.
Sqrt(num);
193 result.X = vector.X * num2;
194 result.Y = vector.Y * num2;
195 result.Z = vector.Z * num2;
196 result.W = vector.W * num2;
202 result.X = ((value1.X < value2.
X) ? value1.
X : value2.
X);
203 result.Y = ((value1.Y < value2.
Y) ? value1.
Y : value2.
Y);
204 result.Z = ((value1.Z < value2.
Z) ? value1.
Z : value2.
Z);
205 result.W = ((value1.W < value2.
W) ? value1.
W : value2.
W);
211 result.X = ((value1.X < value2.X) ? value1.X : value2.X);
212 result.Y = ((value1.Y < value2.Y) ? value1.Y : value2.Y);
213 result.Z = ((value1.Z < value2.Z) ? value1.Z : value2.Z);
214 result.W = ((value1.W < value2.W) ? value1.W : value2.W);
220 result.X = ((value1.X > value2.
X) ? value1.
X : value2.
X);
221 result.Y = ((value1.Y > value2.
Y) ? value1.
Y : value2.
Y);
222 result.Z = ((value1.Z > value2.
Z) ? value1.
Z : value2.
Z);
223 result.W = ((value1.W > value2.
W) ? value1.
W : value2.
W);
229 result.X = ((value1.X > value2.X) ? value1.X : value2.X);
230 result.Y = ((value1.Y > value2.Y) ? value1.Y : value2.Y);
231 result.Z = ((value1.Z > value2.Z) ? value1.Z : value2.Z);
232 result.W = ((value1.W > value2.W) ? value1.W : value2.W);
238 x = ((x > max.
X) ? max.
X : x);
239 x = ((x < min.
X) ? min.
X : x);
241 y = ((y > max.
Y) ? max.
Y : y);
242 y = ((y < min.
Y) ? min.
Y : y);
244 z = ((z > max.
Z) ? max.
Z : z);
245 z = ((z < min.
Z) ? min.
Z : z);
247 w = ((w > max.
W) ? max.
W : w);
248 w = ((w < min.
W) ? min.
W : w);
260 x = ((x > max.X) ? max.X : x);
261 x = ((x < min.X) ? min.X : x);
263 y = ((y > max.Y) ? max.Y : y);
264 y = ((y < min.Y) ? min.Y : y);
266 z = ((z > max.Z) ? max.Z : z);
267 z = ((z < min.Z) ? min.Z : z);
269 w = ((w > max.W) ? max.W : w);
270 w = ((w < min.W) ? min.W : w);
280 result.X = value1.X + (value2.X - value1.
X) * amount;
281 result.Y = value1.Y + (value2.Y - value1.
Y) * amount;
282 result.Z = value1.Z + (value2.Z - value1.
Z) * amount;
283 result.W = value1.W + (value2.W - value1.
W) * amount;
289 result.X = value1.X + (value2.X - value1.X) * amount;
290 result.Y = value1.Y + (value2.Y - value1.Y) * amount;
291 result.Z = value1.Z + (value2.Z - value1.Z) * amount;
292 result.W = value1.W + (value2.W - value1.W) * amount;
298 result.X = value1.X + amount1 * (value2.X - value1.
X) + amount2 * (value3.
X - value1.
X);
299 result.Y = value1.Y + amount1 * (value2.Y - value1.
Y) + amount2 * (value3.
Y - value1.
Y);
300 result.Z = value1.Z + amount1 * (value2.Z - value1.
Z) + amount2 * (value3.
Z - value1.
Z);
301 result.W = value1.W + amount1 * (value2.W - value1.
W) + amount2 * (value3.
W - value1.
W);
307 result.X = value1.X + amount1 * (value2.X - value1.X) + amount2 * (value3.X - value1.X);
308 result.Y = value1.Y + amount1 * (value2.Y - value1.Y) + amount2 * (value3.Y - value1.Y);
309 result.Z = value1.Z + amount1 * (value2.Z - value1.Z) + amount2 * (value3.Z - value1.Z);
310 result.W = value1.W + amount1 * (value2.W - value1.W) + amount2 * (value3.W - value1.W);
315 amount = ((amount > 1f) ? 1f : ((amount < 0f) ? 0f : amount));
316 amount = amount * amount * (3f - 2f * amount);
318 result.X = value1.X + (value2.X - value1.
X) * amount;
319 result.Y = value1.Y + (value2.Y - value1.
Y) * amount;
320 result.Z = value1.Z + (value2.Z - value1.
Z) * amount;
321 result.W = value1.W + (value2.W - value1.
W) * amount;
327 amount = ((amount > 1f) ? 1f : ((amount < 0f) ? 0f : amount));
328 amount = amount * amount * (3f - 2f * amount);
329 result.X = value1.X + (value2.X - value1.X) * amount;
330 result.Y = value1.Y + (value2.Y - value1.Y) * amount;
331 result.Z = value1.Z + (value2.Z - value1.Z) * amount;
332 result.W = value1.W + (value2.W - value1.W) * amount;
337 float num = amount * amount;
338 float num2 = amount * num;
340 result.X = 0.5f * (2f * value2.X + (0f - value1.X + value3.
X) * amount + (2f * value1.
X - 5f * value2.
X + 4f * value3.
X - value4.
X) * num + (0f - value1.X + 3f * value2.X - 3f * value3.X + value4.
X) * num2);
341 result.Y = 0.5f * (2f * value2.Y + (0f - value1.Y + value3.
Y) * amount + (2f * value1.
Y - 5f * value2.
Y + 4f * value3.
Y - value4.
Y) * num + (0f - value1.Y + 3f * value2.Y - 3f * value3.Y + value4.
Y) * num2);
342 result.Z = 0.5f * (2f * value2.Z + (0f - value1.Z + value3.
Z) * amount + (2f * value1.
Z - 5f * value2.
Z + 4f * value3.
Z - value4.
Z) * num + (0f - value1.Z + 3f * value2.Z - 3f * value3.Z + value4.
Z) * num2);
343 result.W = 0.5f * (2f * value2.W + (0f - value1.W + value3.
W) * amount + (2f * value1.
W - 5f * value2.
W + 4f * value3.
W - value4.
W) * num + (0f - value1.W + 3f * value2.W - 3f * value3.W + value4.
W) * num2);
349 float num = amount * amount;
350 float num2 = amount * num;
351 result.X = 0.5f * (2f * value2.X + (0f - value1.X + value3.X) * amount + (2f * value1.X - 5f * value2.X + 4f * value3.X - value4.X) * num + (0f - value1.X + 3f * value2.X - 3f * value3.X + value4.X) * num2);
352 result.Y = 0.5f * (2f * value2.Y + (0f - value1.Y + value3.Y) * amount + (2f * value1.Y - 5f * value2.Y + 4f * value3.Y - value4.Y) * num + (0f - value1.Y + 3f * value2.Y - 3f * value3.Y + value4.Y) * num2);
353 result.Z = 0.5f * (2f * value2.Z + (0f - value1.Z + value3.Z) * amount + (2f * value1.Z - 5f * value2.Z + 4f * value3.Z - value4.Z) * num + (0f - value1.Z + 3f * value2.Z - 3f * value3.Z + value4.Z) * num2);
354 result.W = 0.5f * (2f * value2.W + (0f - value1.W + value3.W) * amount + (2f * value1.W - 5f * value2.W + 4f * value3.W - value4.W) * num + (0f - value1.W + 3f * value2.W - 3f * value3.W + value4.W) * num2);
359 float num = amount * amount;
360 float num2 = amount * num;
361 float num3 = 2f * num2 - 3f * num + 1f;
362 float num4 = -2f * num2 + 3f * num;
363 float num5 = num2 - 2f * num + amount;
364 float num6 = num2 - num;
366 result.X = value1.X * num3 + value2.X * num4 + tangent1.X * num5 + tangent2.X * num6;
367 result.Y = value1.Y * num3 + value2.Y * num4 + tangent1.Y * num5 + tangent2.Y * num6;
368 result.Z = value1.Z * num3 + value2.Z * num4 + tangent1.Z * num5 + tangent2.Z * num6;
369 result.W = value1.W * num3 + value2.W * num4 + tangent1.W * num5 + tangent2.W * num6;
375 float num = amount * amount;
376 float num2 = amount * num;
377 float num3 = 2f * num2 - 3f * num + 1f;
378 float num4 = -2f * num2 + 3f * num;
379 float num5 = num2 - 2f * num + amount;
380 float num6 = num2 - num;
381 result.X = value1.X * num3 + value2.X * num4 + tangent1.X * num5 + tangent2.X * num6;
382 result.Y = value1.Y * num3 + value2.Y * num4 + tangent1.Y * num5 + tangent2.Y * num6;
383 result.Z = value1.Z * num3 + value2.Z * num4 + tangent1.Z * num5 + tangent2.Z * num6;
384 result.W = value1.W * num3 + value2.W * num4 + tangent1.W * num5 + tangent2.W * num6;
389 float x = position.X * matrix.M11 + position.Y * matrix.M21 + matrix.
M41;
390 float y = position.X * matrix.M12 + position.Y * matrix.M22 + matrix.
M42;
391 float z = position.X * matrix.M13 + position.Y * matrix.M23 + matrix.
M43;
392 float w = position.X * matrix.M14 + position.Y * matrix.M24 + matrix.
M44;
403 float x = position.X * matrix.M11 + position.Y * matrix.M21 + matrix.M41;
404 float y = position.X * matrix.M12 + position.Y * matrix.M22 + matrix.M42;
405 float z = position.X * matrix.M13 + position.Y * matrix.M23 + matrix.M43;
406 float w = position.X * matrix.M14 + position.Y * matrix.M24 + matrix.M44;
415 float x = position.X * matrix.M11 + position.Y * matrix.M21 + position.Z * matrix.M31 + matrix.
M41;
416 float y = position.X * matrix.M12 + position.Y * matrix.M22 + position.Z * matrix.M32 + matrix.
M42;
417 float z = position.X * matrix.M13 + position.Y * matrix.M23 + position.Z * matrix.M33 + matrix.
M43;
418 float w = position.X * matrix.M14 + position.Y * matrix.M24 + position.Z * matrix.M34 + matrix.
M44;
429 float x = position.X * matrix.M11 + position.Y * matrix.M21 + position.Z * matrix.M31 + matrix.M41;
430 float y = position.X * matrix.M12 + position.Y * matrix.M22 + position.Z * matrix.M32 + matrix.M42;
431 float z = position.X * matrix.M13 + position.Y * matrix.M23 + position.Z * matrix.M33 + matrix.M43;
432 float w = position.X * matrix.M14 + position.Y * matrix.M24 + position.Z * matrix.M34 + matrix.M44;
441 float x = vector.X * matrix.M11 + vector.Y * matrix.M21 + vector.Z * matrix.M31 + vector.W * matrix.
M41;
442 float y = vector.X * matrix.M12 + vector.Y * matrix.M22 + vector.Z * matrix.M32 + vector.W * matrix.
M42;
443 float z = vector.X * matrix.M13 + vector.Y * matrix.M23 + vector.Z * matrix.M33 + vector.W * matrix.
M43;
444 float w = vector.X * matrix.M14 + vector.Y * matrix.M24 + vector.Z * matrix.M34 + vector.W * matrix.
M44;
455 float x = vector.X * matrix.M11 + vector.Y * matrix.M21 + vector.Z * matrix.M31 + vector.W * matrix.M41;
456 float y = vector.X * matrix.M12 + vector.Y * matrix.M22 + vector.Z * matrix.M32 + vector.W * matrix.M42;
457 float z = vector.X * matrix.M13 + vector.Y * matrix.M23 + vector.Z * matrix.M33 + vector.W * matrix.M43;
458 float w = vector.X * matrix.M14 + vector.Y * matrix.M24 + vector.Z * matrix.M34 + vector.W * matrix.M44;
467 float num = rotation.X + rotation.
X;
468 float num2 = rotation.Y + rotation.
Y;
469 float num3 = rotation.Z + rotation.
Z;
470 float num4 = rotation.W * num;
471 float num5 = rotation.W * num2;
472 float num6 = rotation.W * num3;
473 float num7 = rotation.X * num;
474 float num8 = rotation.X * num2;
475 float num9 = rotation.X * num3;
476 float num10 = rotation.Y * num2;
477 float num11 = rotation.Y * num3;
478 float num12 = rotation.Z * num3;
479 float x = value.X * (1f - num10 - num12) +
value.Y * (num8 - num6);
480 float y = value.X * (num8 + num6) +
value.Y * (1f - num7 - num12);
481 float z = value.X * (num9 - num5) +
value.Y * (num11 + num4);
492 float num = rotation.X + rotation.X;
493 float num2 = rotation.Y + rotation.Y;
494 float num3 = rotation.Z + rotation.Z;
495 float num4 = rotation.W * num;
496 float num5 = rotation.W * num2;
497 float num6 = rotation.W * num3;
498 float num7 = rotation.X * num;
499 float num8 = rotation.X * num2;
500 float num9 = rotation.X * num3;
501 float num10 = rotation.Y * num2;
502 float num11 = rotation.Y * num3;
503 float num12 = rotation.Z * num3;
504 float x = value.X * (1f - num10 - num12) +
value.Y * (num8 - num6);
505 float y = value.X * (num8 + num6) +
value.Y * (1f - num7 - num12);
506 float z = value.X * (num9 - num5) +
value.Y * (num11 + num4);
515 float num = rotation.X + rotation.
X;
516 float num2 = rotation.Y + rotation.
Y;
517 float num3 = rotation.Z + rotation.
Z;
518 float num4 = rotation.W * num;
519 float num5 = rotation.W * num2;
520 float num6 = rotation.W * num3;
521 float num7 = rotation.X * num;
522 float num8 = rotation.X * num2;
523 float num9 = rotation.X * num3;
524 float num10 = rotation.Y * num2;
525 float num11 = rotation.Y * num3;
526 float num12 = rotation.Z * num3;
527 float x = value.X * (1f - num10 - num12) +
value.Y * (num8 - num6) + value.Z * (num9 + num5);
528 float y = value.X * (num8 + num6) +
value.Y * (1f - num7 - num12) + value.Z * (num11 - num4);
529 float z = value.X * (num9 - num5) +
value.Y * (num11 + num4) + value.Z * (1f - num7 - num10);
540 float num = rotation.X + rotation.X;
541 float num2 = rotation.Y + rotation.Y;
542 float num3 = rotation.Z + rotation.Z;
543 float num4 = rotation.W * num;
544 float num5 = rotation.W * num2;
545 float num6 = rotation.W * num3;
546 float num7 = rotation.X * num;
547 float num8 = rotation.X * num2;
548 float num9 = rotation.X * num3;
549 float num10 = rotation.Y * num2;
550 float num11 = rotation.Y * num3;
551 float num12 = rotation.Z * num3;
552 float x = value.X * (1f - num10 - num12) +
value.Y * (num8 - num6) + value.Z * (num9 + num5);
553 float y = value.X * (num8 + num6) +
value.Y * (1f - num7 - num12) + value.Z * (num11 - num4);
554 float z = value.X * (num9 - num5) +
value.Y * (num11 + num4) + value.Z * (1f - num7 - num10);
563 float num = rotation.X + rotation.
X;
564 float num2 = rotation.Y + rotation.
Y;
565 float num3 = rotation.Z + rotation.
Z;
566 float num4 = rotation.W * num;
567 float num5 = rotation.W * num2;
568 float num6 = rotation.W * num3;
569 float num7 = rotation.X * num;
570 float num8 = rotation.X * num2;
571 float num9 = rotation.X * num3;
572 float num10 = rotation.Y * num2;
573 float num11 = rotation.Y * num3;
574 float num12 = rotation.Z * num3;
575 float x = value.X * (1f - num10 - num12) +
value.Y * (num8 - num6) + value.Z * (num9 + num5);
576 float y = value.X * (num8 + num6) +
value.Y * (1f - num7 - num12) + value.Z * (num11 - num4);
577 float z = value.X * (num9 - num5) +
value.Y * (num11 + num4) + value.Z * (1f - num7 - num10);
588 float num = rotation.X + rotation.X;
589 float num2 = rotation.Y + rotation.Y;
590 float num3 = rotation.Z + rotation.Z;
591 float num4 = rotation.W * num;
592 float num5 = rotation.W * num2;
593 float num6 = rotation.W * num3;
594 float num7 = rotation.X * num;
595 float num8 = rotation.X * num2;
596 float num9 = rotation.X * num3;
597 float num10 = rotation.Y * num2;
598 float num11 = rotation.Y * num3;
599 float num12 = rotation.Z * num3;
600 float x = value.X * (1f - num10 - num12) +
value.Y * (num8 - num6) + value.Z * (num9 + num5);
601 float y = value.X * (num8 + num6) +
value.Y * (1f - num7 - num12) + value.Z * (num11 - num4);
602 float z = value.X * (num9 - num5) +
value.Y * (num11 + num4) + value.Z * (1f - num7 - num10);
629 destinationArray[i].X = x * matrix.M11 + y * matrix.M21 + z * matrix.M31 + w * matrix.M41;
630 destinationArray[i].Y = x * matrix.M12 + y * matrix.M22 + z * matrix.M32 + w * matrix.M42;
631 destinationArray[i].Z = x * matrix.M13 + y * matrix.M23 + z * matrix.M33 + w * matrix.M43;
632 destinationArray[i].W = x * matrix.M14 + y * matrix.M24 + z * matrix.M34 + w * matrix.M44;
636 [SuppressMessage(
"Microsoft.Usage",
"CA2233")]
685 float num = rotation.X + rotation.X;
686 float num2 = rotation.Y + rotation.Y;
687 float num3 = rotation.Z + rotation.Z;
688 float num4 = rotation.W * num;
689 float num5 = rotation.W * num2;
690 float num6 = rotation.W * num3;
691 float num7 = rotation.X * num;
692 float num8 = rotation.X * num2;
693 float num9 = rotation.X * num3;
694 float num10 = rotation.Y * num2;
695 float num11 = rotation.Y * num3;
696 float num12 = rotation.Z * num3;
697 float num13 = 1f - num10 - num12;
698 float num14 = num8 - num6;
699 float num15 = num9 + num5;
700 float num16 = num8 + num6;
701 float num17 = 1f - num7 - num12;
702 float num18 = num11 - num4;
703 float num19 = num9 - num5;
704 float num20 = num11 + num4;
705 float num21 = 1f - num7 - num10;
718 [SuppressMessage(
"Microsoft.Usage",
"CA2233")]
737 float num = rotation.X + rotation.X;
738 float num2 = rotation.Y + rotation.Y;
739 float num3 = rotation.Z + rotation.Z;
740 float num4 = rotation.W * num;
741 float num5 = rotation.W * num2;
742 float num6 = rotation.W * num3;
743 float num7 = rotation.X * num;
744 float num8 = rotation.X * num2;
745 float num9 = rotation.X * num3;
746 float num10 = rotation.Y * num2;
747 float num11 = rotation.Y * num3;
748 float num12 = rotation.Z * num3;
749 float num13 = 1f - num10 - num12;
750 float num14 = num8 - num6;
751 float num15 = num9 + num5;
752 float num16 = num8 + num6;
753 float num17 = 1f - num7 - num12;
754 float num18 = num11 - num4;
755 float num19 = num9 - num5;
756 float num20 = num11 + num4;
757 float num21 = 1f - num7 - num10;
778 result.Y = 0f -
value.Y;
779 result.Z = 0f -
value.Z;
780 result.W = 0f -
value.W;
786 result.X = 0f -
value.X;
787 result.Y = 0f -
value.Y;
788 result.Z = 0f -
value.Z;
789 result.W = 0f -
value.W;
795 result.X = value1.X + value2.
X;
796 result.Y = value1.Y + value2.
Y;
797 result.Z = value1.Z + value2.
Z;
798 result.W = value1.W + value2.
W;
804 result.X = value1.X + value2.X;
805 result.Y = value1.Y + value2.Y;
806 result.Z = value1.Z + value2.Z;
807 result.W = value1.W + value2.W;
813 result.X = value1.X - value2.
X;
814 result.Y = value1.Y - value2.
Y;
815 result.Z = value1.Z - value2.
Z;
816 result.W = value1.W - value2.
W;
822 result.X = value1.X - value2.X;
823 result.Y = value1.Y - value2.Y;
824 result.Z = value1.Z - value2.Z;
825 result.W = value1.W - value2.W;
831 result.X = value1.X * value2.
X;
832 result.Y = value1.Y * value2.
Y;
833 result.Z = value1.Z * value2.
Z;
834 result.W = value1.W * value2.
W;
840 result.X = value1.X * value2.X;
841 result.Y = value1.Y * value2.Y;
842 result.Z = value1.Z * value2.Z;
843 result.W = value1.W * value2.W;
849 result.X = value1.X * scaleFactor;
850 result.Y = value1.Y * scaleFactor;
851 result.Z = value1.Z * scaleFactor;
852 result.W = value1.W * scaleFactor;
858 result.X = value1.X * scaleFactor;
859 result.Y = value1.Y * scaleFactor;
860 result.Z = value1.Z * scaleFactor;
861 result.W = value1.W * scaleFactor;
867 result.X = value1.X / value2.
X;
868 result.Y = value1.Y / value2.
Y;
869 result.Z = value1.Z / value2.
Z;
870 result.W = value1.W / value2.
W;
876 result.X = value1.X / value2.X;
877 result.Y = value1.Y / value2.Y;
878 result.Z = value1.Z / value2.Z;
879 result.W = value1.W / value2.W;
884 float num = 1f / divider;
886 result.X = value1.X * num;
887 result.Y = value1.Y * num;
888 result.Z = value1.Z * num;
889 result.W = value1.W * num;
895 float num = 1f / divider;
896 result.X = value1.X * num;
897 result.Y = value1.Y * num;
898 result.Z = value1.Z * num;
899 result.W = value1.W * num;
906 result.Y = 0f -
value.Y;
907 result.Z = 0f -
value.Z;
908 result.W = 0f -
value.W;
914 if (value1.
X == value2.
X && value1.
Y == value2.
Y && value1.
Z == value2.
Z)
916 return value1.W == value2.
W;
923 if (value1.
X == value2.
X && value1.
Y == value2.
Y && value1.
Z == value2.
Z)
925 return value1.W != value2.
W;
933 result.X = value1.X + value2.
X;
934 result.Y = value1.Y + value2.
Y;
935 result.Z = value1.Z + value2.
Z;
936 result.W = value1.W + value2.
W;
943 result.X = value1.X - value2.
X;
944 result.Y = value1.Y - value2.
Y;
945 result.Z = value1.Z - value2.
Z;
946 result.W = value1.W - value2.
W;
953 result.X = value1.X * value2.
X;
954 result.Y = value1.Y * value2.
Y;
955 result.Z = value1.Z * value2.
Z;
956 result.W = value1.W * value2.
W;
963 result.X = value1.X * scaleFactor;
964 result.Y = value1.Y * scaleFactor;
965 result.Z = value1.Z * scaleFactor;
966 result.W = value1.W * scaleFactor;
973 result.X = value1.X * scaleFactor;
974 result.Y = value1.Y * scaleFactor;
975 result.Z = value1.Z * scaleFactor;
976 result.W = value1.W * scaleFactor;
983 result.X = value1.X / value2.
X;
984 result.Y = value1.Y / value2.
Y;
985 result.Z = value1.Z / value2.
Z;
986 result.W = value1.W / value2.
W;
992 float num = 1f / divider;
994 result.X = value1.X * num;
995 result.Y = value1.Y * num;
996 result.Z = value1.Z * num;
997 result.W = value1.W * num;
static string NotEnoughSourceSize
static string NotEnoughTargetSize
static CultureInfo CurrentCulture
static double Sqrt(double d)
static float Distance(Vector4 value1, Vector4 value2)
static void Transform(ref Vector4 value, ref Quaternion rotation, out Vector4 result)
override bool Equals(object obj)
static float Dot(Vector4 vector1, Vector4 vector2)
static void Divide(ref Vector4 value1, float divider, out Vector4 result)
static void SmoothStep(ref Vector4 value1, ref Vector4 value2, float amount, out Vector4 result)
static void Lerp(ref Vector4 value1, ref Vector4 value2, float amount, out Vector4 result)
static Vector4 operator-(Vector4 value)
static void Transform(ref Vector3 position, ref Matrix matrix, out Vector4 result)
static Vector4 Transform(Vector3 value, Quaternion rotation)
override int GetHashCode()
Vector4(Vector2 value, float z, float w)
static Vector4 Transform(Vector4 vector, Matrix matrix)
static Vector4 Transform(Vector3 position, Matrix matrix)
static void DistanceSquared(ref Vector4 value1, ref Vector4 value2, out float result)
static Vector4 Transform(Vector4 value, Quaternion rotation)
static void Barycentric(ref Vector4 value1, ref Vector4 value2, ref Vector4 value3, float amount1, float amount2, out Vector4 result)
static void Transform(Vector4[] sourceArray, int sourceIndex, ref Quaternion rotation, Vector4[] destinationArray, int destinationIndex, int length)
static Vector4 Divide(Vector4 value1, Vector4 value2)
static void Dot(ref Vector4 vector1, ref Vector4 vector2, out float result)
static bool operator!=(Vector4 value1, Vector4 value2)
static Vector4 Normalize(Vector4 vector)
static void Transform(Vector4[] sourceArray, ref Quaternion rotation, Vector4[] destinationArray)
static Vector4 Transform(Vector2 value, Quaternion rotation)
static Vector4 Transform(Vector2 position, Matrix matrix)
static Vector4 Min(Vector4 value1, Vector4 value2)
static Vector4 Divide(Vector4 value1, float divider)
static Vector4 Subtract(Vector4 value1, Vector4 value2)
static void Divide(ref Vector4 value1, ref Vector4 value2, out Vector4 result)
bool Equals(Vector4 other)
static void Normalize(ref Vector4 vector, out Vector4 result)
static void CatmullRom(ref Vector4 value1, ref Vector4 value2, ref Vector4 value3, ref Vector4 value4, float amount, out Vector4 result)
static Vector4 Add(Vector4 value1, Vector4 value2)
static Vector4 CatmullRom(Vector4 value1, Vector4 value2, Vector4 value3, Vector4 value4, float amount)
static void Multiply(ref Vector4 value1, float scaleFactor, out Vector4 result)
static Vector4 Lerp(Vector4 value1, Vector4 value2, float amount)
static Vector4 SmoothStep(Vector4 value1, Vector4 value2, float amount)
static Vector4 operator+(Vector4 value1, Vector4 value2)
static Vector4 Barycentric(Vector4 value1, Vector4 value2, Vector4 value3, float amount1, float amount2)
static void Subtract(ref Vector4 value1, ref Vector4 value2, out Vector4 result)
static void Max(ref Vector4 value1, ref Vector4 value2, out Vector4 result)
Vector4(Vector3 value, float w)
static void Negate(ref Vector4 value, out Vector4 result)
static void Hermite(ref Vector4 value1, ref Vector4 tangent1, ref Vector4 value2, ref Vector4 tangent2, float amount, out Vector4 result)
static void Transform(Vector4[] sourceArray, ref Matrix matrix, Vector4[] destinationArray)
static void Transform(ref Vector2 value, ref Quaternion rotation, out Vector4 result)
static void Min(ref Vector4 value1, ref Vector4 value2, out Vector4 result)
static void Add(ref Vector4 value1, ref Vector4 value2, out Vector4 result)
static void Transform(ref Vector4 vector, ref Matrix matrix, out Vector4 result)
static Vector4 operator/(Vector4 value1, Vector4 value2)
static void Distance(ref Vector4 value1, ref Vector4 value2, out float result)
static void Clamp(ref Vector4 value1, ref Vector4 min, ref Vector4 max, out Vector4 result)
static Vector4 Max(Vector4 value1, Vector4 value2)
static Vector4 Multiply(Vector4 value1, float scaleFactor)
override string ToString()
static void Transform(ref Vector3 value, ref Quaternion rotation, out Vector4 result)
static void Transform(ref Vector2 position, ref Matrix matrix, out Vector4 result)
static float DistanceSquared(Vector4 value1, Vector4 value2)
static Vector4 Negate(Vector4 value)
Vector4(float x, float y, float z, float w)
static bool operator==(Vector4 value1, Vector4 value2)
static void Multiply(ref Vector4 value1, ref Vector4 value2, out Vector4 result)
static Vector4 Multiply(Vector4 value1, Vector4 value2)
static void Transform(Vector4[] sourceArray, int sourceIndex, ref Matrix matrix, Vector4[] destinationArray, int destinationIndex, int length)
static Vector4 Clamp(Vector4 value1, Vector4 min, Vector4 max)
static Vector4 Hermite(Vector4 value1, Vector4 tangent1, Vector4 value2, Vector4 tangent2, float amount)
static Vector4 operator*(Vector4 value1, Vector4 value2)