The Open Toolkit library  1.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
OpenTK.Vector4d Struct Reference

Represents a 4D vector using four double-precision floating-point numbers. More...

Inherits IEquatable< Vector4d >.

Public Member Functions

 Vector4d (double value)
 Constructs a new instance. More...
 
 Vector4d (double x, double y, double z, double w)
 Constructs a new Vector4d. More...
 
 Vector4d (Vector2d v)
 Constructs a new Vector4d from the given Vector2d. More...
 
 Vector4d (Vector3d v)
 Constructs a new Vector4d from the given Vector3d. The w component is initialized to 0. More...
 
 Vector4d (Vector3d v, double w)
 Constructs a new Vector4d from the specified Vector3d and w component. More...
 
 Vector4d (Vector4d v)
 Constructs a new Vector4d from the given Vector4d. More...
 
void Add (Vector4d right)
 Add the Vector passed as parameter to this instance. More...
 
void Add (ref Vector4d right)
 Add the Vector passed as parameter to this instance. More...
 
void Sub (Vector4d right)
 Subtract the Vector passed as parameter from this instance. More...
 
void Sub (ref Vector4d right)
 Subtract the Vector passed as parameter from this instance. More...
 
void Mult (double f)
 Multiply this instance by a scalar. More...
 
void Div (double f)
 Divide this instance by a scalar. More...
 
Vector4d Normalized ()
 Returns a copy of the Vector4d scaled to unit length. More...
 
void Normalize ()
 Scales the Vector4d to unit length. More...
 
void NormalizeFast ()
 Scales the Vector4d to approximately unit length. More...
 
void Scale (double sx, double sy, double sz, double sw)
 Scales the current Vector4d by the given amounts. More...
 
void Scale (Vector4d scale)
 Scales this instance by the given parameter. More...
 
void Scale (ref Vector4d scale)
 Scales this instance by the given parameter. More...
 
override string ToString ()
 Returns a System.String that represents the current Vector4d. More...
 
override int GetHashCode ()
 Returns the hashcode for this instance. More...
 
override bool Equals (object obj)
 Indicates whether this instance and a specified object are equal. More...
 
bool Equals (Vector4d other)
 Indicates whether the current vector is equal to another vector. More...
 

Static Public Member Functions

static Vector4d Sub (Vector4d a, Vector4d b)
 Subtract one Vector from another More...
 
static void Sub (ref Vector4d a, ref Vector4d b, out Vector4d result)
 Subtract one Vector from another More...
 
static Vector4d Mult (Vector4d a, double f)
 Multiply a vector and a scalar More...
 
static void Mult (ref Vector4d a, double f, out Vector4d result)
 Multiply a vector and a scalar More...
 
static Vector4d Div (Vector4d a, double f)
 Divide a vector by a scalar More...
 
static void Div (ref Vector4d a, double f, out Vector4d result)
 Divide a vector by a scalar More...
 
static Vector4d Add (Vector4d a, Vector4d b)
 Adds two vectors. More...
 
static void Add (ref Vector4d a, ref Vector4d b, out Vector4d result)
 Adds two vectors. More...
 
static Vector4d Subtract (Vector4d a, Vector4d b)
 Subtract one Vector from another More...
 
static void Subtract (ref Vector4d a, ref Vector4d b, out Vector4d result)
 Subtract one Vector from another More...
 
static Vector4d Multiply (Vector4d vector, double scale)
 Multiplies a vector by a scalar. More...
 
static void Multiply (ref Vector4d vector, double scale, out Vector4d result)
 Multiplies a vector by a scalar. More...
 
static Vector4d Multiply (Vector4d vector, Vector4d scale)
 Multiplies a vector by the components a vector (scale). More...
 
static void Multiply (ref Vector4d vector, ref Vector4d scale, out Vector4d result)
 Multiplies a vector by the components of a vector (scale). More...
 
static Vector4d Divide (Vector4d vector, double scale)
 Divides a vector by a scalar. More...
 
static void Divide (ref Vector4d vector, double scale, out Vector4d result)
 Divides a vector by a scalar. More...
 
static Vector4d Divide (Vector4d vector, Vector4d scale)
 Divides a vector by the components of a vector (scale). More...
 
static void Divide (ref Vector4d vector, ref Vector4d scale, out Vector4d result)
 Divide a vector by the components of a vector (scale). More...
 
static Vector4d Min (Vector4d a, Vector4d b)
 Calculate the component-wise minimum of two vectors More...
 
static void Min (ref Vector4d a, ref Vector4d b, out Vector4d result)
 Calculate the component-wise minimum of two vectors More...
 
static Vector4d Max (Vector4d a, Vector4d b)
 Calculate the component-wise maximum of two vectors More...
 
static void Max (ref Vector4d a, ref Vector4d b, out Vector4d result)
 Calculate the component-wise maximum of two vectors More...
 
static Vector4d Clamp (Vector4d vec, Vector4d min, Vector4d max)
 Clamp a vector to the given minimum and maximum vectors More...
 
static void Clamp (ref Vector4d vec, ref Vector4d min, ref Vector4d max, out Vector4d result)
 Clamp a vector to the given minimum and maximum vectors More...
 
static Vector4d Normalize (Vector4d vec)
 Scale a vector to unit length More...
 
static void Normalize (ref Vector4d vec, out Vector4d result)
 Scale a vector to unit length More...
 
static Vector4d NormalizeFast (Vector4d vec)
 Scale a vector to approximately unit length More...
 
static void NormalizeFast (ref Vector4d vec, out Vector4d result)
 Scale a vector to approximately unit length More...
 
static double Dot (Vector4d left, Vector4d right)
 Calculate the dot product of two vectors More...
 
static void Dot (ref Vector4d left, ref Vector4d right, out double result)
 Calculate the dot product of two vectors More...
 
