Shift
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Pages
Shift.Vector3 Struct Reference

Describes a 3D-vector. More...

Inheritance diagram for Shift.Vector3:

Public Member Functions

 Vector3 (float x, float y, float z)
 Constructs a 3d vector with X, Y and Z from three values. More...
 
 Vector3 (float value)
 Constructs a 3d vector with X, Y and Z set to the same value. More...
 
 Vector3 (Vector2 value, float z)
 Constructs a 3d vector with X, Y from Vector2 and Z from a scalar. More...
 
override bool Equals (object obj)
 Compares whether current instance is equal to specified Object. More...
 
bool Equals (Vector3 other)
 Compares whether current instance is equal to specified Vector3. More...
 
override int GetHashCode ()
 Gets the hash code of this Vector3. More...
 
float Length ()
 Returns the length of this Vector3. More...
 
float LengthSquared ()
 Returns the squared length of this Vector3. More...
 
void Normalize ()
 Turns this Vector3 to a unit vector with the same direction. More...
 
override string ToString ()
 Returns a String representation of this Vector3 in the format: {X:[X] Y:[Y] Z:[Z]} More...
 

Static Public Member Functions

static Vector3 Add (Vector3 value1, Vector3 value2)
 Performs vector addition on value1 and value2 . More...
 
static void Add (ref Vector3 value1, ref Vector3 value2, out Vector3 result)
 Performs vector addition on value1 and value2 , storing the result of the addition in result . More...
 
static Vector3 Barycentric (Vector3 value1, Vector3 value2, Vector3 value3, float amount1, float amount2)
 Creates a new Vector3 that contains the cartesian coordinates of a vector specified in barycentric coordinates and relative to 3d-triangle. More...
 
static void Barycentric (ref Vector3 value1, ref Vector3 value2, ref Vector3 value3, float amount1, float amount2, out Vector3 result)
 Creates a new Vector3 that contains the cartesian coordinates of a vector specified in barycentric coordinates and relative to 3d-triangle. More...
 
static Vector3 CatmullRom (Vector3 value1, Vector3 value2, Vector3 value3, Vector3 value4, float amount)
 Creates a new Vector3 that contains CatmullRom interpolation of the specified vectors. More...
 
static void CatmullRom (ref Vector3 value1, ref Vector3 value2, ref Vector3 value3, ref Vector3 value4, float amount, out Vector3 result)
 Creates a new Vector3 that contains CatmullRom interpolation of the specified vectors. More...
 
static Vector3 Clamp (Vector3 value1, Vector3 min, Vector3 max)
 Clamps the specified value within a range. More...
 
static void Clamp (ref Vector3 value1, ref Vector3 min, ref Vector3 max, out Vector3 result)
 Clamps the specified value within a range. More...
 
static Vector3 Cross (Vector3 vector1, Vector3 vector2)
 Computes the cross product of two vectors. More...
 
static void Cross (ref Vector3 vector1, ref Vector3 vector2, out Vector3 result)
 Computes the cross product of two vectors. More...
 
static float Distance (Vector3 value1, Vector3 value2)
 Returns the distance between two vectors. More...
 
static void Distance (ref Vector3 value1, ref Vector3 value2, out float result)
 Returns the distance between two vectors. More...
 
static float DistanceSquared (Vector3 value1, Vector3 value2)
 Returns the squared distance between two vectors. More...
 
static void DistanceSquared (ref Vector3 value1, ref Vector3 value2, out float result)
 Returns the squared distance between two vectors. More...
 
static Vector3 Divide (Vector3 value1, Vector3 value2)
 Divides the components of a Vector3 by the components of another Vector3. More...
 
static Vector3 Divide (Vector3 value1, float divider)
 Divides the components of a Vector3 by a scalar. More...
 
static void Divide (ref Vector3 value1, float divider, out Vector3 result)
 Divides the components of a Vector3 by a scalar. More...
 
static void Divide (ref Vector3 value1, ref Vector3 value2, out Vector3 result)
 Divides the components of a Vector3 by the components of another Vector3. More...
 
static float Dot (Vector3 value1, Vector3 value2)
 Returns a dot product of two vectors. More...
 
static void Dot (ref Vector3 value1, ref Vector3 value2, out float result)
 Returns a dot product of two vectors. More...
 
static Vector3 Hermite (Vector3 value1, Vector3 tangent1, Vector3 value2, Vector3 tangent2, float amount)
 Creates a new Vector3 that contains hermite spline interpolation. More...
 
static void Hermite (ref Vector3 value1, ref Vector3 tangent1, ref Vector3 value2, ref Vector3 tangent2, float amount, out Vector3 result)
 Creates a new Vector3 that contains hermite spline interpolation. More...
 
static Vector3 Lerp (Vector3 value1, Vector3 value2, float amount)
 Creates a new Vector3 that contains linear interpolation of the specified vectors. More...
 
static void Lerp (ref Vector3 value1, ref Vector3 value2, float amount, out Vector3 result)
 Creates a new Vector3 that contains linear interpolation of the specified vectors. More...
 
static Vector3 LerpPrecise (Vector3 value1, Vector3 value2, float amount)
 Creates a new Vector3 that contains linear interpolation of the specified vectors. Uses MathHelper.LerpPrecise on MathHelper for the interpolation. Less efficient but more precise compared to Vector3.Lerp(Vector3, Vector3, float). See remarks section of MathHelper.LerpPrecise on MathHelper for more info. More...
 
