39 instantiations of Vector3
System.Numerics (39)
System\Numerics\Matrix4x4.cs (12)
121
return new
Vector3
(M41, M42, M43);
196
Vector3 zaxis = new
Vector3
(
254
Vector3 faceDir = new
Vector3
(
286
zaxis = (Math.Abs(rotateAxis.Z) > minAngle) ? new
Vector3
(1, 0, 0) : new
Vector3
(0, 0, -1);
1512
canonicalBasis.Row0 = new
Vector3
(1.0f, 0.0f, 0.0f);
1513
canonicalBasis.Row1 = new
Vector3
(0.0f, 1.0f, 0.0f);
1514
canonicalBasis.Row2 = new
Vector3
(0.0f, 0.0f, 1.0f);
1516
translation = new
Vector3
(
1525
*(pVectorBasis[0]) = new
Vector3
(matrix.M11, matrix.M12, matrix.M13);
1526
*(pVectorBasis[1]) = new
Vector3
(matrix.M21, matrix.M22, matrix.M23);
1527
*(pVectorBasis[2]) = new
Vector3
(matrix.M31, matrix.M32, matrix.M33);
System\Numerics\Plane.cs (3)
32
Normal = new
Vector3
(x, y, z);
54
Normal = new
Vector3
(value.X, value.Y, value.Z);
101
Vector3 normal = new
Vector3
(
System\Numerics\Vector3.cs (13)
19
public static Vector3 Zero { get { return new
Vector3
(); } }
23
public static Vector3 One { get { return new
Vector3
(1.0f, 1.0f, 1.0f); } }
27
public static Vector3 UnitX { get { return new
Vector3
(1.0f, 0.0f, 0.0f); } }
31
public static Vector3 UnitY { get { return new
Vector3
(0.0f, 1.0f, 0.0f); } }
35
public static Vector3 UnitZ { get { return new
Vector3
(0.0f, 0.0f, 1.0f); } }
213
return new
Vector3
(value.X / length, value.Y / length, value.Z / length);
226
return new
Vector3
(
253
return new
Vector3
(vector.X - tempX, vector.Y - tempY, vector.Z - tempZ);
282
return new
Vector3
(x, y, z);
303
return new
Vector3
(
319
return new
Vector3
(
334
return new
Vector3
(
363
return new
Vector3
(
System\Numerics\Vector3_Intrinsics.cs (11)
137
return new
Vector3
(
153
return new
Vector3
(
168
return new
Vector3
(Math.Abs(value.X), Math.Abs(value.Y), Math.Abs(value.Z));
180
return new
Vector3
((Single)Math.Sqrt(value.X), (Single)Math.Sqrt(value.Y), (Single)Math.Sqrt(value.Z));
195
return new
Vector3
(left.X + right.X, left.Y + right.Y, left.Z + right.Z);
208
return new
Vector3
(left.X - right.X, left.Y - right.Y, left.Z - right.Z);
221
return new
Vector3
(left.X * right.X, left.Y * right.Y, left.Z * right.Z);
234
return left * new
Vector3
(right);
247
return new
Vector3
(left) * right;
260
return new
Vector3
(left.X / right.X, left.Y / right.Y, left.Z / right.Z);
275
return new
Vector3
(
208 references to Vector3
System.Numerics (208)
System\Numerics\Matrix4x4.cs (86)
117
public
Vector3
Translation
192
public static Matrix4x4 CreateBillboard(
Vector3
objectPosition,
Vector3
cameraPosition,
Vector3
cameraUpVector,
Vector3
cameraForwardVector)
196
Vector3
zaxis = new Vector3(
209
zaxis =
Vector3
.Multiply(zaxis, 1.0f / (float)Math.Sqrt(norm));
212
Vector3
xaxis =
Vector3
.Normalize(
Vector3
.Cross(cameraUpVector, zaxis));
214
Vector3
yaxis =
Vector3
.Cross(zaxis, xaxis);
248
public static Matrix4x4 CreateConstrainedBillboard(
Vector3
objectPosition,
Vector3
cameraPosition,
Vector3
rotateAxis,
Vector3
cameraForwardVector,
Vector3
objectForwardVector)
254
Vector3
faceDir = new Vector3(
267
faceDir =
Vector3
.Multiply(faceDir, (1.0f / (float)Math.Sqrt(norm)));
270
Vector3
yaxis = rotateAxis;
271
Vector3
xaxis;
272
Vector3
zaxis;
275
float dot =
Vector3
.Dot(rotateAxis, faceDir);
282
dot =
Vector3
.Dot(rotateAxis, zaxis);
289
xaxis =
Vector3
.Normalize(
Vector3
.Cross(rotateAxis, zaxis));
290
zaxis =
Vector3
.Normalize(
Vector3
.Cross(xaxis, rotateAxis));
294
xaxis =
Vector3
.Normalize(
Vector3
.Cross(rotateAxis, faceDir));
295
zaxis =
Vector3
.Normalize(
Vector3
.Cross(xaxis, yaxis));
326
public static Matrix4x4 CreateTranslation(
Vector3
position)
422
public static Matrix4x4 CreateScale(float xScale, float yScale, float zScale,
Vector3
centerPoint)
455
public static Matrix4x4 CreateScale(
Vector3
scales)
485
public static Matrix4x4 CreateScale(
Vector3
scales,
Vector3
centerPoint)
548
public static Matrix4x4 CreateScale(float scale,
Vector3
centerPoint)
618
public static Matrix4x4 CreateRotationX(float radians,
Vector3
centerPoint)
694
public static Matrix4x4 CreateRotationY(float radians,
Vector3
centerPoint)
770
public static Matrix4x4 CreateRotationZ(float radians,
Vector3
centerPoint)
810
public static Matrix4x4 CreateFromAxisAngle(
Vector3
axis, float angle)
1050
public static Matrix4x4 CreateLookAt(
Vector3
cameraPosition,
Vector3
cameraTarget,
Vector3
cameraUpVector)
1052
Vector3
zaxis =
Vector3
.Normalize(cameraPosition - cameraTarget);
1053
Vector3
xaxis =
Vector3
.Normalize(
Vector3
.Cross(cameraUpVector, zaxis));
1054
Vector3
yaxis =
Vector3
.Cross(zaxis, xaxis);
1070
result.M41 = -
Vector3
.Dot(xaxis, cameraPosition);
1071
result.M42 = -
Vector3
.Dot(yaxis, cameraPosition);
1072
result.M43 = -
Vector3
.Dot(zaxis, cameraPosition);
1085
public static Matrix4x4 CreateWorld(
Vector3
position,
Vector3
forward,
Vector3
up)
1087
Vector3
zaxis =
Vector3
.Normalize(-forward);
1088
Vector3
xaxis =
Vector3
.Normalize(
Vector3
.Cross(up, zaxis));
1089
Vector3
yaxis =
Vector3
.Cross(zaxis, xaxis);
1173
public static Matrix4x4 CreateShadow(
Vector3
lightDirection, Plane plane)
1470
public
Vector3
Row0;
1471
public
Vector3
Row1;
1472
public
Vector3
Row2;
1478
public unsafe
Vector3
* Element0;
1479
public unsafe
Vector3
* Element1;
1480
public unsafe
Vector3
* Element2;
1493
public static bool Decompose(Matrix4x4 matrix, out
Vector3
scale, out Quaternion rotation, out
Vector3
translation)
1499
fixed (
Vector3
* scaleBase = &scale)
1506
Vector3
** pVectorBasis = (
Vector3
**)&vectorBasis;
1510
Vector3
* pCanonicalBasis = &canonicalBasis.Row0;
1521
pVectorBasis[0] = (
Vector3
*)&matTemp.M11;
1522
pVectorBasis[1] = (
Vector3
*)&matTemp.M21;
1523
pVectorBasis[2] = (
Vector3
*)&matTemp.M31;
1591
*pVectorBasis[a] =
Vector3
.Normalize(*pVectorBasis[a]);
1641
*pVectorBasis[b] =
Vector3
.Cross(*pVectorBasis[a], *(pCanonicalBasis + cc));
1644
*pVectorBasis[b] =
Vector3
.Normalize(*pVectorBasis[b]);
1648
*pVectorBasis[c] =
Vector3
.Cross(*pVectorBasis[a], *pVectorBasis[b]);
1651
*pVectorBasis[c] =
Vector3
.Normalize(*pVectorBasis[c]);
System\Numerics\Plane.cs (17)
17
public
Vector3
Normal;
41
public Plane(
Vector3
normal, float d)
66
public static Plane CreateFromVertices(
Vector3
point1,
Vector3
point2,
Vector3
point3)
70
Vector3
a = point2 - point1;
71
Vector3
b = point3 - point1;
74
Vector3
n =
Vector3
.Cross(a, b);
75
Vector3
normal =
Vector3
.Normalize(n);
78
float d = -
Vector3
.Dot(normal, point1);
101
Vector3
normal = new Vector3(
243
public static float DotCoordinate(Plane plane,
Vector3
value)
247
return
Vector3
.Dot(plane.Normal, value) + plane.D;
265
public static float DotNormal(Plane plane,
Vector3
value)
269
return
Vector3
.Dot(plane.Normal, value);
System\Numerics\Quaternion.cs (2)
67
public Quaternion(
Vector3
vectorPart, float scalarPart)
163
public static Quaternion CreateFromAxisAngle(
Vector3
axis, float angle)
System\Numerics\Vector3.cs (63)
13
public partial struct Vector3 : IEquatable<
Vector3
>, IFormattable
19
public static
Vector3
Zero { get { return new Vector3(); } }
23
public static
Vector3
One { get { return new Vector3(1.0f, 1.0f, 1.0f); } }
27
public static
Vector3
UnitX { get { return new Vector3(1.0f, 0.0f, 0.0f); } }
31
public static
Vector3
UnitY { get { return new Vector3(0.0f, 1.0f, 0.0f); } }
35
public static
Vector3
UnitZ { get { return new Vector3(0.0f, 0.0f, 1.0f); } }
60
if (!(obj is
Vector3
))
62
return Equals((
Vector3
)obj);
116
float ls =
Vector3
.Dot(this, this);
135
return
Vector3
.Dot(this, this);
152
public static float Distance(
Vector3
value1,
Vector3
value2)
156
Vector3
difference = value1 - value2;
157
float ls =
Vector3
.Dot(difference, difference);
179
public static float DistanceSquared(
Vector3
value1,
Vector3
value2)
183
Vector3
difference = value1 - value2;
184
return
Vector3
.Dot(difference, difference);
202
public static
Vector3
Normalize(
Vector3
value)
224
public static
Vector3
Cross(
Vector3
vector1,
Vector3
vector2)
239
public static
Vector3
Reflect(
Vector3
vector,
Vector3
normal)
243
float dot =
Vector3
.Dot(vector, normal);
244
Vector3
temp = normal * dot * 2f;
265
public static
Vector3
Clamp(
Vector3
value1,
Vector3
min,
Vector3
max)
293
public static
Vector3
Lerp(
Vector3
value1,
Vector3
value2, float amount)
297
Vector3
firstInfluence = value1 * (1f - amount);
298
Vector3
secondInfluence = value2 * amount;
317
public static
Vector3
Transform(
Vector3
position, Matrix4x4 matrix)
332
public static
Vector3
TransformNormal(
Vector3
normal, Matrix4x4 matrix)
347
public static
Vector3
Transform(
Vector3
value, Quaternion rotation)
382
public static
Vector3
Add(
Vector3
left,
Vector3
right)
394
public static
Vector3
Subtract(
Vector3
left,
Vector3
right)
406
public static
Vector3
Multiply(
Vector3
left,
Vector3
right)
418
public static
Vector3
Multiply(
Vector3
left, Single right)
430
public static
Vector3
Multiply(Single left,
Vector3
right)
442
public static
Vector3
Divide(
Vector3
left,
Vector3
right)
454
public static
Vector3
Divide(
Vector3
left, Single divisor)
465
public static
Vector3
Negate(
Vector3
value)
System\Numerics\Vector3_Intrinsics.cs (37)
104
public bool Equals(
Vector3
other)
121
public static float Dot(
Vector3
vector1,
Vector3
vector2)
135
public static
Vector3
Min(
Vector3
value1,
Vector3
value2)
151
public static
Vector3
Max(
Vector3
value1,
Vector3
value2)
166
public static
Vector3
Abs(
Vector3
value)
178
public static
Vector3
SquareRoot(
Vector3
value)
193
public static
Vector3
operator +(
Vector3
left,
Vector3
right)
206
public static
Vector3
operator -(
Vector3
left,
Vector3
right)
219
public static
Vector3
operator *(
Vector3
left,
Vector3
right)
232
public static
Vector3
operator *(
Vector3
left, Single right)
245
public static
Vector3
operator *(Single left,
Vector3
right)
258
public static
Vector3
operator /(
Vector3
left,
Vector3
right)
271
public static
Vector3
operator /(
Vector3
value1, float value2)
287
public static
Vector3
operator -(
Vector3
value)
300
public static bool operator ==(
Vector3
left,
Vector3
right)
314
public static bool operator !=(
Vector3
left,
Vector3
right)
System\Numerics\Vector4.cs (2)
304
public static Vector4 Transform(
Vector3
position, Matrix4x4 matrix)
366
public static Vector4 Transform(
Vector3
value, Quaternion rotation)
System\Numerics\Vector4_Intrinsics.cs (1)
78
public Vector4(
Vector3
value, Single w)