static Vector4d Lerp (Vector4d a, Vector4d b, double blend)
 Returns a new Vector that is the linear blend of the 2 given Vectors More...
 
static void Lerp (ref Vector4d a, ref Vector4d b, double blend, out Vector4d result)
 Returns a new Vector that is the linear blend of the 2 given Vectors More...
 
static Vector4d BaryCentric (Vector4d a, Vector4d b, Vector4d c, double u, double v)
 Interpolate 3 Vectors using Barycentric coordinates More...
 
static void BaryCentric (ref Vector4d a, ref Vector4d b, ref Vector4d c, double u, double v, out Vector4d result)
 Interpolate 3 Vectors using Barycentric coordinates More...
 
static Vector4d Transform (Vector4d vec, Matrix4d mat)
 Transform a Vector by the given Matrix More...
 
static void Transform (ref Vector4d vec, ref Matrix4d mat, out Vector4d result)
 Transform a Vector by the given Matrix More...
 
static Vector4d Transform (Vector4d vec, Quaterniond quat)
 Transforms a vector by a quaternion rotation. More...
 
static void Transform (ref Vector4d vec, ref Quaterniond quat, out Vector4d result)
 Transforms a vector by a quaternion rotation. More...
 
static Vector4d operator+ (Vector4d left, Vector4d right)
 Adds two instances. More...
 
static Vector4d operator- (Vector4d left, Vector4d right)
 Subtracts two instances. More...
 
static Vector4d operator- (Vector4d vec)
 Negates an instance. More...
 
static Vector4d operator* (Vector4d vec, double scale)
 Multiplies an instance by a scalar. More...
 
static Vector4d operator* (double scale, Vector4d vec)
 Multiplies an instance by a scalar. More...
 
static Vector4d operator/ (Vector4d vec, double scale)
 Divides an instance by a scalar. More...
 
static bool operator== (Vector4d left, Vector4d right)
 Compares two instances for equality. More...
 
static bool operator!= (Vector4d left, Vector4d right)
 Compares two instances for inequality. More...
 
unsafe static operator double * (Vector4d v)
 Returns a pointer to the first element of the specified instance. More...
 
static operator IntPtr (Vector4d v)
 Returns a pointer to the first element of the specified instance. More...
 
static operator Vector4d (Vector4 v4)
 Converts OpenTK.Vector4 to OpenTK.Vector4d. More...
 
static operator Vector4 (Vector4d v4d)
 Converts OpenTK.Vector4d to OpenTK.Vector4. More...
 

Public Attributes

double X
 The X component of the Vector4d. More...
 
double Y
 The Y component of the Vector4d. More...
 
double Z
 The Z component of the Vector4d. More...
 
double W
 The W component of the Vector4d. More...
 

Static Public Attributes

static readonly Vector4d UnitX = new Vector4d(1, 0, 0, 0)
 Defines a unit-length Vector4d that points towards the X-axis. More...
 
static readonly Vector4d UnitY = new Vector4d(0, 1, 0, 0)
 Defines a unit-length Vector4d that points towards the Y-axis. More...
 
static readonly Vector4d UnitZ = new Vector4d(0, 0, 1, 0)
 Defines a unit-length Vector4d that points towards the Z-axis. More...
 
static readonly Vector4d UnitW = new Vector4d(0, 0, 0, 1)
 Defines a unit-length Vector4d that points towards the W-axis. More...
 
static readonly Vector4d Zero = new Vector4d(0, 0, 0, 0)
 Defines a zero-length Vector4d. More...
 
static readonly Vector4d One = new Vector4d(1, 1, 1, 1)
 Defines an instance with all components set to 1. More...
 
static readonly int SizeInBytes = Marshal.SizeOf(new Vector4d())
 Defines the size of the Vector4d struct in bytes. More...
 

Properties

double this[int index] [get, set]
 Gets or sets the value at the index of the Vector. More...
 
double Length [get]
 Gets the length (magnitude) of the vector. More...
 
double LengthFast [get]
 Gets an approximation of the vector length (magnitude). More...
 
double LengthSquared [get]
 Gets the square of the vector length (magnitude). More...
 
Vector2d Xy [get, set]
 Gets or sets an OpenTK.Vector2d with the X and Y components of this instance. More...
 
Vector2d Xz [get, set]
 Gets or sets an OpenTK.Vector2d with the X and Z components of this instance. More...
 
Vector2d Xw [get, set]
 Gets or sets an OpenTK.Vector2d with the X and W components of this instance. More...
 
Vector2d Yx [get, set]
 Gets or sets an OpenTK.Vector2d with the Y and X components of this instance. More...
 
Vector2d Yz [get, set]
 Gets or sets an OpenTK.Vector2d with the Y and Z components of this instance. More...
 
Vector2d Yw [get, set]
 Gets or sets an OpenTK.Vector2d with the Y and W components of this instance. More...
 
Vector2d Zx [get, set]
 Gets or sets an OpenTK.Vector2d with the Z and X components of this instance. More...
 
Vector2d Zy [get, set]
 Gets or sets an OpenTK.Vector2d with the Z and Y components of this instance. More...
 
Vector2d Zw [get, set]
 Gets an OpenTK.Vector2d with the Z and W components of this instance. More...
 
Vector2d Wx [get, set]
 Gets or sets an OpenTK.Vector2d with the W and X components of this instance. More...
 
Vector2d Wy [get, set]
 Gets or sets an OpenTK.Vector2d with the W and Y components of this instance. More...
 
Vector2d Wz [get, set]
 Gets or sets an OpenTK.Vector2d with the W and Z components of this instance. More...
 
Vector3d Xyz [get, set]
 Gets or sets an OpenTK.Vector3d with the X, Y, and Z components of this instance. More...
 
Vector3d Xyw [get, set]
 Gets or sets an OpenTK.Vector3d with the X, Y, and Z components of this instance. More...
 
