OpenTK.Vector3d Struct Reference

Represents a 3D vector using three double-precision floating-point numbers. More...

List of all members.

Public Member Functions

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

Static Public Member Functions

static Vector3d Sub (Vector3d a, Vector3d b)
 Subtract one Vector from another.
static void Sub (ref Vector3d a, ref Vector3d b, out Vector3d result)
 Subtract one Vector from another.
static Vector3d Mult (Vector3d a, double f)
 Multiply a vector and a scalar.
static void Mult (ref Vector3d a, double f, out Vector3d result)
 Multiply a vector and a scalar.
static Vector3d Div (Vector3d a, double f)
 Divide a vector by a scalar.
static void Div (ref Vector3d a, double f, out Vector3d result)
 Divide a vector by a scalar.
static Vector3d Add (Vector3d a, Vector3d b)
 Adds two vectors.
static void Add (ref Vector3d a, ref Vector3d b, out Vector3d result)
 Adds two vectors.
static Vector3d Subtract (Vector3d a, Vector3d b)
 Subtract one Vector from another.
static void Subtract (ref Vector3d a, ref Vector3d b, out Vector3d result)
 Subtract one Vector from another.
static Vector3d Multiply (Vector3d vector, double scale)
 Multiplies a vector by a scalar.
static void Multiply (ref Vector3d vector, double scale, out Vector3d result)
 Multiplies a vector by a scalar.
static Vector3d Multiply (Vector3d vector, Vector3d scale)
 Multiplies a vector by the components a vector (scale).
static void Multiply (ref Vector3d vector, ref Vector3d scale, out Vector3d result)
 Multiplies a vector by the components of a vector (scale).
static Vector3d Divide (Vector3d vector, double scale)
 Divides a vector by a scalar.
static void Divide (ref Vector3d vector, double scale, out Vector3d result)
 Divides a vector by a scalar.
static Vector3d Divide (Vector3d vector, Vector3d scale)
 Divides a vector by the components of a vector (scale).
static void Divide (ref Vector3d vector, ref Vector3d scale, out Vector3d result)
 Divide a vector by the components of a vector (scale).
static Vector3d ComponentMin (Vector3d a, Vector3d b)
 Calculate the component-wise minimum of two vectors.
static void ComponentMin (ref Vector3d a, ref Vector3d b, out Vector3d result)
 Calculate the component-wise minimum of two vectors.
static Vector3d ComponentMax (Vector3d a, Vector3d b)
 Calculate the component-wise maximum of two vectors.
static void ComponentMax (ref Vector3d a, ref Vector3d b, out Vector3d result)
 Calculate the component-wise maximum of two vectors.
static Vector3d Min (Vector3d left, Vector3d right)
 Returns the Vector3d with the minimum magnitude.
static Vector3d Max (Vector3d left, Vector3d right)
 Returns the Vector3d with the minimum magnitude.
static Vector3d Clamp (Vector3d vec, Vector3d min, Vector3d max)
 Clamp a vector to the given minimum and maximum vectors.
static void Clamp (ref Vector3d vec, ref Vector3d min, ref Vector3d max, out Vector3d result)
 Clamp a vector to the given minimum and maximum vectors.
static Vector3d Normalize (Vector3d vec)
 Scale a vector to unit length.
static void Normalize (ref Vector3d vec, out Vector3d result)
 Scale a vector to unit length.
static Vector3d NormalizeFast (Vector3d vec)
 Scale a vector to approximately unit length.
static void NormalizeFast (ref Vector3d vec, out Vector3d result)
 Scale a vector to approximately unit length.
static double Dot (Vector3d left, Vector3d right)
 Calculate the dot (scalar) product of two vectors.
static void Dot (ref Vector3d left, ref Vector3d right, out double result)
 Calculate the dot (scalar) product of two vectors.
static Vector3d Cross (Vector3d left, Vector3d right)
 Caclulate the cross (vector) product of two vectors.
static void Cross (ref Vector3d left, ref Vector3d right, out Vector3d result)
 Caclulate the cross (vector) product of two vectors.
static Vector3d Lerp (Vector3d a, Vector3d b, double blend)
 Returns a new Vector that is the linear blend of the 2 given Vectors.
static void Lerp (ref Vector3d a, ref Vector3d b, double blend, out Vector3d result)
 Returns a new Vector that is the linear blend of the 2 given Vectors.
static Vector3d BaryCentric (Vector3d a, Vector3d b, Vector3d c, double u, double v)
 Interpolate 3 Vectors using Barycentric coordinates.
static void BaryCentric (ref Vector3d a, ref Vector3d b, ref Vector3d c, double u, double v, out Vector3d result)
 Interpolate 3 Vectors using Barycentric coordinates.
static Vector3d TransformVector (Vector3d vec, Matrix4d mat)
 Transform a direction vector by the given Matrix Assumes the matrix has a bottom row of (0,0,0,1), that is the translation part is ignored.
static void TransformVector (ref Vector3d vec, ref Matrix4d mat, out Vector3d result)
 Transform a direction vector by the given Matrix Assumes the matrix has a bottom row of (0,0,0,1), that is the translation part is ignored.
static Vector3d TransformNormal (Vector3d norm, Matrix4d mat)
 Transform a Normal by the given Matrix.
static void TransformNormal (ref Vector3d norm, ref Matrix4d mat, out Vector3d result)
 Transform a Normal by the given Matrix.
static Vector3d TransformNormalInverse (Vector3d norm, Matrix4d invMat)
 Transform a Normal by the (transpose of the) given Matrix.
static void TransformNormalInverse (ref Vector3d norm, ref Matrix4d invMat, out Vector3d result)
 Transform a Normal by the (transpose of the) given Matrix.
static Vector3d TransformPosition (Vector3d pos, Matrix4d mat)
 Transform a Position by the given Matrix.
static void TransformPosition (ref Vector3d pos, ref Matrix4d mat, out Vector3d result)
 Transform a Position by the given Matrix.
static Vector3d Transform (Vector3d vec, Matrix4d mat)
 Transform a Vector by the given Matrix.
static void Transform (ref Vector3d vec, ref Matrix4d mat, out Vector3d result)
 Transform a Vector by the given Matrix.
static Vector3d Transform (Vector3d vec, Quaterniond quat)
 Transforms a vector by a quaternion rotation.