static void LerpPrecise (ref Vector3 value1, ref Vector3 value2, float amount, out Vector3 result)
 Creates a new Vector3 that contains linear interpolation of the specified vectors. Uses MathHelper.LerpPrecise on MathHelper for the interpolation. Less efficient but more precise compared to Vector3.Lerp(ref Vector3, ref Vector3, float, out Vector3). See remarks section of MathHelper.LerpPrecise on MathHelper for more info. More...
 
static Vector3 Max (Vector3 value1, Vector3 value2)
 Creates a new Vector3 that contains a maximal values from the two vectors. More...
 
static void Max (ref Vector3 value1, ref Vector3 value2, out Vector3 result)
 Creates a new Vector3 that contains a maximal values from the two vectors. More...
 
static Vector3 Min (Vector3 value1, Vector3 value2)
 Creates a new Vector3 that contains a minimal values from the two vectors. More...
 
static void Min (ref Vector3 value1, ref Vector3 value2, out Vector3 result)
 Creates a new Vector3 that contains a minimal values from the two vectors. More...
 
static Vector3 Multiply (Vector3 value1, Vector3 value2)
 Creates a new Vector3 that contains a multiplication of two vectors. More...
 
static Vector3 Multiply (Vector3 value1, float scaleFactor)
 Creates a new Vector3 that contains a multiplication of Vector3 and a scalar. More...
 
static void Multiply (ref Vector3 value1, float scaleFactor, out Vector3 result)
 Creates a new Vector3 that contains a multiplication of Vector3 and a scalar. More...
 
static void Multiply (ref Vector3 value1, ref Vector3 value2, out Vector3 result)
 Creates a new Vector3 that contains a multiplication of two vectors. More...
 
static Vector3 Negate (Vector3 value)
 Creates a new Vector3 that contains the specified vector inversion. More...
 
static void Negate (ref Vector3 value, out Vector3 result)
 Creates a new Vector3 that contains the specified vector inversion. More...
 
static Vector3 Normalize (Vector3 value)
 Creates a new Vector3 that contains a normalized values from another vector. More...
 
static void Normalize (ref Vector3 value, out Vector3 result)
 Creates a new Vector3 that contains a normalized values from another vector. More...
 
static Vector3 Reflect (Vector3 vector, Vector3 normal)
 Creates a new Vector3 that contains reflect vector of the given vector and normal. More...
 
static void Reflect (ref Vector3 vector, ref Vector3 normal, out Vector3 result)
 Creates a new Vector3 that contains reflect vector of the given vector and normal. More...
 
static Vector3 SmoothStep (Vector3 value1, Vector3 value2, float amount)
 Creates a new Vector3 that contains cubic interpolation of the specified vectors. More...
 
static void SmoothStep (ref Vector3 value1, ref Vector3 value2, float amount, out Vector3 result)
 Creates a new Vector3 that contains cubic interpolation of the specified vectors. More...
 
static Vector3 Subtract (Vector3 value1, Vector3 value2)
 Creates a new Vector3 that contains subtraction of on Vector3 from a another. More...
 
static void Subtract (ref Vector3 value1, ref Vector3 value2, out Vector3 result)
 Creates a new Vector3 that contains subtraction of on Vector3 from a another. More...
 
static Vector3 Transform (Vector3 position, Matrix matrix)
 Creates a new Vector3 that contains a transformation of 3d-vector by the specified Matrix. More...
 
static void Transform (ref Vector3 position, ref Matrix matrix, out Vector3 result)
 Creates a new Vector3 that contains a transformation of 3d-vector by the specified Matrix. More...
 
static Vector3 Transform (Vector3 value, Quaternion rotation)
 Creates a new Vector3 that contains a transformation of 3d-vector by the specified Quaternion, representing the rotation. More...
 
static void Transform (ref Vector3 value, ref Quaternion rotation, out Vector3 result)
 Creates a new Vector3 that contains a transformation of 3d-vector by the specified Quaternion, representing the rotation. More...
 
static void Transform (Vector3[] sourceArray, int sourceIndex, ref Matrix matrix, Vector3[] destinationArray, int destinationIndex, int length)
 Apply transformation on vectors within array of Vector3 by the specified Matrix and places the results in an another array. More...
 
static void Transform (Vector3[] sourceArray, int sourceIndex, ref Quaternion rotation, Vector3[] destinationArray, int destinationIndex, int length)
 Apply transformation on vectors within array of Vector3 by the specified Quaternion and places the results in an another array. More...
 
static void Transform (Vector3[] sourceArray, ref Matrix matrix, Vector3[] destinationArray)
 Apply transformation on all vectors within array of Vector3 by the specified Matrix and places the results in an another array. More...
 
static void Transform (Vector3[] sourceArray, ref Quaternion rotation, Vector3[] destinationArray)
 Apply transformation on all vectors within array of Vector3 by the specified Quaternion and places the results in an another array. More...
 
static Vector3 TransformNormal (Vector3 normal, Matrix matrix)
 Creates a new Vector3 that contains a transformation of the specified normal by the specified Matrix. More...
 
static void TransformNormal (ref Vector3 normal, ref Matrix matrix, out Vector3 result)
 Creates a new Vector3 that contains a transformation of the specified normal by the specified Matrix. More...
 
static void TransformNormal (Vector3[] sourceArray, int sourceIndex, ref Matrix matrix, Vector3[] destinationArray, int destinationIndex, int length)
 Apply transformation on normals within array of Vector3 by the specified Matrix and places the results in an another array. More...
 
static void TransformNormal (Vector3[] sourceArray, ref Matrix matrix, Vector3[] destinationArray)
 Apply transformation on all normals within array of Vector3 by the specified Matrix and places the results in an another array. More...
 
static bool operator== (Vector3 value1, Vector3 value2)
 Compares whether two Vector3 instances are equal. More...
 