Vector3d Xzy [get, set]
 Gets or sets an OpenTK.Vector3d with the X, Z, and Y components of this instance. More...
 
Vector3d Xzw [get, set]
 Gets or sets an OpenTK.Vector3d with the X, Z, and W components of this instance. More...
 
Vector3d Xwy [get, set]
 Gets or sets an OpenTK.Vector3d with the X, W, and Y components of this instance. More...
 
Vector3d Xwz [get, set]
 Gets or sets an OpenTK.Vector3d with the X, W, and Z components of this instance. More...
 
Vector3d Yxz [get, set]
 Gets or sets an OpenTK.Vector3d with the Y, X, and Z components of this instance. More...
 
Vector3d Yxw [get, set]
 Gets or sets an OpenTK.Vector3d with the Y, X, and W components of this instance. More...
 
Vector3d Yzx [get, set]
 Gets or sets an OpenTK.Vector3d with the Y, Z, and X components of this instance. More...
 
Vector3d Yzw [get, set]
 Gets or sets an OpenTK.Vector3d with the Y, Z, and W components of this instance. More...
 
Vector3d Ywx [get, set]
 Gets or sets an OpenTK.Vector3d with the Y, W, and X components of this instance. More...
 
Vector3d Ywz [get, set]
 Gets an OpenTK.Vector3d with the Y, W, and Z components of this instance. More...
 
Vector3d Zxy [get, set]
 Gets or sets an OpenTK.Vector3d with the Z, X, and Y components of this instance. More...
 
Vector3d Zxw [get, set]
 Gets or sets an OpenTK.Vector3d with the Z, X, and W components of this instance. More...
 
Vector3d Zyx [get, set]
 Gets or sets an OpenTK.Vector3d with the Z, Y, and X components of this instance. More...
 
Vector3d Zyw [get, set]
 Gets or sets an OpenTK.Vector3d with the Z, Y, and W components of this instance. More...
 
Vector3d Zwx [get, set]
 Gets or sets an OpenTK.Vector3d with the Z, W, and X components of this instance. More...
 
Vector3d Zwy [get, set]
 Gets or sets an OpenTK.Vector3d with the Z, W, and Y components of this instance. More...
 
Vector3d Wxy [get, set]
 Gets or sets an OpenTK.Vector3d with the W, X, and Y components of this instance. More...
 
Vector3d Wxz [get, set]
 Gets or sets an OpenTK.Vector3d with the W, X, and Z components of this instance. More...
 
Vector3d Wyx [get, set]
 Gets or sets an OpenTK.Vector3d with the W, Y, and X components of this instance. More...
 
Vector3d Wyz [get, set]
 Gets or sets an OpenTK.Vector3d with the W, Y, and Z components of this instance. More...
 
Vector3d Wzx [get, set]
 Gets or sets an OpenTK.Vector3d with the W, Z, and X components of this instance. More...
 
Vector3d Wzy [get, set]
 Gets or sets an OpenTK.Vector3d with the W, Z, and Y components of this instance. More...
 
Vector4d Xywz [get, set]
 Gets or sets an OpenTK.Vector4d with the X, Y, W, and Z components of this instance. More...
 
Vector4d Xzyw [get, set]
 Gets or sets an OpenTK.Vector4d with the X, Z, Y, and W components of this instance. More...
 
Vector4d Xzwy [get, set]
 Gets or sets an OpenTK.Vector4d with the X, Z, W, and Y components of this instance. More...
 
Vector4d Xwyz [get, set]
 Gets or sets an OpenTK.Vector4d with the X, W, Y, and Z components of this instance. More...
 
Vector4d Xwzy [get, set]
 Gets or sets an OpenTK.Vector4d with the X, W, Z, and Y components of this instance. More...
 
Vector4d Yxzw [get, set]
 Gets or sets an OpenTK.Vector4d with the Y, X, Z, and W components of this instance. More...
 
Vector4d Yxwz [get, set]
 Gets or sets an OpenTK.Vector4d with the Y, X, W, and Z components of this instance. More...
 
Vector4d Yyzw [get, set]
 Gets an OpenTK.Vector4d with the Y, Y, Z, and W components of this instance. More...
 
Vector4d Yywz [get, set]
 Gets an OpenTK.Vector4d with the Y, Y, W, and Z components of this instance. More...
 
Vector4d Yzxw [get, set]
 Gets or sets an OpenTK.Vector4d with the Y, Z, X, and W components of this instance. More...
 
Vector4d Yzwx [get, set]
 Gets or sets an OpenTK.Vector4d with the Y, Z, W, and X components of this instance. More...
 
Vector4d Ywxz [get, set]
 Gets or sets an OpenTK.Vector4d with the Y, W, X, and Z components of this instance. More...
 
Vector4d Ywzx [get, set]
 Gets or sets an OpenTK.Vector4d with the Y, W, Z, and X components of this instance. More...
 
Vector4d Zxyw [get, set]
 Gets or sets an OpenTK.Vector4d with the Z, X, Y, and Z components of this instance. More...
 
Vector4d Zxwy [get, set]
 Gets or sets an OpenTK.Vector4d with the Z, X, W, and Y components of this instance. More...
 
Vector4d Zyxw [get, set]
 Gets or sets an OpenTK.Vector4d with the Z, Y, X, and W components of this instance. More...
 
Vector4d Zywx [get, set]
 Gets or sets an OpenTK.Vector4d with the Z, Y, W, and X components of this instance. More...
 
Vector4d Zwxy [get, set]
 Gets or sets an OpenTK.Vector4d with the Z, W, X, and Y components of this instance. More...
 
Vector4d Zwyx [get, set]
 Gets or sets an OpenTK.Vector4d with the Z, W, Y, and X components of this instance. More...
 
Vector4d Zwzy [get, set]
 Gets an OpenTK.Vector4d with the Z, W, Z, and Y components of this instance. More...
 