static void Transform (ref Vector3d vec, ref Quaterniond quat, out Vector3d result)
 Transforms a vector by a quaternion rotation.
static Vector3d TransformPerspective (Vector3d vec, Matrix4d mat)
 Transform a Vector3d by the given Matrix, and project the resulting Vector4 back to a Vector3.
static void TransformPerspective (ref Vector3d vec, ref Matrix4d mat, out Vector3d result)
 Transform a Vector3d by the given Matrix, and project the resulting Vector4d back to a Vector3d.
static double CalculateAngle (Vector3d first, Vector3d second)
 Calculates the angle (in radians) between two vectors.
static void CalculateAngle (ref Vector3d first, ref Vector3d second, out double result)
 Calculates the angle (in radians) between two vectors.
static Vector3d operator+ (Vector3d left, Vector3d right)
 Adds two instances.
static Vector3d operator- (Vector3d left, Vector3d right)
 Subtracts two instances.
static Vector3d operator- (Vector3d vec)
 Negates an instance.
static Vector3d operator* (Vector3d vec, double scale)
 Multiplies an instance by a scalar.
static Vector3d operator* (double scale, Vector3d vec)
 Multiplies an instance by a scalar.
static Vector3d operator/ (Vector3d vec, double scale)
 Divides an instance by a scalar.
static bool operator== (Vector3d left, Vector3d right)
 Compares two instances for equality.
static bool operator!= (Vector3d left, Vector3d right)
 Compares two instances for inequality.
static operator Vector3d (Vector3 v3)
 Converts OpenTK.Vector3 to OpenTK.Vector3d.
static operator Vector3 (Vector3d v3d)
 Converts OpenTK.Vector3d to OpenTK.Vector3.

Public Attributes

double X
 The X component of the Vector3.
double Y
 The Y component of the Vector3.
double Z
 The Z component of the Vector3.

Static Public Attributes

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

Properties

double Length [get]
 Gets the length (magnitude) of the vector.
double LengthFast [get]
 Gets an approximation of the vector length (magnitude).
double LengthSquared [get]
 Gets the square of the vector length (magnitude).
Vector2d Xy [get, set]
 Gets or sets an OpenTK.Vector2d with the X and Y components of this instance.

Detailed Description

Represents a 3D vector using three double-precision floating-point numbers.

Definition at line 36 of file Vector3d.cs.


Constructor & Destructor Documentation

OpenTK.Vector3d.Vector3d ( double  x,
double  y,
double  z 
)

Constructs a new Vector3.

Parameters:
x The x component of the Vector3.
y The y component of the Vector3.
z The z component of the Vector3.

Definition at line 65 of file Vector3d.cs.

00066         {
00067             X = x;
00068             Y = y;
00069             Z = z;
00070         }

OpenTK.Vector3d.Vector3d ( Vector2d  v  ) 

Constructs a new instance from the given Vector2d.

Parameters:
v The Vector2d to copy components from.

Definition at line 76 of file Vector3d.cs.

00077         {
00078             X = v.X;
00079             Y = v.Y;
00080             Z = 0.0f;
00081         }

OpenTK.Vector3d.Vector3d ( Vector3d  v  ) 

Constructs a new instance from the given Vector3d.

Parameters:
v The Vector3d to copy components from.

Definition at line 87 of file Vector3d.cs.

00088         {
00089             X = v.X;
00090             Y = v.Y;
00091             Z = v.Z;
00092         }

OpenTK.Vector3d.Vector3d ( Vector4d  v  ) 

Constructs a new instance from the given Vector4d.

Parameters:
v The Vector4d to copy components from.

Definition at line 98 of file Vector3d.cs.

00099         {
00100             X = v.X;
00101             Y = v.Y;
00102             Z = v.Z;
00103         }


Member Function Documentation

static void OpenTK.Vector3d.Add ( ref Vector3d  a,
ref Vector3d  b,
out Vector3d  result 
) [static]

Adds two vectors.

Parameters:
a Left operand.
b Right operand.
result Result of operation.

Definition at line 482 of file Vector3d.cs.

00483         {
00484             result = new Vector3d(a.X + b.X, a.Y + b.Y, a.Z + b.Z);
00485         }

static Vector3d OpenTK.Vector3d.Add ( Vector3d  a,
Vector3d  b 
) [static]

Adds two vectors.

Parameters:
a Left operand.
b Right operand.
Returns:
Result of operation.

Definition at line 470 of file Vector3d.cs.

00471         {
00472             Add(ref a, ref b, out a);
00473             return a;
00474         }

void OpenTK.Vector3d.Add ( ref Vector3d  right  ) 

Add the Vector passed as parameter to this instance.

Parameters:
right Right operand. This parameter is only read from.

Definition at line 128 of file Vector3d.cs.

00129         {
00130             this.X += right.X;
00131             this.Y += right.Y;
00132             this.Z += right.Z;
00133         }

void OpenTK.Vector3d.Add ( Vector3d  right  ) 

Add the Vector passed as parameter to this instance.

Parameters:
right Right operand. This parameter is only read from.

Definition at line 117 of file Vector3d.cs.

00118         {
00119             this.X += right.X;
00120             this.Y += right.Y;
00121             this.Z += right.Z;
00122         }

static void OpenTK.Vector3d.BaryCentric ( ref Vector3d  a,
ref Vector3d  b,
ref Vector3d  c,
double  u,
double  v,
out Vector3d  result 
) [static]

Interpolate 3 Vectors using Barycentric coordinates.

Parameters:
a First input Vector.
b Second input Vector.
c Third input Vector.
u First Barycentric Coordinate.
v Second Barycentric Coordinate.
result Output 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

Definition at line 916 of file Vector3d.cs.

00917         {
00918             result = a; // copy
00919 
00920             Vector3d temp = b; // copy
00921             Subtract(ref temp, ref a, out temp);
00922             Multiply(ref temp, u, out temp);
00923             Add(ref result, ref temp, out result);
00924 
00925             temp = c; // copy
00926             Subtract(ref temp, ref a, out temp);
00927             Multiply(ref temp, v, out temp);
00928             Add(ref result, ref temp, out result);
00929         }

static Vector3d OpenTK.Vector3d.BaryCentric ( Vector3d  a,
Vector3d  b,
Vector3d  c,
double  u,
double  v 
) [static]

Interpolate 3 Vectors using Barycentric coordinates.