static bool operator!= (Vector3 value1, Vector3 value2)
 Compares whether two Vector3 instances are not equal. More...
 
static Vector3 operator+ (Vector3 value1, Vector3 value2)
 Adds two vectors. More...
 
static Vector3 operator- (Vector3 value)
 Inverts values in the specified Vector3. More...
 
static Vector3 operator- (Vector3 value1, Vector3 value2)
 Subtracts a Vector3 from a Vector3. More...
 
static Vector3 operator* (Vector3 value1, Vector3 value2)
 Multiplies the components of two vectors by each other. More...
 
static Vector3 operator* (Vector3 value, float scaleFactor)
 Multiplies the components of vector by a scalar. More...
 
static Vector3 operator* (float scaleFactor, Vector3 value)
 Multiplies the components of vector by a scalar. More...
 
static Vector3 operator/ (Vector3 value1, Vector3 value2)
 Divides the components of a Vector3 by the components of another Vector3. More...
 
static Vector3 operator/ (Vector3 value1, float divider)
 Divides the components of a Vector3 by a scalar. More...
 

Public Attributes

float X
 The x coordinate of this Vector3. More...
 
float Y
 The y coordinate of this Vector3. More...
 
float Z
 The z coordinate of this Vector3. More...
 

Static Public Attributes

static readonly int SizeInBytes = System.Runtime.InteropServices.Marshal.SizeOf(new Vector3())
 Defines the size of the Vector3 struct in bytes. More...
 

Properties

static Vector3 Zero [get]
 Returns a Vector3 with components 0, 0, 0. More...
 
static Vector3 One [get]
 Returns a Vector3 with components 1, 1, 1. More...
 
static Vector3 UnitX [get]
 Returns a Vector3 with components 1, 0, 0. More...
 
static Vector3 UnitY [get]
 Returns a Vector3 with components 0, 1, 0. More...
 
static Vector3 UnitZ [get]
 Returns a Vector3 with components 0, 0, 1. More...
 
static Vector3 Up [get]
 Returns a Vector3 with components 0, 1, 0. More...
 
static Vector3 Down [get]
 Returns a Vector3 with components 0, -1, 0. More...
 
static Vector3 Right [get]
 Returns a Vector3 with components 1, 0, 0. More...
 
static Vector3 Left [get]
 Returns a Vector3 with components -1, 0, 0. More...
 
static Vector3 Forward [get]
 Returns a Vector3 with components 0, 0, -1. More...
 
static Vector3 Backward [get]
 Returns a Vector3 with components 0, 0, 1. More...
 

Detailed Description

Describes a 3D-vector.

Definition at line 13 of file Vector3.cs.

Constructor & Destructor Documentation

Shift.Vector3.Vector3 ( float  x,
float  y,
float  z 
)
inline

Constructs a 3d vector with X, Y and Z from three values.

Parameters
xThe x coordinate in 3d-space.
yThe y coordinate in 3d-space.
zThe z coordinate in 3d-space.

Definition at line 156 of file Vector3.cs.

Shift.Vector3.Vector3 ( float  value)
inline

Constructs a 3d vector with X, Y and Z set to the same value.

Parameters
valueThe x, y and z coordinates in 3d-space.

Definition at line 167 of file Vector3.cs.

Shift.Vector3.Vector3 ( Vector2  value,
float  z 
)
inline

Constructs a 3d vector with X, Y from Vector2 and Z from a scalar.

Parameters
valueThe x and y coordinates in 3d-space.
zThe z coordinate in 3d-space.

Definition at line 179 of file Vector3.cs.

Member Function Documentation

static Vector3 Shift.Vector3.Add ( Vector3  value1,
Vector3  value2 
)
inlinestatic

Performs vector addition on value1 and value2 .

Parameters
value1The first vector to add.
value2The second vector to add.
Returns
The result of the vector addition.

Definition at line 192 of file Vector3.cs.

static void Shift.Vector3.Add ( ref Vector3  value1,
ref Vector3  value2,
out Vector3  result 
)
inlinestatic

Performs vector addition on value1 and value2 , storing the result of the addition in result .

Parameters
value1The first vector to add.
value2The second vector to add.
resultThe result of the vector addition.

Definition at line 208 of file Vector3.cs.

static Vector3 Shift.Vector3.Barycentric ( Vector3  value1,
Vector3  value2,
Vector3  value3,
float  amount1,
float  amount2 
)
inlinestatic

Creates a new Vector3 that contains the cartesian coordinates of a vector specified in barycentric coordinates and relative to 3d-triangle.

Parameters
value1The first vector of 3d-triangle.
value2The second vector of 3d-triangle.
value3The third vector of 3d-triangle.
amount1Barycentric scalar b2 which represents a weighting factor towards second vector of 3d-triangle.
amount2Barycentric scalar b3 which represents a weighting factor towards third vector of 3d-triangle.
Returns
The cartesian translation of barycentric coordinates.

Definition at line 224 of file Vector3.cs.

static void Shift.Vector3.Barycentric ( ref Vector3  value1,
ref Vector3  value2,
ref Vector3  value3,
float  amount1,
float  amount2,
out Vector3  result 
)
inlinestatic

Creates a new Vector3 that contains the cartesian coordinates of a vector specified in barycentric coordinates and relative to 3d-triangle.

Parameters
value1The first vector of 3d-triangle.
value2The second vector of 3d-triangle.
value3The third vector of 3d-triangle.
amount1Barycentric scalar b2 which represents a weighting factor towards second vector of 3d-triangle.
amount2Barycentric scalar b3 which represents a weighting factor towards third vector of 3d-triangle.
resultThe cartesian translation of barycentric coordinates as an output parameter.