Vector4d Wxyz [get, set]
 Gets or sets an OpenTK.Vector4d with the W, X, Y, and Z components of this instance. More...
 
Vector4d Wxzy [get, set]
 Gets or sets an OpenTK.Vector4d with the W, X, Z, and Y components of this instance. More...
 
Vector4d Wyxz [get, set]
 Gets or sets an OpenTK.Vector4d with the W, Y, X, and Z components of this instance. More...
 
Vector4d Wyzx [get, set]
 Gets or sets an OpenTK.Vector4d with the W, Y, Z, and X components of this instance. More...
 
Vector4d Wzxy [get, set]
 Gets or sets an OpenTK.Vector4d with the W, Z, X, and Y components of this instance. More...
 
Vector4d Wzyx [get, set]
 Gets or sets an OpenTK.Vector4d with the W, Z, Y, and X components of this instance. More...
 
Vector4d Wzyw [get, set]
 Gets an OpenTK.Vector4d with the W, Z, Y, and W components of this instance. More...
 

Detailed Description

Represents a 4D vector using four double-precision floating-point numbers.

Constructor & Destructor Documentation

OpenTK.Vector4d.Vector4d ( double  value)

Constructs a new instance.

Parameters
valueThe value that will initialize this instance.
OpenTK.Vector4d.Vector4d ( double  x,
double  y,
double  z,
double  w 
)

Constructs a new Vector4d.

Parameters
xThe x component of the Vector4d.
yThe y component of the Vector4d.
zThe z component of the Vector4d.
wThe w component of the Vector4d.
OpenTK.Vector4d.Vector4d ( Vector2d  v)

Constructs a new Vector4d from the given Vector2d.

Parameters
vThe Vector2d to copy components from.
OpenTK.Vector4d.Vector4d ( Vector3d  v)

Constructs a new Vector4d from the given Vector3d. The w component is initialized to 0.

Parameters
vThe Vector3d to copy components from.
See Also
Vector4d(Vector3d, double)
OpenTK.Vector4d.Vector4d ( Vector3d  v,
double  w 
)

Constructs a new Vector4d from the specified Vector3d and w component.

Parameters
vThe Vector3d to copy components from.
wThe w component of the new Vector4.
OpenTK.Vector4d.Vector4d ( Vector4d  v)

Constructs a new Vector4d from the given Vector4d.

Parameters
vThe Vector4d to copy components from.

Member Function Documentation

void OpenTK.Vector4d.Add ( Vector4d  right)

Add the Vector passed as parameter to this instance.

Parameters
rightRight operand. This parameter is only read from.
void OpenTK.Vector4d.Add ( ref Vector4d  right)

Add the Vector passed as parameter to this instance.

Parameters
rightRight operand. This parameter is only read from.
static Vector4d OpenTK.Vector4d.Add ( Vector4d  a,
Vector4d  b 
)
static

Adds two vectors.

Parameters
aLeft operand.
bRight operand.
Returns
Result of operation.
static void OpenTK.Vector4d.Add ( ref Vector4d  a,
ref Vector4d  b,
out Vector4d  result 
)
static

Adds two vectors.

Parameters
aLeft operand.
bRight operand.
resultResult of operation.
static Vector4d OpenTK.Vector4d.BaryCentric ( Vector4d  a,
Vector4d  b,
Vector4d  c,
double  u,
double  v 
)
static

Interpolate 3 Vectors using Barycentric coordinates

Parameters
aFirst input Vector
bSecond input Vector
cThird input Vector
uFirst Barycentric Coordinate
vSecond Barycentric Coordinate
Returns
a when u=v=0, b when u=1,v=0, c when u=0,v=1, and a linear combination of a,b,c otherwise
static void OpenTK.Vector4d.BaryCentric ( ref Vector4d  a,
ref Vector4d  b,
ref Vector4d  c,
double  u,
double  v,
out Vector4d  result 
)
static

Interpolate 3 Vectors using Barycentric coordinates

Parameters
aFirst input Vector.
bSecond input Vector.
cThird input Vector.
uFirst Barycentric Coordinate.
vSecond Barycentric Coordinate.
resultOutput Vector. a when u=v=0, b when u=1,v=0, c when u=0,v=1, and a linear combination of a,b,c otherwise
static Vector4d OpenTK.Vector4d.Clamp ( Vector4d  vec,
Vector4d  min,
Vector4d  max 
)
static

Clamp a vector to the given minimum and maximum vectors

Parameters
vecInput vector
minMinimum vector
maxMaximum vector
Returns
The clamped vector
static void OpenTK.Vector4d.Clamp ( ref Vector4d  vec,
ref Vector4d  min,
ref Vector4d  max,
out Vector4d  result 
)
static

Clamp a vector to the given minimum and maximum vectors

Parameters
vecInput vector
minMinimum vector
maxMaximum vector
resultThe clamped vector
void OpenTK.Vector4d.Div ( double  f)

Divide this instance by a scalar.

Parameters
fScalar operand.
static Vector4d OpenTK.Vector4d.Div ( Vector4d  a,
double  f 
)
static

Divide a vector by a scalar

Parameters
aVector operand
fScalar operand
Returns
Result of the division
static void OpenTK.Vector4d.Div ( ref Vector4d  a,
double  f,
out Vector4d  result 
)
static

Divide a vector by a scalar

Parameters
aVector operand
fScalar operand
resultResult of the division
static Vector4d OpenTK.Vector4d.Divide ( Vector4d  vector,
double  scale 
)
static

Divides a vector by a scalar.

Parameters
vectorLeft operand.
scaleRight operand.
Returns
Result of the operation.
static void OpenTK.Vector4d.Divide ( ref Vector4d  vector,
double  scale,
out Vector4d  result 
)
static

Divides a vector by a scalar.

Parameters
vectorLeft operand.
scaleRight operand.
resultResult of the operation.
static Vector4d OpenTK.Vector4d.Divide ( Vector4d  vector,
Vector4d  scale 
)
static