Parameters:
a First input Vector
b Second input Vector
c Third input Vector
u First Barycentric Coordinate
v Second 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

Definition at line 904 of file Vector3d.cs.

00905         {
00906             return a + u * (b - a) + v * (c - a);
00907         }

static void OpenTK.Vector3d.CalculateAngle ( ref Vector3d  first,
ref Vector3d  second,
out double  result 
) [static]

Calculates the angle (in radians) between two vectors.

Parameters:
first The first vector.
second The second vector.
result Angle (in radians) between the vectors.

Note that the returned angle is never bigger than the constant Pi.

Definition at line 1172 of file Vector3d.cs.

01173         {
01174             double temp;
01175             Vector3d.Dot(ref first, ref second, out temp);
01176             result = System.Math.Acos(temp / (first.Length * second.Length));
01177         }

static double OpenTK.Vector3d.CalculateAngle ( Vector3d  first,
Vector3d  second 
) [static]

Calculates the angle (in radians) between two vectors.

Parameters:
first The first vector.
second The second vector.
Returns:
Angle (in radians) between the vectors.

Note that the returned angle is never bigger than the constant Pi.

Definition at line 1162 of file Vector3d.cs.

01163         {
01164             return System.Math.Acos((Vector3d.Dot(first, second)) / (first.Length * second.Length));
01165         }

static void OpenTK.Vector3d.Clamp ( ref Vector3d  vec,
ref Vector3d  min,
ref Vector3d  max,
out Vector3d  result 
) [static]

Clamp a vector to the given minimum and maximum vectors.

Parameters:
vec Input vector
min Minimum vector
max Maximum vector
result The clamped vector

Definition at line 732 of file Vector3d.cs.

00733         {
00734             result.X = vec.X < min.X ? min.X : vec.X > max.X ? max.X : vec.X;
00735             result.Y = vec.Y < min.Y ? min.Y : vec.Y > max.Y ? max.Y : vec.Y;
00736             result.Z = vec.Z < min.Z ? min.Z : vec.Z > max.Z ? max.Z : vec.Z;
00737         }

static Vector3d OpenTK.Vector3d.Clamp ( Vector3d  vec,
Vector3d  min,
Vector3d  max 
) [static]

Clamp a vector to the given minimum and maximum vectors.

Parameters:
vec Input vector
min Minimum vector
max Maximum vector
Returns:
The clamped vector

Definition at line 717 of file Vector3d.cs.

00718         {
00719             vec.X = vec.X < min.X ? min.X : vec.X > max.X ? max.X : vec.X;
00720             vec.Y = vec.Y < min.Y ? min.Y : vec.Y > max.Y ? max.Y : vec.Y;
00721             vec.Z = vec.Z < min.Z ? min.Z : vec.Z > max.Z ? max.Z : vec.Z;
00722             return vec;
00723         }

static void OpenTK.Vector3d.ComponentMax ( ref Vector3d  a,
ref Vector3d  b,
out Vector3d  result 
) [static]

Calculate the component-wise maximum of two vectors.

Parameters:
a First operand
b Second operand
result The component-wise maximum

Definition at line 669 of file Vector3d.cs.

00670         {
00671             result.X = a.X > b.X ? a.X : b.X;
00672             result.Y = a.Y > b.Y ? a.Y : b.Y;
00673             result.Z = a.Z > b.Z ? a.Z : b.Z;
00674         }

static Vector3d OpenTK.Vector3d.ComponentMax ( Vector3d  a,
Vector3d  b 
) [static]

Calculate the component-wise maximum of two vectors.

Parameters:
a First operand
b Second operand
Returns:
The component-wise maximum

Definition at line 655 of file Vector3d.cs.

00656         {
00657             a.X = a.X > b.X ? a.X : b.X;
00658             a.Y = a.Y > b.Y ? a.Y : b.Y;
00659             a.Z = a.Z > b.Z ? a.Z : b.Z;
00660             return a;
00661         }

static void OpenTK.Vector3d.ComponentMin ( ref Vector3d  a,
ref Vector3d  b,
out Vector3d  result 
) [static]

Calculate the component-wise minimum of two vectors.

Parameters:
a First operand
b Second operand
result The component-wise minimum

Definition at line 638 of file Vector3d.cs.

00639         {
00640             result.X = a.X < b.X ? a.X : b.X;
00641             result.Y = a.Y < b.Y ? a.Y : b.Y;
00642             result.Z = a.Z < b.Z ? a.Z : b.Z;
00643         }

static Vector3d OpenTK.Vector3d.ComponentMin ( Vector3d  a,
Vector3d  b 
) [static]

Calculate the component-wise minimum of two vectors.

Parameters:
a First operand
b Second operand
Returns:
The component-wise minimum

Definition at line 624 of file Vector3d.cs.

00625         {
00626             a.X = a.X < b.X ? a.X : b.X;
00627             a.Y = a.Y < b.Y ? a.Y : b.Y;
00628             a.Z = a.Z < b.Z ? a.Z : b.Z;
00629             return a;
00630         }

static void OpenTK.Vector3d.Cross ( ref Vector3d  left,
ref Vector3d  right,
out Vector3d  result 
) [static]

Caclulate the cross (vector) product of two vectors.

Parameters:
left First operand
right Second operand
Returns:
The cross product of the two inputs
Parameters:
result The cross product of the two inputs

Definition at line 851 of file Vector3d.cs.

00852         {
00853             result = new Vector3d(left.Y * right.Z - left.Z * right.Y,
00854                 left.Z * right.X - left.X * right.Z,
00855                 left.X * right.Y - left.Y * right.X);
00856         }

static Vector3d OpenTK.Vector3d.Cross ( Vector3d  left,
Vector3d  right 
) [static]

Caclulate the cross (vector) product of two vectors.

Parameters:
left First operand
right Second operand
Returns:
The cross product of the two inputs

Definition at line 837 of file Vector3d.cs.

00838         {
00839             Vector3d result;
00840             Cross(ref left, ref right, out result);
00841             return result;
00842         }

static void OpenTK.Vector3d.Div ( ref Vector3d  a,
double  f,
out Vector3d  result 
) [static]

Divide a vector by a scalar.

Parameters:
a Vector operand
f Scalar operand
result Result of the division

Definition at line 450 of file Vector3d.cs.