Definition at line 241 of file Vector3.cs.

static Vector3 Shift.Vector3.CatmullRom ( Vector3  value1,
Vector3  value2,
Vector3  value3,
Vector3  value4,
float  amount 
)
inlinestatic

Creates a new Vector3 that contains CatmullRom interpolation of the specified vectors.

Parameters
value1The first vector in interpolation.
value2The second vector in interpolation.
value3The third vector in interpolation.
value4The fourth vector in interpolation.
amountWeighting factor.
Returns
The result of CatmullRom interpolation.

Definition at line 257 of file Vector3.cs.

static void Shift.Vector3.CatmullRom ( ref Vector3  value1,
ref Vector3  value2,
ref Vector3  value3,
ref Vector3  value4,
float  amount,
out Vector3  result 
)
inlinestatic

Creates a new Vector3 that contains CatmullRom interpolation of the specified vectors.

Parameters
value1The first vector in interpolation.
value2The second vector in interpolation.
value3The third vector in interpolation.
value4The fourth vector in interpolation.
amountWeighting factor.
resultThe result of CatmullRom interpolation as an output parameter.

Definition at line 274 of file Vector3.cs.

static Vector3 Shift.Vector3.Clamp ( Vector3  value1,
Vector3  min,
Vector3  max 
)
inlinestatic

Clamps the specified value within a range.

Parameters
value1The value to clamp.
minThe min value.
maxThe max value.
Returns
The clamped value.

Definition at line 288 of file Vector3.cs.

static void Shift.Vector3.Clamp ( ref Vector3  value1,
ref Vector3  min,
ref Vector3  max,
out Vector3  result 
)
inlinestatic

Clamps the specified value within a range.

Parameters
value1The value to clamp.
minThe min value.
maxThe max value.
resultThe clamped value as an output parameter.

Definition at line 303 of file Vector3.cs.

static Vector3 Shift.Vector3.Cross ( Vector3  vector1,
Vector3  vector2 
)
inlinestatic

Computes the cross product of two vectors.

Parameters
vector1The first vector.
vector2The second vector.
Returns
The cross product of two vectors.

Definition at line 316 of file Vector3.cs.

static void Shift.Vector3.Cross ( ref Vector3  vector1,
ref Vector3  vector2,
out Vector3  result 
)
inlinestatic

Computes the cross product of two vectors.

Parameters
vector1The first vector.
vector2The second vector.
resultThe cross product of two vectors as an output parameter.

Definition at line 328 of file Vector3.cs.

static float Shift.Vector3.Distance ( Vector3  value1,
Vector3  value2 
)
inlinestatic

Returns the distance between two vectors.

Parameters
value1The first vector.
value2The second vector.
Returns
The distance between two vectors.

Definition at line 344 of file Vector3.cs.

static void Shift.Vector3.Distance ( ref Vector3  value1,
ref Vector3  value2,
out float  result 
)
inlinestatic

Returns the distance between two vectors.

Parameters
value1The first vector.
value2The second vector.
resultThe distance between two vectors as an output parameter.

Definition at line 357 of file Vector3.cs.

static float Shift.Vector3.DistanceSquared ( Vector3  value1,
Vector3  value2 
)
inlinestatic

Returns the squared distance between two vectors.

Parameters
value1The first vector.
value2The second vector.
Returns
The squared distance between two vectors.

Definition at line 369 of file Vector3.cs.

static void Shift.Vector3.DistanceSquared ( ref Vector3  value1,
ref Vector3  value2,
out float  result 
)
inlinestatic

Returns the squared distance between two vectors.

Parameters
value1The first vector.
value2The second vector.
resultThe squared distance between two vectors as an output parameter.

Definition at line 382 of file Vector3.cs.

static Vector3 Shift.Vector3.Divide ( Vector3  value1,
Vector3  value2 
)
inlinestatic

Divides the components of a Vector3 by the components of another Vector3.

Parameters
value1Source Vector3.
value2Divisor Vector3.
Returns
The result of dividing the vectors.

Definition at line 395 of file Vector3.cs.

static Vector3 Shift.Vector3.Divide ( Vector3  value1,
float  divider 
)
inlinestatic

Divides the components of a Vector3 by a scalar.

Parameters
value1Source Vector3.
dividerDivisor scalar.
Returns
The result of dividing a vector by a scalar.

Definition at line 409 of file Vector3.cs.

static void Shift.Vector3.Divide ( ref Vector3  value1,
float  divider,
out Vector3  result 
)
inlinestatic

Divides the components of a Vector3 by a scalar.

Parameters
value1Source Vector3.
dividerDivisor scalar.
resultThe result of dividing a vector by a scalar as an output parameter.

Definition at line 424 of file Vector3.cs.

static void Shift.Vector3.Divide ( ref Vector3  value1,
ref Vector3  value2,
out Vector3  result 
)
inlinestatic

Divides the components of a Vector3 by the components of another Vector3.

Parameters
value1Source Vector3.
value2Divisor Vector3.
resultThe result of dividing the vectors as an output parameter.

Definition at line 438 of file Vector3.cs.

static float Shift.Vector3.Dot ( Vector3  value1,
Vector3  value2 
)
inlinestatic

Returns a dot product of two vectors.

Parameters
value1The first vector.
value2The second vector.
Returns
The dot product of two vectors.

Definition at line 451 of file Vector3.cs.

static void Shift.Vector3.Dot ( ref Vector3  value1,
ref Vector3  value2,
out float  result 
)
inlinestatic

Returns a dot product of two vectors.

Parameters
value1The first vector.
value2The second vector.
resultThe dot product of two vectors as an output parameter.