Divides a vector by the components of a vector (scale).

Parameters
vectorLeft operand.
scaleRight operand.
Returns
Result of the operation.
static void OpenTK.Vector4d.Divide ( ref Vector4d  vector,
ref Vector4d  scale,
out Vector4d  result 
)
static

Divide a vector by the components of a vector (scale).

Parameters
vectorLeft operand.
scaleRight operand.
resultResult of the operation.
static double OpenTK.Vector4d.Dot ( Vector4d  left,
Vector4d  right 
)
static

Calculate the dot product of two vectors

Parameters
leftFirst operand
rightSecond operand
Returns
The dot product of the two inputs
static void OpenTK.Vector4d.Dot ( ref Vector4d  left,
ref Vector4d  right,
out double  result 
)
static

Calculate the dot product of two vectors

Parameters
leftFirst operand
rightSecond operand
resultThe dot product of the two inputs
override bool OpenTK.Vector4d.Equals ( object  obj)

Indicates whether this instance and a specified object are equal.

Parameters
objThe object to compare to.
Returns
True if the instances are equal; false otherwise.
bool OpenTK.Vector4d.Equals ( Vector4d  other)

Indicates whether the current vector is equal to another vector.

Parameters
otherA vector to compare with this vector.
Returns
true if the current vector is equal to the vector parameter; otherwise, false.
override int OpenTK.Vector4d.GetHashCode ( )

Returns the hashcode for this instance.

Returns
A System.Int32 containing the unique hashcode for this instance.
static Vector4d OpenTK.Vector4d.Lerp ( Vector4d  a,
Vector4d  b,
double  blend 
)
static

Returns a new Vector that is the linear blend of the 2 given Vectors

Parameters
aFirst input vector
bSecond input vector
blendThe blend factor. a when blend=0, b when blend=1.
Returns
a when blend=0, b when blend=1, and a linear combination otherwise
static void OpenTK.Vector4d.Lerp ( ref Vector4d  a,
ref Vector4d  b,
double  blend,
out Vector4d  result 
)
static

Returns a new Vector that is the linear blend of the 2 given Vectors

Parameters
aFirst input vector
bSecond input vector
blendThe blend factor. a when blend=0, b when blend=1.
resulta when blend=0, b when blend=1, and a linear combination otherwise
static Vector4d OpenTK.Vector4d.Max ( Vector4d  a,
Vector4d  b 
)
static

Calculate the component-wise maximum of two vectors

Parameters
aFirst operand
bSecond operand
Returns
The component-wise maximum
static void OpenTK.Vector4d.Max ( ref Vector4d  a,
ref Vector4d  b,
out Vector4d  result 
)
static

Calculate the component-wise maximum of two vectors

Parameters
aFirst operand
bSecond operand
resultThe component-wise maximum
static Vector4d OpenTK.Vector4d.Min ( Vector4d  a,
Vector4d  b 
)
static

Calculate the component-wise minimum of two vectors

Parameters
aFirst operand
bSecond operand
Returns
The component-wise minimum
static void OpenTK.Vector4d.Min ( ref Vector4d  a,
ref Vector4d  b,
out Vector4d  result 
)
static

Calculate the component-wise minimum of two vectors

Parameters
aFirst operand
bSecond operand
resultThe component-wise minimum
void OpenTK.Vector4d.Mult ( double  f)

Multiply this instance by a scalar.

Parameters
fScalar operand.
static Vector4d OpenTK.Vector4d.Mult ( Vector4d  a,
double  f 
)
static

Multiply a vector and a scalar

Parameters
aVector operand
fScalar operand
Returns
Result of the multiplication
static void OpenTK.Vector4d.Mult ( ref Vector4d  a,
double  f,
out Vector4d  result 
)
static

Multiply a vector and a scalar

Parameters
aVector operand
fScalar operand
resultResult of the multiplication
static Vector4d OpenTK.Vector4d.Multiply ( Vector4d  vector,
double  scale 
)
static

Multiplies a vector by a scalar.

Parameters
vectorLeft operand.
scaleRight operand.
Returns
Result of the operation.
static void OpenTK.Vector4d.Multiply ( ref Vector4d  vector,
double  scale,
out Vector4d  result 
)
static

Multiplies a vector by a scalar.

Parameters
vectorLeft operand.
scaleRight operand.
resultResult of the operation.
static Vector4d OpenTK.Vector4d.Multiply ( Vector4d  vector,
Vector4d  scale 
)
static

Multiplies a vector by the components a vector (scale).

Parameters
vectorLeft operand.
scaleRight operand.
Returns
Result of the operation.
static void OpenTK.Vector4d.Multiply ( ref Vector4d  vector,
ref Vector4d  scale,
out Vector4d  result 
)
static

Multiplies a vector by the components of a vector (scale).

Parameters
vectorLeft operand.
scaleRight operand.
resultResult of the operation.
void OpenTK.Vector4d.Normalize ( )

Scales the Vector4d to unit length.

static Vector4d OpenTK.Vector4d.Normalize ( Vector4d  vec)
static

Scale a vector to unit length

Parameters
vecThe input vector
Returns
The normalized vector
static void OpenTK.Vector4d.Normalize ( ref Vector4d  vec,
out Vector4d  result 
)
static

Scale a vector to unit length

Parameters
vecThe input vector
resultThe normalized vector
Vector4d OpenTK.Vector4d.Normalized ( )

Returns a copy of the Vector4d scaled to unit length.

void OpenTK.Vector4d.NormalizeFast ( )

Scales the Vector4d to approximately unit length.

static Vector4d OpenTK.Vector4d.NormalizeFast ( Vector4d  vec)
static

Scale a vector to approximately unit length

Parameters
vecThe input vector
Returns
The normalized vector
static void OpenTK.Vector4d.NormalizeFast ( ref Vector4d  vec,
out Vector4d  result 
)
static