00451         {
00452             double mult = 1.0 / f;
00453             result.X = a.X * mult;
00454             result.Y = a.Y * mult;
00455             result.Z = a.Z * mult;
00456         }

static Vector3d OpenTK.Vector3d.Div ( Vector3d  a,
double  f 
) [static]

Divide a vector by a scalar.

Parameters:
a Vector operand
f Scalar operand
Returns:
Result of the division

Definition at line 434 of file Vector3d.cs.

00435         {
00436             double mult = 1.0 / f;
00437             a.X *= mult;
00438             a.Y *= mult;
00439             a.Z *= mult;
00440             return a;
00441         }

void OpenTK.Vector3d.Div ( double  f  ) 

Divide this instance by a scalar.

Parameters:
f Scalar operand.

Definition at line 181 of file Vector3d.cs.

00182         {
00183             double mult = 1.0 / f;
00184             this.X *= mult;
00185             this.Y *= mult;
00186             this.Z *= mult;
00187         }

static void OpenTK.Vector3d.Divide ( ref Vector3d  vector,
ref Vector3d  scale,
out Vector3d  result 
) [static]

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

Parameters:
vector Left operand.
scale Right operand.
result Result of the operation.

Definition at line 609 of file Vector3d.cs.

00610         {
00611             result = new Vector3d(vector.X / scale.X, vector.Y / scale.Y, vector.Z / scale.Z);
00612         }

static Vector3d OpenTK.Vector3d.Divide ( Vector3d  vector,
Vector3d  scale 
) [static]

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

Parameters:
vector Left operand.
scale Right operand.
Returns:
Result of the operation.

Definition at line 597 of file Vector3d.cs.

00598         {
00599             Divide(ref vector, ref scale, out vector);
00600             return vector;
00601         }

static void OpenTK.Vector3d.Divide ( ref Vector3d  vector,
double  scale,
out Vector3d  result 
) [static]

Divides a vector by a scalar.

Parameters:
vector Left operand.
scale Right operand.
result Result of the operation.

Definition at line 586 of file Vector3d.cs.

00587         {
00588             Multiply(ref vector, 1 / scale, out result);
00589         }

static Vector3d OpenTK.Vector3d.Divide ( Vector3d  vector,
double  scale 
) [static]

Divides a vector by a scalar.

Parameters:
vector Left operand.
scale Right operand.
Returns:
Result of the operation.

Definition at line 574 of file Vector3d.cs.

00575         {
00576             Divide(ref vector, scale, out vector);
00577             return vector;
00578         }

static void OpenTK.Vector3d.Dot ( ref Vector3d  left,
ref Vector3d  right,
out double  result 
) [static]

Calculate the dot (scalar) product of two vectors.

Parameters:
left First operand
right Second operand
result The dot product of the two inputs

Definition at line 822 of file Vector3d.cs.

00823         {
00824             result = left.X * right.X + left.Y * right.Y + left.Z * right.Z;
00825         }

static double OpenTK.Vector3d.Dot ( Vector3d  left,
Vector3d  right 
) [static]

Calculate the dot (scalar) product of two vectors.

Parameters:
left First operand
right Second operand
Returns:
The dot product of the two inputs

Definition at line 811 of file Vector3d.cs.

00812         {
00813             return left.X * right.X + left.Y * right.Y + left.Z * right.Z;
00814         }

bool OpenTK.Vector3d.Equals ( Vector3d  other  ) 

Indicates whether the current vector is equal to another vector.

Parameters:
other A vector to compare with this vector.
Returns:
true if the current vector is equal to the vector parameter; otherwise, false.

Definition at line 1373 of file Vector3d.cs.

01374         {
01375             return
01376                 X == other.X &&
01377                 Y == other.Y &&
01378                 Z == other.Z;
01379         }

override bool OpenTK.Vector3d.Equals ( object  obj  ) 

Indicates whether this instance and a specified object are equal.

Parameters:
obj The object to compare to.
Returns:
True if the instances are equal; false otherwise.

Definition at line 1354 of file Vector3d.cs.

01355         {
01356             if (!(obj is Vector3))
01357                 return false;
01358 
01359             return this.Equals((Vector3)obj);
01360         }

override int OpenTK.Vector3d.GetHashCode (  ) 

Returns the hashcode for this instance.

Returns:
A System.Int32 containing the unique hashcode for this instance.

Definition at line 1340 of file Vector3d.cs.

01341         {
01342             return X.GetHashCode() ^ Y.GetHashCode() ^ Z.GetHashCode();
01343         }

static void OpenTK.Vector3d.Lerp ( ref Vector3d  a,
ref Vector3d  b,
double  blend,
out Vector3d  result 
) [static]

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

Parameters:
a First input vector
b Second input vector
blend The blend factor. a when blend=0, b when blend=1.
result a when blend=0, b when blend=1, and a linear combination otherwise

Definition at line 884 of file Vector3d.cs.

00885         {
00886             result.X = blend * (b.X - a.X) + a.X;
00887             result.Y = blend * (b.Y - a.Y) + a.Y;
00888             result.Z = blend * (b.Z - a.Z) + a.Z;
00889         }

static Vector3d OpenTK.Vector3d.Lerp ( Vector3d  a,
Vector3d  b,
double  blend 
) [static]

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

Parameters:
a First input vector
b Second input vector
blend The blend factor. a when blend=0, b when blend=1.
Returns:
a when blend=0, b when blend=1, and a linear combination otherwise

Definition at line 869 of file Vector3d.cs.

00870         {
00871             a.X = blend * (b.X - a.X) + a.X;
00872             a.Y = blend * (b.Y - a.Y) + a.Y;
00873             a.Z = blend * (b.Z - a.Z) + a.Z;
00874             return a;
00875         }

static Vector3d OpenTK.Vector3d.Max ( Vector3d  left,
Vector3d  right 
) [static]

Returns the Vector3d with the minimum magnitude.

Parameters:
left Left operand
right Right operand
Returns:
The minimum Vector3

Definition at line 701 of file Vector3d.cs.

00702         {
00703             return left.LengthSquared >= right.LengthSquared ? left : right;
00704         }

static Vector3d OpenTK.Vector3d.Min ( Vector3d  left,
Vector3d  right 
) [static]

Returns the Vector3d with the minimum magnitude.

Parameters:
left Left operand
right Right operand
Returns:
The minimum Vector3