Definition at line 462 of file Vector3.cs.

override bool Shift.Vector3.Equals ( object  obj)
inline

Compares whether current instance is equal to specified Object.

Parameters
objThe Object to compare.
Returns
true if the instances are equal; false otherwise.

Definition at line 472 of file Vector3.cs.

bool Shift.Vector3.Equals ( Vector3  other)
inline

Compares whether current instance is equal to specified Vector3.

Parameters
otherThe Vector3 to compare.
Returns
true if the instances are equal; false otherwise.

Definition at line 488 of file Vector3.cs.

override int Shift.Vector3.GetHashCode ( )
inline

Gets the hash code of this Vector3.

Returns
Hash code of this Vector3.

Definition at line 499 of file Vector3.cs.

static Vector3 Shift.Vector3.Hermite ( Vector3  value1,
Vector3  tangent1,
Vector3  value2,
Vector3  tangent2,
float  amount 
)
inlinestatic

Creates a new Vector3 that contains hermite spline interpolation.

Parameters
value1The first position vector.
tangent1The first tangent vector.
value2The second position vector.
tangent2The second tangent vector.
amountWeighting factor.
Returns
The hermite spline interpolation vector.

Definition at line 513 of file Vector3.cs.

static void Shift.Vector3.Hermite ( ref Vector3  value1,
ref Vector3  tangent1,
ref Vector3  value2,
ref Vector3  tangent2,
float  amount,
out Vector3  result 
)
inlinestatic

Creates a new Vector3 that contains hermite spline interpolation.

Parameters
value1The first position vector.
tangent1The first tangent vector.
value2The second position vector.
tangent2The second tangent vector.
amountWeighting factor.
resultThe hermite spline interpolation vector as an output parameter.

Definition at line 529 of file Vector3.cs.

float Shift.Vector3.Length ( )
inline

Returns the length of this Vector3.

Returns
The length of this Vector3.

Definition at line 540 of file Vector3.cs.

float Shift.Vector3.LengthSquared ( )
inline

Returns the squared length of this Vector3.

Returns
The squared length of this Vector3.

Definition at line 550 of file Vector3.cs.

static Vector3 Shift.Vector3.Lerp ( Vector3  value1,
Vector3  value2,
float  amount 
)
inlinestatic

Creates a new Vector3 that contains linear interpolation of the specified vectors.

Parameters
value1The first vector.
value2The second vector.
amountWeighting value(between 0.0 and 1.0).
Returns
The result of linear interpolation of the specified vectors.

Definition at line 562 of file Vector3.cs.

static void Shift.Vector3.Lerp ( ref Vector3  value1,
ref Vector3  value2,
float  amount,
out Vector3  result 
)
inlinestatic

Creates a new Vector3 that contains linear interpolation of the specified vectors.

Parameters
value1The first vector.
value2The second vector.
amountWeighting value(between 0.0 and 1.0).
resultThe result of linear interpolation of the specified vectors as an output parameter.

Definition at line 577 of file Vector3.cs.

static Vector3 Shift.Vector3.LerpPrecise ( Vector3  value1,
Vector3  value2,
float  amount 
)
inlinestatic

Creates a new Vector3 that contains linear interpolation of the specified vectors. Uses MathHelper.LerpPrecise on MathHelper for the interpolation. Less efficient but more precise compared to Vector3.Lerp(Vector3, Vector3, float). See remarks section of MathHelper.LerpPrecise on MathHelper for more info.

Parameters
value1The first vector.
value2The second vector.
amountWeighting value(between 0.0 and 1.0).
Returns
The result of linear interpolation of the specified vectors.

Definition at line 594 of file Vector3.cs.

static void Shift.Vector3.LerpPrecise ( ref Vector3  value1,
ref Vector3  value2,
float  amount,
out Vector3  result 
)
inlinestatic

Creates a new Vector3 that contains linear interpolation of the specified vectors. Uses MathHelper.LerpPrecise on MathHelper for the interpolation. Less efficient but more precise compared to Vector3.Lerp(ref Vector3, ref Vector3, float, out Vector3). See remarks section of MathHelper.LerpPrecise on MathHelper for more info.

Parameters
value1The first vector.
value2The second vector.
amountWeighting value(between 0.0 and 1.0).
resultThe result of linear interpolation of the specified vectors as an output parameter.

Definition at line 612 of file Vector3.cs.

static Vector3 Shift.Vector3.Max ( Vector3  value1,
Vector3  value2 
)
inlinestatic

Creates a new Vector3 that contains a maximal values from the two vectors.

Parameters
value1The first vector.
value2The second vector.
Returns
The Vector3 with maximal values from the two vectors.

Definition at line 625 of file Vector3.cs.

static void Shift.Vector3.Max ( ref Vector3  value1,
ref Vector3  value2,
out Vector3  result 
)
inlinestatic

Creates a new Vector3 that contains a maximal values from the two vectors.

Parameters
value1The first vector.
value2The second vector.
resultThe Vector3 with maximal values from the two vectors as an output parameter.

Definition at line 639 of file Vector3.cs.

static Vector3 Shift.Vector3.Min ( Vector3  value1,
Vector3  value2 
)
inlinestatic

Creates a new Vector3 that contains a minimal values from the two vectors.

Parameters
value1The first vector.
value2The second vector.
Returns
The Vector3 with minimal values from the two vectors.

Definition at line 652 of file Vector3.cs.

static void Shift.Vector3.Min ( ref Vector3  value1,
ref Vector3  value2,
out Vector3  result 
)
inlinestatic

Creates a new Vector3 that contains a minimal values from the two vectors.