Scale a vector to approximately unit length

Parameters
vecThe input vector
resultThe normalized vector
unsafe static OpenTK.Vector4d.operator double * ( Vector4d  v)
explicitstatic

Returns a pointer to the first element of the specified instance.

Parameters
vThe instance.
Returns
A pointer to the first element of v.
static OpenTK.Vector4d.operator IntPtr ( Vector4d  v)
explicitstatic

Returns a pointer to the first element of the specified instance.

Parameters
vThe instance.
Returns
A pointer to the first element of v.
static OpenTK.Vector4d.operator Vector4 ( Vector4d  v4d)
explicitstatic

Converts OpenTK.Vector4d to OpenTK.Vector4.

Parameters
v4dThe Vector4d to convert.
Returns
The resulting Vector4.
static OpenTK.Vector4d.operator Vector4d ( Vector4  v4)
explicitstatic

Converts OpenTK.Vector4 to OpenTK.Vector4d.

Parameters
v4The Vector4 to convert.
Returns
The resulting Vector4d.
static bool OpenTK.Vector4d.operator!= ( Vector4d  left,
Vector4d  right 
)
static

Compares two instances for inequality.

Parameters
leftThe first instance.
rightThe second instance.
Returns
True, if left does not equa lright; false otherwise.
static Vector4d OpenTK.Vector4d.operator* ( Vector4d  vec,
double  scale 
)
static

Multiplies an instance by a scalar.

Parameters
vecThe instance.
scaleThe scalar.
Returns
The result of the calculation.
static Vector4d OpenTK.Vector4d.operator* ( double  scale,
Vector4d  vec 
)
static

Multiplies an instance by a scalar.

Parameters
scaleThe scalar.
vecThe instance.
Returns
The result of the calculation.
static Vector4d OpenTK.Vector4d.operator+ ( Vector4d  left,
Vector4d  right 
)
static

Adds two instances.

Parameters
leftThe first instance.
rightThe second instance.
Returns
The result of the calculation.
static Vector4d OpenTK.Vector4d.operator- ( Vector4d  left,
Vector4d  right 
)
static

Subtracts two instances.

Parameters
leftThe first instance.
rightThe second instance.
Returns
The result of the calculation.
static Vector4d OpenTK.Vector4d.operator- ( Vector4d  vec)
static

Negates an instance.

Parameters
vecThe instance.
Returns
The result of the calculation.
static Vector4d OpenTK.Vector4d.operator/ ( Vector4d  vec,
double  scale 
)
static

Divides an instance by a scalar.

Parameters
vecThe instance.
scaleThe scalar.
Returns
The result of the calculation.
static bool OpenTK.Vector4d.operator== ( Vector4d  left,
Vector4d  right 
)
static

Compares two instances for equality.

Parameters
leftThe first instance.
rightThe second instance.
Returns
True, if left equals right; false otherwise.
void OpenTK.Vector4d.Scale ( double  sx,
double  sy,
double  sz,
double  sw 
)

Scales the current Vector4d by the given amounts.

Parameters
sxThe scale of the X component.
syThe scale of the Y component.
szThe scale of the Z component.
swThe scale of the Z component.
void OpenTK.Vector4d.Scale ( Vector4d  scale)

Scales this instance by the given parameter.

Parameters
scaleThe scaling of the individual components.
void OpenTK.Vector4d.Scale ( ref Vector4d  scale)

Scales this instance by the given parameter.

Parameters
scaleThe scaling of the individual components.
void OpenTK.Vector4d.Sub ( Vector4d  right)

Subtract the Vector passed as parameter from this instance.

Parameters
rightRight operand. This parameter is only read from.
void OpenTK.Vector4d.Sub ( ref Vector4d  right)

Subtract the Vector passed as parameter from this instance.

Parameters
rightRight operand. This parameter is only read from.
static Vector4d OpenTK.Vector4d.Sub ( Vector4d  a,
Vector4d  b 
)
static

Subtract one Vector from another

Parameters
aFirst operand
bSecond operand
Returns
Result of subtraction
static void OpenTK.Vector4d.Sub ( ref Vector4d  a,
ref Vector4d  b,
out Vector4d  result 
)
static

Subtract one Vector from another

Parameters
aFirst operand
bSecond operand
resultResult of subtraction
static Vector4d OpenTK.Vector4d.Subtract ( Vector4d  a,
Vector4d  b 
)
static

Subtract one Vector from another

Parameters
aFirst operand
bSecond operand
Returns
Result of subtraction
static void OpenTK.Vector4d.Subtract ( ref Vector4d  a,
ref Vector4d  b,
out Vector4d  result 
)
static

Subtract one Vector from another

Parameters
aFirst operand
bSecond operand
resultResult of subtraction
override string OpenTK.Vector4d.ToString ( )

Returns a System.String that represents the current Vector4d.

Returns
static Vector4d OpenTK.Vector4d.Transform ( Vector4d  vec,
Matrix4d  mat 
)
static

Transform a Vector by the given Matrix

Parameters
vecThe vector to transform
matThe desired transformation
Returns
The transformed vector
static void OpenTK.Vector4d.Transform ( ref Vector4d  vec,
ref Matrix4d  mat,
out Vector4d  result 
)
static

Transform a Vector by the given Matrix

Parameters
vecThe vector to transform
matThe desired transformation
resultThe transformed vector
static Vector4d OpenTK.Vector4d.Transform ( Vector4d  vec,
Quaterniond  quat 
)
static

Transforms a vector by a quaternion rotation.

Parameters
vecThe vector to transform.
quatThe quaternion to rotate the vector by.
Returns
The result of the operation.
static void OpenTK.Vector4d.Transform ( ref Vector4d  vec,
ref Quaterniond  quat,
out Vector4d  result 
)
static

Transforms a vector by a quaternion rotation.

Parameters
vecThe vector to transform.
quatThe quaternion to rotate the vector by.
resultThe result of the operation.

Member Data Documentation

readonly Vector4d OpenTK.Vector4d.One = new Vector4d(1, 1, 1, 1)
static

Defines an instance with all components set to 1.

readonly int OpenTK.Vector4d.SizeInBytes = Marshal.SizeOf(new Vector4d())
static

Defines the size of the Vector4d struct in bytes.

readonly Vector4d OpenTK.Vector4d.UnitW = new Vector4d(0, 0, 0, 1)
static

Defines a unit-length Vector4d that points towards the W-axis.

readonly Vector4d OpenTK.Vector4d.UnitX = new Vector4d(1, 0, 0, 0)
static

Defines a unit-length Vector4d that points towards the X-axis.

readonly Vector4d OpenTK.Vector4d.UnitY = new Vector4d(0, 1, 0, 0)
static

Defines a unit-length Vector4d that points towards the Y-axis.

readonly Vector4d OpenTK.Vector4d.UnitZ = new Vector4d(0, 0, 1, 0)
static

Defines a unit-length Vector4d that points towards the Z-axis.

double OpenTK.Vector4d.W

The W component of the Vector4d.

double OpenTK.Vector4d.X

The X component of the Vector4d.

double OpenTK.Vector4d.Y

The Y component of the Vector4d.

double OpenTK.Vector4d.Z

The Z component of the Vector4d.

readonly Vector4d OpenTK.Vector4d.Zero = new Vector4d(0, 0, 0, 0)
static

Defines a zero-length Vector4d.

Property Documentation

double OpenTK.Vector4d.Length
get

Gets the length (magnitude) of the vector.

LengthFast

See Also
LengthSquared
double OpenTK.Vector4d.LengthFast
get

Gets an approximation of the vector length (magnitude).

This property uses an approximation of the square root function to calculate vector magnitude, with an upper error bound of 0.001.

Length

See Also
LengthSquared
double OpenTK.Vector4d.LengthSquared
get

Gets the square of the vector length (magnitude).

This property avoids the costly square root operation required by the Length property. This makes it more suitable for comparisons.

Length

double OpenTK.Vector4d.this[int index]
getset

Gets or sets the value at the index of the Vector.

Vector2d OpenTK.Vector4d.Wx
getset

Gets or sets an OpenTK.Vector2d with the W and X components of this instance.

Vector3d OpenTK.Vector4d.Wxy
getset

Gets or sets an OpenTK.Vector3d with the W, X, and Y components of this instance.

Vector4d OpenTK.Vector4d.Wxyz
getset

Gets or sets an OpenTK.Vector4d with the W, X, Y, and Z components of this instance.

Vector3d OpenTK.Vector4d.Wxz
getset

Gets or sets an OpenTK.Vector3d with the W, X, and Z components of this instance.

Vector4d OpenTK.Vector4d.Wxzy
getset

Gets or sets an OpenTK.Vector4d with the W, X, Z, and Y components of this instance.

Vector2d OpenTK.Vector4d.Wy
getset

Gets or sets an OpenTK.Vector2d with the W and Y components of this instance.

Vector3d OpenTK.Vector4d.Wyx
getset

Gets or sets an OpenTK.Vector3d with the W, Y, and X components of this instance.

Vector4d OpenTK.Vector4d.Wyxz
getset

Gets or sets an OpenTK.Vector4d with the W, Y, X, and Z components of this instance.

Vector3d OpenTK.Vector4d.Wyz
getset

Gets or sets an OpenTK.Vector3d with the W, Y, and Z components of this instance.

Vector4d OpenTK.Vector4d.Wyzx
getset

Gets or sets an OpenTK.Vector4d with the W, Y, Z, and X components of this instance.

Vector2d OpenTK.Vector4d.Wz
getset

Gets or sets an OpenTK.Vector2d with the W and Z components of this instance.

Vector3d OpenTK.Vector4d.Wzx
getset

Gets or sets an OpenTK.Vector3d with the W, Z, and X components of this instance.

Vector4d OpenTK.Vector4d.Wzxy
getset

Gets or sets an OpenTK.Vector4d with the W, Z, X, and Y components of this instance.

Vector3d OpenTK.Vector4d.Wzy
getset

Gets or sets an OpenTK.Vector3d with the W, Z, and Y components of this instance.

Vector4d OpenTK.Vector4d.Wzyw
getset

Gets an OpenTK.Vector4d with the W, Z, Y, and W components of this instance.

Vector4d OpenTK.Vector4d.Wzyx
getset

Gets or sets an OpenTK.Vector4d with the W, Z, Y, and X components of this instance.

Vector2d OpenTK.Vector4d.Xw
getset

Gets or sets an OpenTK.Vector2d with the X and W components of this instance.

Vector3d OpenTK.Vector4d.Xwy
getset

Gets or sets an OpenTK.Vector3d with the X, W, and Y components of this instance.

Vector4d OpenTK.Vector4d.Xwyz
getset

Gets or sets an OpenTK.Vector4d with the X, W, Y, and Z components of this instance.

Vector3d OpenTK.Vector4d.Xwz
getset

Gets or sets an OpenTK.Vector3d with the X, W, and Z components of this instance.

Vector4d OpenTK.Vector4d.Xwzy
getset

Gets or sets an OpenTK.Vector4d with the X, W, Z, and Y components of this instance.

Vector2d OpenTK.Vector4d.Xy
getset

Gets or sets an OpenTK.Vector2d with the X and Y components of this instance.

Vector3d OpenTK.Vector4d.Xyw
getset

Gets or sets an OpenTK.Vector3d with the X, Y, and Z components of this instance.

Vector4d OpenTK.Vector4d.Xywz
getset

Gets or sets an OpenTK.Vector4d with the X, Y, W, and Z components of this instance.

Vector3d OpenTK.Vector4d.Xyz
getset

Gets or sets an OpenTK.Vector3d with the X, Y, and Z components of this instance.

Vector2d OpenTK.Vector4d.Xz
getset

Gets or sets an OpenTK.Vector2d with the X and Z components of this instance.

Vector3d OpenTK.Vector4d.Xzw
getset

Gets or sets an OpenTK.Vector3d with the X, Z, and W components of this instance.

Vector4d OpenTK.Vector4d.Xzwy
getset

Gets or sets an OpenTK.Vector4d with the X, Z, W, and Y components of this instance.

Vector3d OpenTK.Vector4d.Xzy
getset

Gets or sets an OpenTK.Vector3d with the X, Z, and Y components of this instance.

Vector4d OpenTK.Vector4d.Xzyw
getset

Gets or sets an OpenTK.Vector4d with the X, Z, Y, and W components of this instance.

Vector2d OpenTK.Vector4d.Yw
getset

Gets or sets an OpenTK.Vector2d with the Y and W components of this instance.

Vector3d OpenTK.Vector4d.Ywx
getset

Gets or sets an OpenTK.Vector3d with the Y, W, and X components of this instance.

Vector4d OpenTK.Vector4d.Ywxz
getset

Gets or sets an OpenTK.Vector4d with the Y, W, X, and Z components of this instance.

Vector3d OpenTK.Vector4d.Ywz
getset

Gets an OpenTK.Vector3d with the Y, W, and Z components of this instance.

Vector4d OpenTK.Vector4d.Ywzx
getset

Gets or sets an OpenTK.Vector4d with the Y, W, Z, and X components of this instance.

Vector2d OpenTK.Vector4d.Yx
getset

Gets or sets an OpenTK.Vector2d with the Y and X components of this instance.

Vector3d OpenTK.Vector4d.Yxw
getset

Gets or sets an OpenTK.Vector3d with the Y, X, and W components of this instance.

Vector4d OpenTK.Vector4d.Yxwz
getset

Gets or sets an OpenTK.Vector4d with the Y, X, W, and Z components of this instance.

Vector3d OpenTK.Vector4d.Yxz
getset

Gets or sets an OpenTK.Vector3d with the Y, X, and Z components of this instance.

Vector4d OpenTK.Vector4d.Yxzw
getset

Gets or sets an OpenTK.Vector4d with the Y, X, Z, and W components of this instance.

Vector4d OpenTK.Vector4d.Yywz
getset

Gets an OpenTK.Vector4d with the Y, Y, W, and Z components of this instance.

Vector4d OpenTK.Vector4d.Yyzw
getset

Gets an OpenTK.Vector4d with the Y, Y, Z, and W components of this instance.

Vector2d OpenTK.Vector4d.Yz
getset

Gets or sets an OpenTK.Vector2d with the Y and Z components of this instance.

Vector3d OpenTK.Vector4d.Yzw
getset

Gets or sets an OpenTK.Vector3d with the Y, Z, and W components of this instance.

Vector4d OpenTK.Vector4d.Yzwx
getset

Gets or sets an OpenTK.Vector4d with the Y, Z, W, and X components of this instance.

Vector3d OpenTK.Vector4d.Yzx
getset

Gets or sets an OpenTK.Vector3d with the Y, Z, and X components of this instance.

Vector4d OpenTK.Vector4d.Yzxw
getset

Gets or sets an OpenTK.Vector4d with the Y, Z, X, and W components of this instance.

Vector2d OpenTK.Vector4d.Zw
getset

Gets an OpenTK.Vector2d with the Z and W components of this instance.

Vector3d OpenTK.Vector4d.Zwx
getset

Gets or sets an OpenTK.Vector3d with the Z, W, and X components of this instance.

Vector4d OpenTK.Vector4d.Zwxy
getset

Gets or sets an OpenTK.Vector4d with the Z, W, X, and Y components of this instance.

Vector3d OpenTK.Vector4d.Zwy
getset

Gets or sets an OpenTK.Vector3d with the Z, W, and Y components of this instance.

Vector4d OpenTK.Vector4d.Zwyx
getset

Gets or sets an OpenTK.Vector4d with the Z, W, Y, and X components of this instance.

Vector4d OpenTK.Vector4d.Zwzy
getset

Gets an OpenTK.Vector4d with the Z, W, Z, and Y components of this instance.

Vector2d OpenTK.Vector4d.Zx
getset

Gets or sets an OpenTK.Vector2d with the Z and X components of this instance.

Vector3d OpenTK.Vector4d.Zxw
getset

Gets or sets an OpenTK.Vector3d with the Z, X, and W components of this instance.

Vector4d OpenTK.Vector4d.Zxwy
getset

Gets or sets an OpenTK.Vector4d with the Z, X, W, and Y components of this instance.

Vector3d OpenTK.Vector4d.Zxy
getset

Gets or sets an OpenTK.Vector3d with the Z, X, and Y components of this instance.

Vector4d OpenTK.Vector4d.Zxyw
getset

Gets or sets an OpenTK.Vector4d with the Z, X, Y, and Z components of this instance.

Vector2d OpenTK.Vector4d.Zy
getset

Gets or sets an OpenTK.Vector2d with the Z and Y components of this instance.

Vector3d OpenTK.Vector4d.Zyw
getset

Gets or sets an OpenTK.Vector3d with the Z, Y, and W components of this instance.

Vector4d OpenTK.Vector4d.Zywx
getset

Gets or sets an OpenTK.Vector4d with the Z, Y, W, and X components of this instance.

Vector3d OpenTK.Vector4d.Zyx
getset

Gets or sets an OpenTK.Vector3d with the Z, Y, and X components of this instance.

Vector4d OpenTK.Vector4d.Zyxw
getset

Gets or sets an OpenTK.Vector4d with the Z, Y, X, and W components of this instance.