Definition at line 686 of file Vector3d.cs.

00687         {
00688             return left.LengthSquared < right.LengthSquared ? left : right;
00689         }

static void OpenTK.Vector3d.Mult ( ref Vector3d  a,
double  f,
out Vector3d  result 
) [static]

Multiply a vector and a scalar.

Parameters:
a Vector operand
f Scalar operand
result Result of the multiplication

Definition at line 416 of file Vector3d.cs.

00417         {
00418             result.X = a.X * f;
00419             result.Y = a.Y * f;
00420             result.Z = a.Z * f;
00421         }

static Vector3d OpenTK.Vector3d.Mult ( Vector3d  a,
double  f 
) [static]

Multiply a vector and a scalar.

Parameters:
a Vector operand
f Scalar operand
Returns:
Result of the multiplication

Definition at line 401 of file Vector3d.cs.

00402         {
00403             a.X *= f;
00404             a.Y *= f;
00405             a.Z *= f;
00406             return a;
00407         }

void OpenTK.Vector3d.Mult ( double  f  ) 

Multiply this instance by a scalar.

Parameters:
f Scalar operand.

Definition at line 167 of file Vector3d.cs.

00168         {
00169             this.X *= f;
00170             this.Y *= f;
00171             this.Z *= f;
00172         }

static void OpenTK.Vector3d.Multiply ( ref Vector3d  vector,
ref Vector3d  scale,
out Vector3d  result 
) [static]

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

Parameters:
vector Left operand.
scale Right operand.
result Result of the operation.

Definition at line 559 of file Vector3d.cs.

00560         {
00561             result = new Vector3d(vector.X * scale.X, vector.Y * scale.Y, vector.Z * scale.Z);
00562         }

static Vector3d OpenTK.Vector3d.Multiply ( Vector3d  vector,
Vector3d  scale 
) [static]

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

Parameters:
vector Left operand.
scale Right operand.
Returns:
Result of the operation.

Definition at line 547 of file Vector3d.cs.

00548         {
00549             Multiply(ref vector, ref scale, out vector);
00550             return vector;
00551         }

static void OpenTK.Vector3d.Multiply ( ref Vector3d  vector,
double  scale,
out Vector3d  result 
) [static]

Multiplies a vector by a scalar.

Parameters:
vector Left operand.
scale Right operand.
result Result of the operation.

Definition at line 536 of file Vector3d.cs.

00537         {
00538             result = new Vector3d(vector.X * scale, vector.Y * scale, vector.Z * scale);
00539         }

static Vector3d OpenTK.Vector3d.Multiply ( Vector3d  vector,
double  scale 
) [static]

Multiplies a vector by a scalar.

Parameters:
vector Left operand.
scale Right operand.
Returns:
Result of the operation.

Definition at line 524 of file Vector3d.cs.

00525         {
00526             Multiply(ref vector, scale, out vector);
00527             return vector;
00528         }

static void OpenTK.Vector3d.Normalize ( ref Vector3d  vec,
out Vector3d  result 
) [static]

Scale a vector to unit length.

Parameters:
vec The input vector
result The normalized vector

Definition at line 762 of file Vector3d.cs.

00763         {
00764             double scale = 1.0 / vec.Length;
00765             result.X = vec.X * scale;
00766             result.Y = vec.Y * scale;
00767             result.Z = vec.Z * scale;
00768         }

static Vector3d OpenTK.Vector3d.Normalize ( Vector3d  vec  )  [static]

Scale a vector to unit length.

Parameters:
vec The input vector
Returns:
The normalized vector

Definition at line 748 of file Vector3d.cs.

00749         {
00750             double scale = 1.0 / vec.Length;
00751             vec.X *= scale;
00752             vec.Y *= scale;
00753             vec.Z *= scale;
00754             return vec;
00755         }

void OpenTK.Vector3d.Normalize (  ) 

Scales the Vector3d to unit length.

Definition at line 255 of file Vector3d.cs.

00256         {
00257             double scale = 1.0 / this.Length;
00258             X *= scale;
00259             Y *= scale;
00260             Z *= scale;
00261         }

static void OpenTK.Vector3d.NormalizeFast ( ref Vector3d  vec,
out Vector3d  result 
) [static]

Scale a vector to approximately unit length.

Parameters:
vec The input vector
result The normalized vector

Definition at line 793 of file Vector3d.cs.

00794         {
00795             double scale = MathHelper.InverseSqrtFast(vec.X * vec.X + vec.Y * vec.Y + vec.Z * vec.Z);
00796             result.X = vec.X * scale;
00797             result.Y = vec.Y * scale;
00798             result.Z = vec.Z * scale;
00799         }

static Vector3d OpenTK.Vector3d.NormalizeFast ( Vector3d  vec  )  [static]

Scale a vector to approximately unit length.

Parameters:
vec The input vector
Returns:
The normalized vector

Definition at line 779 of file Vector3d.cs.

00780         {
00781             double scale = MathHelper.InverseSqrtFast(vec.X * vec.X + vec.Y * vec.Y + vec.Z * vec.Z);
00782             vec.X *= scale;
00783             vec.Y *= scale;
00784             vec.Z *= scale;
00785             return vec;
00786         }

void OpenTK.Vector3d.NormalizeFast (  ) 

Scales the Vector3d to approximately unit length.

Definition at line 270 of file Vector3d.cs.

00271         {
00272             double scale = MathHelper.InverseSqrtFast(X * X + Y * Y + Z * Z);
00273             X *= scale;
00274             Y *= scale;
00275             Z *= scale;
00276         }

static OpenTK.Vector3d.operator Vector3 ( Vector3d  v3d  )  [explicit, static]

Converts OpenTK.Vector3d to OpenTK.Vector3.

Parameters:
v3d The Vector3d to convert.
Returns:
The resulting Vector3.

Definition at line 1312 of file Vector3d.cs.

01313         {
01314             return new Vector3((float)v3d.X, (float)v3d.Y, (float)v3d.Z);
01315         }

static OpenTK.Vector3d.operator Vector3d ( Vector3  v3  )  [explicit, static]

Converts OpenTK.Vector3 to OpenTK.Vector3d.

Parameters:
v3 The Vector3 to convert.
Returns:
The resulting Vector3d.

Definition at line 1304 of file Vector3d.cs.

01305         {
01306             return new Vector3d(v3.X, v3.Y, v3.Z);
01307         }