Parameters
value1The first vector.
value2The second vector.
resultThe Vector3 with minimal values from the two vectors as an output parameter.

Definition at line 666 of file Vector3.cs.

static Vector3 Shift.Vector3.Multiply ( Vector3  value1,
Vector3  value2 
)
inlinestatic

Creates a new Vector3 that contains a multiplication of two vectors.

Parameters
value1Source Vector3.
value2Source Vector3.
Returns
The result of the vector multiplication.

Definition at line 679 of file Vector3.cs.

static Vector3 Shift.Vector3.Multiply ( Vector3  value1,
float  scaleFactor 
)
inlinestatic

Creates a new Vector3 that contains a multiplication of Vector3 and a scalar.

Parameters
value1Source Vector3.
scaleFactorScalar value.
Returns
The result of the vector multiplication with a scalar.

Definition at line 693 of file Vector3.cs.

static void Shift.Vector3.Multiply ( ref Vector3  value1,
float  scaleFactor,
out Vector3  result 
)
inlinestatic

Creates a new Vector3 that contains a multiplication of Vector3 and a scalar.

Parameters
value1Source Vector3.
scaleFactorScalar value.
resultThe result of the multiplication with a scalar as an output parameter.

Definition at line 707 of file Vector3.cs.

static void Shift.Vector3.Multiply ( ref Vector3  value1,
ref Vector3  value2,
out Vector3  result 
)
inlinestatic

Creates a new Vector3 that contains a multiplication of two vectors.

Parameters
value1Source Vector3.
value2Source Vector3.
resultThe result of the vector multiplication as an output parameter.

Definition at line 720 of file Vector3.cs.

static Vector3 Shift.Vector3.Negate ( Vector3  value)
inlinestatic

Creates a new Vector3 that contains the specified vector inversion.

Parameters
valueSource Vector3.
Returns
The result of the vector inversion.

Definition at line 732 of file Vector3.cs.

static void Shift.Vector3.Negate ( ref Vector3  value,
out Vector3  result 
)
inlinestatic

Creates a new Vector3 that contains the specified vector inversion.

Parameters
valueSource Vector3.
resultThe result of the vector inversion as an output parameter.

Definition at line 743 of file Vector3.cs.

void Shift.Vector3.Normalize ( )
inline

Turns this Vector3 to a unit vector with the same direction.

Definition at line 753 of file Vector3.cs.

static Vector3 Shift.Vector3.Normalize ( Vector3  value)
inlinestatic

Creates a new Vector3 that contains a normalized values from another vector.

Parameters
valueSource Vector3.
Returns
Unit vector.

Definition at line 763 of file Vector3.cs.

static void Shift.Vector3.Normalize ( ref Vector3  value,
out Vector3  result 
)
inlinestatic

Creates a new Vector3 that contains a normalized values from another vector.

Parameters
valueSource Vector3.
resultUnit vector as an output parameter.

Definition at line 775 of file Vector3.cs.

static bool Shift.Vector3.operator!= ( Vector3  value1,
Vector3  value2 
)
inlinestatic

Compares whether two Vector3 instances are not equal.

Parameters
value1Vector3 instance on the left of the not equal sign.
value2Vector3 instance on the right of the not equal sign.
Returns
true if the instances are not equal; false otherwise.

Definition at line 1199 of file Vector3.cs.

static Vector3 Shift.Vector3.operator* ( Vector3  value1,
Vector3  value2 
)
inlinestatic

Multiplies the components of two vectors by each other.

Parameters
value1Source Vector3 on the left of the mul sign.
value2Source Vector3 on the right of the mul sign.
Returns
Result of the vector multiplication.

Definition at line 1249 of file Vector3.cs.

static Vector3 Shift.Vector3.operator* ( Vector3  value,
float  scaleFactor 
)
inlinestatic

Multiplies the components of vector by a scalar.

Parameters
valueSource Vector3 on the left of the mul sign.
scaleFactorScalar value on the right of the mul sign.
Returns
Result of the vector multiplication with a scalar.

Definition at line 1263 of file Vector3.cs.

static Vector3 Shift.Vector3.operator* ( float  scaleFactor,
Vector3  value 
)
inlinestatic

Multiplies the components of vector by a scalar.

Parameters
scaleFactorScalar value on the left of the mul sign.
valueSource Vector3 on the right of the mul sign.
Returns
Result of the vector multiplication with a scalar.

Definition at line 1277 of file Vector3.cs.

static Vector3 Shift.Vector3.operator+ ( Vector3  value1,
Vector3  value2 
)
inlinestatic

Adds two vectors.

Parameters
value1Source Vector3 on the left of the add sign.
value2Source Vector3 on the right of the add sign.
Returns
Sum of the vectors.

Definition at line 1210 of file Vector3.cs.

static Vector3 Shift.Vector3.operator- ( Vector3  value)
inlinestatic

Inverts values in the specified Vector3.

Parameters
valueSource Vector3 on the right of the sub sign.
Returns
Result of the inversion.

Definition at line 1223 of file Vector3.cs.

static Vector3 Shift.Vector3.operator- ( Vector3  value1,
Vector3  value2 
)
inlinestatic

Subtracts a Vector3 from a Vector3.

Parameters
value1Source Vector3 on the left of the sub sign.
value2Source Vector3 on the right of the sub sign.
Returns
Result of the vector subtraction.

Definition at line 1235 of file Vector3.cs.

static Vector3 Shift.Vector3.operator/ ( Vector3  value1,
Vector3  value2 
)
inlinestatic

Divides the components of a Vector3 by the components of another Vector3.

Parameters
value1Source Vector3 on the left of the div sign.
value2Divisor Vector3 on the right of the div sign.
Returns
The result of dividing the vectors.