static bool OpenTK.Vector3d.operator!= ( Vector3d  left,
Vector3d  right 
) [static]

Compares two instances for inequality.

Parameters:
left The first instance.
right The second instance.
Returns:
True, if left does not equa lright; false otherwise.

Definition at line 1296 of file Vector3d.cs.

01297         {
01298             return !left.Equals(right);
01299         }

static Vector3d OpenTK.Vector3d.operator* ( double  scale,
Vector3d  vec 
) [static]

Multiplies an instance by a scalar.

Parameters:
scale The scalar.
vec The instance.
Returns:
The result of the calculation.

Definition at line 1256 of file Vector3d.cs.

01257         {
01258             vec.X *= scale;
01259             vec.Y *= scale;
01260             vec.Z *= scale;
01261             return vec;
01262         }

static Vector3d OpenTK.Vector3d.operator* ( Vector3d  vec,
double  scale 
) [static]

Multiplies an instance by a scalar.

Parameters:
vec The instance.
scale The scalar.
Returns:
The result of the calculation.

Definition at line 1242 of file Vector3d.cs.

01243         {
01244             vec.X *= scale;
01245             vec.Y *= scale;
01246             vec.Z *= scale;
01247             return vec;
01248         }

static Vector3d OpenTK.Vector3d.operator+ ( Vector3d  left,
Vector3d  right 
) [static]

Adds two instances.

Parameters:
left The first instance.
right The second instance.
Returns:
The result of the calculation.

Definition at line 1201 of file Vector3d.cs.

01202         {
01203             left.X += right.X;
01204             left.Y += right.Y;
01205             left.Z += right.Z;
01206             return left;
01207         }

static Vector3d OpenTK.Vector3d.operator- ( Vector3d  vec  )  [static]

Negates an instance.

Parameters:
vec The instance.
Returns:
The result of the calculation.

Definition at line 1228 of file Vector3d.cs.

01229         {
01230             vec.X = -vec.X;
01231             vec.Y = -vec.Y;
01232             vec.Z = -vec.Z;
01233             return vec;
01234         }

static Vector3d OpenTK.Vector3d.operator- ( Vector3d  left,
Vector3d  right 
) [static]

Subtracts two instances.

Parameters:
left The first instance.
right The second instance.
Returns:
The result of the calculation.

Definition at line 1215 of file Vector3d.cs.

01216         {
01217             left.X -= right.X;
01218             left.Y -= right.Y;
01219             left.Z -= right.Z;
01220             return left;
01221         }

static Vector3d OpenTK.Vector3d.operator/ ( Vector3d  vec,
double  scale 
) [static]

Divides an instance by a scalar.

Parameters:
vec The instance.
scale The scalar.
Returns:
The result of the calculation.

Definition at line 1270 of file Vector3d.cs.

01271         {
01272             double mult = 1 / scale;
01273             vec.X *= mult;
01274             vec.Y *= mult;
01275             vec.Z *= mult;
01276             return vec;
01277         }

static bool OpenTK.Vector3d.operator== ( Vector3d  left,
Vector3d  right 
) [static]

Compares two instances for equality.

Parameters:
left The first instance.
right The second instance.
Returns:
True, if left equals right; false otherwise.

Definition at line 1285 of file Vector3d.cs.

01286         {
01287             return left.Equals(right);
01288         }

void OpenTK.Vector3d.Scale ( ref Vector3d  scale  ) 

Scales this instance by the given parameter.

Parameters:
scale The scaling of the individual components.

Definition at line 310 of file Vector3d.cs.

00311         {
00312             this.X *= scale.X;
00313             this.Y *= scale.Y;
00314             this.Z *= scale.Z;
00315         }

void OpenTK.Vector3d.Scale ( Vector3d  scale  ) 

Scales this instance by the given parameter.

Parameters:
scale The scaling of the individual components.

Definition at line 299 of file Vector3d.cs.

00300         {
00301             this.X *= scale.X;
00302             this.Y *= scale.Y;
00303             this.Z *= scale.Z;
00304         }

void OpenTK.Vector3d.Scale ( double  sx,
double  sy,
double  sz 
)

Scales the current Vector3d by the given amounts.

Parameters:
sx The scale of the X component.
sy The scale of the Y component.
sz The scale of the Z component.

Definition at line 289 of file Vector3d.cs.

00290         {
00291             this.X = X * sx;
00292             this.Y = Y * sy;
00293             this.Z = Z * sz;
00294         }

static void OpenTK.Vector3d.Sub ( ref Vector3d  a,
ref Vector3d  b,
out Vector3d  result 
) [static]

Subtract one Vector from another.

Parameters:
a First operand
b Second operand
result Result of subtraction

Definition at line 383 of file Vector3d.cs.

00384         {
00385             result.X = a.X - b.X;
00386             result.Y = a.Y - b.Y;
00387             result.Z = a.Z - b.Z;
00388         }

static Vector3d OpenTK.Vector3d.Sub ( Vector3d  a,
Vector3d  b 
) [static]

Subtract one Vector from another.

Parameters:
a First operand
b Second operand
Returns:
Result of subtraction

Definition at line 368 of file Vector3d.cs.

00369         {
00370             a.X -= b.X;
00371             a.Y -= b.Y;
00372             a.Z -= b.Z;
00373             return a;
00374         }

void OpenTK.Vector3d.Sub ( ref Vector3d  right  ) 

Subtract the Vector passed as parameter from this instance.

Parameters:
right Right operand. This parameter is only read from.

Definition at line 153 of file Vector3d.cs.

00154         {
00155             this.X -= right.X;
00156             this.Y -= right.Y;
00157             this.Z -= right.Z;
00158         }

void OpenTK.Vector3d.Sub ( Vector3d  right  ) 

Subtract the Vector passed as parameter from this instance.

Parameters:
right Right operand. This parameter is only read from.

Definition at line 142 of file Vector3d.cs.

00143         {
00144             this.X -= right.X;
00145             this.Y -= right.Y;
00146             this.Z -= right.Z;
00147         }

static void OpenTK.Vector3d.Subtract ( ref Vector3d  a,
ref Vector3d  b,
out Vector3d  result 
) [static]

Subtract one Vector from another.

Parameters:
a First operand
b Second operand
result Result of subtraction

Definition at line 509 of file Vector3d.cs.

00510         {
00511             result = new Vector3d(a.X - b.X, a.Y - b.Y, a.Z - b.Z);
00512         }

static Vector3d OpenTK.Vector3d.Subtract ( Vector3d  a,
Vector3d  b 
) [static]

Subtract one Vector from another.

Parameters:
a First operand
b Second operand
Returns:
Result of subtraction

Definition at line 497 of file Vector3d.cs.

00498         {
00499             Subtract(ref a, ref b, out a);
00500             return a;
00501         }

override string OpenTK.Vector3d.ToString (  ) 

Returns a System.String that represents the current Vector3.

Returns:

Definition at line 1327 of file Vector3d.cs.

01328         {
01329             return String.Format("({0}, {1}, {2})", X, Y, Z);
01330         }

static void OpenTK.Vector3d.Transform ( ref Vector3d  vec,
ref Quaterniond  quat,
out Vector3d  result 
) [static]

Transforms a vector by a quaternion rotation.

Parameters:
vec The vector to transform.
quat The quaternion to rotate the vector by.
result The result of the operation.

Definition at line 1112 of file Vector3d.cs.

01113         {
01114             // Since vec.W == 0, we can optimize quat * vec * quat^-1 as follows:
01115             // vec + 2.0 * cross(quat.xyz, cross(quat.xyz, vec) + quat.w * vec)
01116             Vector3d xyz = quat.Xyz, temp, temp2;
01117             Vector3d.Cross(ref xyz, ref vec, out temp);
01118             Vector3d.Multiply(ref vec, quat.W, out temp2);
01119             Vector3d.Add(ref temp, ref temp2, out temp);
01120             Vector3d.Cross(ref xyz, ref temp, out temp);
01121             Vector3d.Multiply(ref temp, 2, out temp);
01122             Vector3d.Add(ref vec, ref temp, out result);
01123         }

static Vector3d OpenTK.Vector3d.Transform ( Vector3d  vec,
Quaterniond  quat 
) [static]

Transforms a vector by a quaternion rotation.

Parameters:
vec The vector to transform.
quat The quaternion to rotate the vector by.
Returns:
The result of the operation.

Definition at line 1099 of file Vector3d.cs.

01100         {
01101             Vector3d result;
01102             Transform(ref vec, ref quat, out result);
01103             return result;
01104         }

static void OpenTK.Vector3d.Transform ( ref Vector3d  vec,
ref Matrix4d  mat,
out Vector3d  result 
) [static]

Transform a Vector by the given Matrix.

Parameters:
vec The vector to transform
mat The desired transformation
result The transformed vector

Definition at line 1086 of file Vector3d.cs.

01087         {
01088             Vector4d v4 = new Vector4d(vec.X, vec.Y, vec.Z, 1.0);
01089             Vector4d.Transform(ref v4, ref mat, out v4);
01090             result = v4.Xyz;
01091         }

static Vector3d OpenTK.Vector3d.Transform ( Vector3d  vec,
Matrix4d  mat 
) [static]

Transform a Vector by the given Matrix.

Parameters:
vec The vector to transform
mat The desired transformation
Returns:
The transformed vector

Definition at line 1075 of file Vector3d.cs.

01076         {
01077             Vector3d result;
01078             Transform(ref vec, ref mat, out result);
01079             return result;
01080         }

static void OpenTK.Vector3d.TransformNormal ( ref Vector3d  norm,
ref Matrix4d  mat,
out Vector3d  result 
) [static]

Transform a Normal by the given Matrix.

This calculates the inverse of the given matrix, use TransformNormalInverse if you already have the inverse to avoid this extra calculation

Parameters:
norm The normal to transform
mat The desired transformation
result The transformed normal

Definition at line 992 of file Vector3d.cs.

00993         {
00994             Matrix4d Inverse = Matrix4d.Invert(mat);
00995             Vector3d.TransformNormalInverse(ref norm, ref Inverse, out result);
00996         }

static Vector3d OpenTK.Vector3d.TransformNormal ( Vector3d  norm,
Matrix4d  mat 
) [static]

Transform a Normal by the given Matrix.

This calculates the inverse of the given matrix, use TransformNormalInverse if you already have the inverse to avoid this extra calculation

Parameters:
norm The normal to transform
mat The desired transformation
Returns:
The transformed normal

Definition at line 978 of file Vector3d.cs.

00979         {
00980             mat.Invert();
00981             return TransformNormalInverse(norm, mat);
00982         }

static void OpenTK.Vector3d.TransformNormalInverse ( ref Vector3d  norm,
ref Matrix4d  invMat,
out Vector3d  result 
) [static]

Transform a Normal by the (transpose of the) given Matrix.

This version doesn't calculate the inverse matrix. Use this version if you already have the inverse of the desired transform to hand

Parameters:
norm The normal to transform
invMat The inverse of the desired transformation
result The transformed normal

Definition at line 1022 of file Vector3d.cs.

01023         {
01024             result.X = norm.X * invMat.Row0.X +
01025                        norm.Y * invMat.Row0.Y +
01026                        norm.Z * invMat.Row0.Z;
01027 
01028             result.Y = norm.X * invMat.Row1.X +
01029                        norm.Y * invMat.Row1.Y +
01030                        norm.Z * invMat.Row1.Z;
01031 
01032             result.Z = norm.X * invMat.Row2.X +
01033                        norm.Y * invMat.Row2.Y +
01034                        norm.Z * invMat.Row2.Z;
01035         }

static Vector3d OpenTK.Vector3d.TransformNormalInverse ( Vector3d  norm,
Matrix4d  invMat 
) [static]

Transform a Normal by the (transpose of the) given Matrix.

This version doesn't calculate the inverse matrix. Use this version if you already have the inverse of the desired transform to hand

Parameters:
norm The normal to transform
invMat The inverse of the desired transformation
Returns:
The transformed normal

Definition at line 1006 of file Vector3d.cs.

01007         {
01008             return new Vector3d(
01009                 Vector3d.Dot(norm, new Vector3d(invMat.Row0)),
01010                 Vector3d.Dot(norm, new Vector3d(invMat.Row1)),
01011                 Vector3d.Dot(norm, new Vector3d(invMat.Row2)));
01012         }

static void OpenTK.Vector3d.TransformPerspective ( ref Vector3d  vec,
ref Matrix4d  mat,
out Vector3d  result 
) [static]

Transform a Vector3d by the given Matrix, and project the resulting Vector4d back to a Vector3d.

Parameters:
vec The vector to transform
mat The desired transformation
result The transformed vector

Definition at line 1142 of file Vector3d.cs.

01143         {
01144             Vector4d v = new Vector4d(vec);
01145             Vector4d.Transform(ref v, ref mat, out v);
01146             result.X = v.X / v.W;
01147             result.Y = v.Y / v.W;
01148             result.Z = v.Z / v.W;
01149         }

static Vector3d OpenTK.Vector3d.TransformPerspective ( Vector3d  vec,
Matrix4d  mat 
) [static]

Transform a Vector3d by the given Matrix, and project the resulting Vector4 back to a Vector3.

Parameters:
vec The vector to transform
mat The desired transformation
Returns:
The transformed vector

Definition at line 1131 of file Vector3d.cs.

01132         {
01133             Vector3d result;
01134             TransformPerspective(ref vec, ref mat, out result);
01135             return result;
01136         }

static void OpenTK.Vector3d.TransformPosition ( ref Vector3d  pos,
ref Matrix4d  mat,
out Vector3d  result 
) [static]

Transform a Position by the given Matrix.

Parameters:
pos The position to transform
mat The desired transformation
result The transformed position

Definition at line 1053 of file Vector3d.cs.

01054         {
01055             result.X = pos.X * mat.Row0.X +
01056                        pos.Y * mat.Row1.X +
01057                        pos.Z * mat.Row2.X +
01058                        mat.Row3.X;
01059 
01060             result.Y = pos.X * mat.Row0.Y +
01061                        pos.Y * mat.Row1.Y +
01062                        pos.Z * mat.Row2.Y +
01063                        mat.Row3.Y;
01064 
01065             result.Z = pos.X * mat.Row0.Z +
01066                        pos.Y * mat.Row1.Z +
01067                        pos.Z * mat.Row2.Z +
01068                        mat.Row3.Z;
01069         }

static Vector3d OpenTK.Vector3d.TransformPosition ( Vector3d  pos,
Matrix4d  mat 
) [static]

Transform a Position by the given Matrix.

Parameters:
pos The position to transform
mat The desired transformation
Returns:
The transformed position

Definition at line 1041 of file Vector3d.cs.

01042         {
01043             return new Vector3d(
01044                 Vector3d.Dot(pos, new Vector3d(mat.Column0)) + mat.Row3.X,
01045                 Vector3d.Dot(pos, new Vector3d(mat.Column1)) + mat.Row3.Y,
01046                 Vector3d.Dot(pos, new Vector3d(mat.Column2)) + mat.Row3.Z);
01047         }

static void OpenTK.Vector3d.TransformVector ( ref Vector3d  vec,
ref Matrix4d  mat,
out Vector3d  result 
) [static]

Transform a direction vector by the given Matrix Assumes the matrix has a bottom row of (0,0,0,1), that is the translation part is ignored.

Parameters:
vec The vector to transform
mat The desired transformation
result The transformed vector

Definition at line 955 of file Vector3d.cs.

00956         {
00957             result.X = vec.X * mat.Row0.X +
00958                        vec.Y * mat.Row1.X +
00959                        vec.Z * mat.Row2.X;
00960 
00961             result.Y = vec.X * mat.Row0.Y +
00962                        vec.Y * mat.Row1.Y +
00963                        vec.Z * mat.Row2.Y;
00964 
00965             result.Z = vec.X * mat.Row0.Z +
00966                        vec.Y * mat.Row1.Z +
00967                        vec.Z * mat.Row2.Z;
00968         }

static Vector3d OpenTK.Vector3d.TransformVector ( Vector3d  vec,
Matrix4d  mat 
) [static]

Transform a direction vector by the given Matrix Assumes the matrix has a bottom row of (0,0,0,1), that is the translation part is ignored.

Parameters:
vec The vector to transform
mat The desired transformation
Returns:
The transformed vector

Definition at line 941 of file Vector3d.cs.

00942         {
00943             return new Vector3d(
00944                 Vector3d.Dot(vec, new Vector3d(mat.Column0)),
00945                 Vector3d.Dot(vec, new Vector3d(mat.Column1)),
00946                 Vector3d.Dot(vec, new Vector3d(mat.Column2)));
00947         }


Member Data Documentation

readonly Vector3d OpenTK.Vector3d.One = new Vector3d(1, 1, 1) [static]

Defines an instance with all components set to 1.

Definition at line 348 of file Vector3d.cs.

readonly int OpenTK.Vector3d.SizeInBytes = Marshal.SizeOf(new Vector3d()) [static]

Defines the size of the Vector3d struct in bytes.

Definition at line 353 of file Vector3d.cs.

readonly Vector3d OpenTK.Vector3d.UnitX = new Vector3d(1, 0, 0) [static]

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

Definition at line 328 of file Vector3d.cs.

readonly Vector3d OpenTK.Vector3d.UnitY = new Vector3d(0, 1, 0) [static]

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

Definition at line 333 of file Vector3d.cs.

readonly Vector3d OpenTK.Vector3d.UnitZ = new Vector3d(0, 0, 1) [static]

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

Definition at line 338 of file Vector3d.cs.

The X component of the Vector3.

Definition at line 43 of file Vector3d.cs.

The Y component of the Vector3.

Definition at line 48 of file Vector3d.cs.

The Z component of the Vector3.

Definition at line 53 of file Vector3d.cs.

readonly Vector3d OpenTK.Vector3d.Zero = new Vector3d(0, 0, 0) [static]

Defines a zero-length Vector3.

Definition at line 343 of file Vector3d.cs.


Property Documentation

double OpenTK.Vector3d.Length [get]

Gets the length (magnitude) of the vector.

LengthFast

See also:
LengthSquared

Definition at line 199 of file Vector3d.cs.

double OpenTK.Vector3d.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

Definition at line 220 of file Vector3d.cs.

double OpenTK.Vector3d.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

See also:
LengthFast

Definition at line 241 of file Vector3d.cs.

Vector2d OpenTK.Vector3d.Xy [get, set]

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

Definition at line 1189 of file Vector3d.cs.

 All Classes Functions Variables Enumerations Properties Events

Generated on Tue Mar 9 14:59:17 2010 for The Open Toolkit library by  doxygen 1.6.1