Definition at line 1291 of file Vector3.cs.

static Vector3 Shift.Vector3.operator/ ( Vector3  value1,
float  divider 
)
inlinestatic

Divides the components of a Vector3 by a scalar.

Parameters
value1Source Vector3 on the left of the div sign.
dividerDivisor scalar on the right of the div sign.
Returns
The result of dividing a vector by a scalar.

Definition at line 1305 of file Vector3.cs.

static bool Shift.Vector3.operator== ( Vector3  value1,
Vector3  value2 
)
inlinestatic

Compares whether two Vector3 instances are equal.

Parameters
value1Vector3 instance on the left of the equal sign.
value2Vector3 instance on the right of the equal sign.
Returns
true if the instances are equal; false otherwise.

Definition at line 1186 of file Vector3.cs.

static Vector3 Shift.Vector3.Reflect ( Vector3  vector,
Vector3  normal 
)
inlinestatic

Creates a new Vector3 that contains reflect vector of the given vector and normal.

Parameters
vectorSource Vector3.
normalReflection normal.
Returns
Reflected vector.

Definition at line 790 of file Vector3.cs.

static void Shift.Vector3.Reflect ( ref Vector3  vector,
ref Vector3  normal,
out Vector3  result 
)
inlinestatic

Creates a new Vector3 that contains reflect vector of the given vector and normal.

Parameters
vectorSource Vector3.
normalReflection normal.
resultReflected vector as an output parameter.

Definition at line 811 of file Vector3.cs.

static Vector3 Shift.Vector3.SmoothStep ( Vector3  value1,
Vector3  value2,
float  amount 
)
inlinestatic

Creates a new Vector3 that contains cubic interpolation of the specified vectors.

Parameters
value1Source Vector3.
value2Source Vector3.
amountWeighting value.
Returns
Cubic interpolation of the specified vectors.

Definition at line 831 of file Vector3.cs.

static void Shift.Vector3.SmoothStep ( ref Vector3  value1,
ref Vector3  value2,
float  amount,
out Vector3  result 
)
inlinestatic

Creates a new Vector3 that contains cubic interpolation of the specified vectors.

Parameters
value1Source Vector3.
value2Source Vector3.
amountWeighting value.
resultCubic interpolation of the specified vectors as an output parameter.

Definition at line 846 of file Vector3.cs.

static Vector3 Shift.Vector3.Subtract ( Vector3  value1,
Vector3  value2 
)
inlinestatic

Creates a new Vector3 that contains subtraction of on Vector3 from a another.

Parameters
value1Source Vector3.
value2Source Vector3.
Returns
The result of the vector subtraction.

Definition at line 859 of file Vector3.cs.

static void Shift.Vector3.Subtract ( ref Vector3  value1,
ref Vector3  value2,
out Vector3  result 
)
inlinestatic

Creates a new Vector3 that contains subtraction of on Vector3 from a another.

Parameters
value1Source Vector3.
value2Source Vector3.
resultThe result of the vector subtraction as an output parameter.

Definition at line 873 of file Vector3.cs.

override string Shift.Vector3.ToString ( )
inline

Returns a String representation of this Vector3 in the format: {X:[X] Y:[Y] Z:[Z]}

Returns
A String representation of this Vector3.

Definition at line 885 of file Vector3.cs.

static Vector3 Shift.Vector3.Transform ( Vector3  position,
Matrix  matrix 
)
inlinestatic

Creates a new Vector3 that contains a transformation of 3d-vector by the specified Matrix.

Parameters
positionSource Vector3.
matrixThe transformation Matrix.
Returns
Transformed Vector3.

Definition at line 904 of file Vector3.cs.

static void Shift.Vector3.Transform ( ref Vector3  position,
ref Matrix  matrix,
out Vector3  result 
)
inlinestatic

Creates a new Vector3 that contains a transformation of 3d-vector by the specified Matrix.

Parameters
positionSource Vector3.
matrixThe transformation Matrix.
resultTransformed Vector3 as an output parameter.

Definition at line 916 of file Vector3.cs.

static Vector3 Shift.Vector3.Transform ( Vector3  value,
Quaternion  rotation 
)
inlinestatic

Creates a new Vector3 that contains a transformation of 3d-vector by the specified Quaternion, representing the rotation.

Parameters
valueSource Vector3.
rotationThe Quaternion which contains rotation transformation.
Returns
Transformed Vector3.

Definition at line 932 of file Vector3.cs.

static void Shift.Vector3.Transform ( ref Vector3  value,
ref Quaternion  rotation,
out Vector3  result 
)
inlinestatic

Creates a new Vector3 that contains a transformation of 3d-vector by the specified Quaternion, representing the rotation.

Parameters
valueSource Vector3.
rotationThe Quaternion which contains rotation transformation.
resultTransformed Vector3 as an output parameter.

Definition at line 945 of file Vector3.cs.

static void Shift.Vector3.Transform ( Vector3[]  sourceArray,
int  sourceIndex,
ref Matrix  matrix,
Vector3[]  destinationArray,
int  destinationIndex,
int  length 
)
inlinestatic

Apply transformation on vectors within array of Vector3 by the specified Matrix and places the results in an another array.

Parameters
sourceArraySource array.
sourceIndexThe starting index of transformation in the source array.
matrixThe transformation Matrix.
destinationArrayDestination array.
destinationIndexThe starting index in the destination array, where the first Vector3 should be written.
lengthThe number of vectors to be transformed.

Definition at line 965 of file Vector3.cs.

static void Shift.Vector3.Transform ( Vector3[]  sourceArray,
int  sourceIndex,
ref Quaternion  rotation,
Vector3[]  destinationArray,
int  destinationIndex,
int  length 
)
inlinestatic

Apply transformation on vectors within array of Vector3 by the specified Quaternion and places the results in an another array.

Parameters
sourceArraySource array.
sourceIndexThe starting index of transformation in the source array.
rotationThe Quaternion which contains rotation transformation.
destinationArrayDestination array.
destinationIndexThe starting index in the destination array, where the first Vector3 should be written.
lengthThe number of vectors to be transformed.

Definition at line 998 of file Vector3.cs.

static void Shift.Vector3.Transform ( Vector3[]  sourceArray,
ref Matrix  matrix,
Vector3[]  destinationArray 
)
inlinestatic

Apply transformation on all vectors within array of Vector3 by the specified Matrix and places the results in an another array.

Parameters
sourceArraySource array.
matrixThe transformation Matrix.
destinationArrayDestination array.

Definition at line 1033 of file Vector3.cs.

static void Shift.Vector3.Transform ( Vector3[]  sourceArray,
ref Quaternion  rotation,
Vector3[]  destinationArray 
)
inlinestatic

Apply transformation on all vectors within array of Vector3 by the specified Quaternion and places the results in an another array.

Parameters
sourceArraySource array.
rotationThe Quaternion which contains rotation transformation.
destinationArrayDestination array.

Definition at line 1061 of file Vector3.cs.

static Vector3 Shift.Vector3.TransformNormal ( Vector3  normal,
Matrix  matrix 
)
inlinestatic

Creates a new Vector3 that contains a transformation of the specified normal by the specified Matrix.

Parameters
normalSource Vector3 which represents a normal vector.
matrixThe transformation Matrix.
Returns
Transformed normal.

Definition at line 1094 of file Vector3.cs.

static void Shift.Vector3.TransformNormal ( ref Vector3  normal,
ref Matrix  matrix,
out Vector3  result 
)
inlinestatic

Creates a new Vector3 that contains a transformation of the specified normal by the specified Matrix.

Parameters
normalSource Vector3 which represents a normal vector.
matrixThe transformation Matrix.
resultTransformed normal as an output parameter.

Definition at line 1106 of file Vector3.cs.

static void Shift.Vector3.TransformNormal ( Vector3[]  sourceArray,
int  sourceIndex,
ref Matrix  matrix,
Vector3[]  destinationArray,
int  destinationIndex,
int  length 
)
inlinestatic

Apply transformation on normals within array of Vector3 by the specified Matrix and places the results in an another array.

Parameters
sourceArraySource array.
sourceIndexThe starting index of transformation in the source array.
matrixThe transformation Matrix.
destinationArrayDestination array.
destinationIndexThe starting index in the destination array, where the first Vector3 should be written.
lengthThe number of normals to be transformed.

Definition at line 1125 of file Vector3.cs.

static void Shift.Vector3.TransformNormal ( Vector3[]  sourceArray,
ref Matrix  matrix,
Vector3[]  destinationArray 
)
inlinestatic

Apply transformation on all normals within array of Vector3 by the specified Matrix and places the results in an another array.

Parameters
sourceArraySource array.
matrixThe transformation Matrix.
destinationArrayDestination array.

Definition at line 1159 of file Vector3.cs.

Member Data Documentation

readonly int Shift.Vector3.SizeInBytes = System.Runtime.InteropServices.Marshal.SizeOf(new Vector3())
static

Defines the size of the Vector3 struct in bytes.

Definition at line 18 of file Vector3.cs.

float Shift.Vector3.X

The x coordinate of this Vector3.

Definition at line 124 of file Vector3.cs.

float Shift.Vector3.Y

The y coordinate of this Vector3.

Definition at line 130 of file Vector3.cs.

float Shift.Vector3.Z

The z coordinate of this Vector3.

Definition at line 136 of file Vector3.cs.

Property Documentation

Vector3 Shift.Vector3.Backward
staticget

Returns a Vector3 with components 0, 0, 1.

Definition at line 116 of file Vector3.cs.

Vector3 Shift.Vector3.Down
staticget

Returns a Vector3 with components 0, -1, 0.

Definition at line 84 of file Vector3.cs.

Vector3 Shift.Vector3.Forward
staticget

Returns a Vector3 with components 0, 0, -1.

Definition at line 108 of file Vector3.cs.

Vector3 Shift.Vector3.Left
staticget

Returns a Vector3 with components -1, 0, 0.

Definition at line 100 of file Vector3.cs.

Vector3 Shift.Vector3.One
staticget

Returns a Vector3 with components 1, 1, 1.

Definition at line 44 of file Vector3.cs.

Vector3 Shift.Vector3.Right
staticget

Returns a Vector3 with components 1, 0, 0.

Definition at line 92 of file Vector3.cs.

Vector3 Shift.Vector3.UnitX
staticget

Returns a Vector3 with components 1, 0, 0.

Definition at line 52 of file Vector3.cs.

Vector3 Shift.Vector3.UnitY
staticget

Returns a Vector3 with components 0, 1, 0.

Definition at line 60 of file Vector3.cs.

Vector3 Shift.Vector3.UnitZ
staticget

Returns a Vector3 with components 0, 0, 1.

Definition at line 68 of file Vector3.cs.

Vector3 Shift.Vector3.Up
staticget

Returns a Vector3 with components 0, 1, 0.

Definition at line 76 of file Vector3.cs.

Vector3 Shift.Vector3.Zero
staticget

Returns a Vector3 with components 0, 0, 0.

Definition at line 36 of file Vector3.cs.


The documentation for this struct was generated from the following file: