VR-Link C# API Documentation
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Properties | Static Private Attributes
makVrl.Vector3d Struct Reference

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

+ Inheritance diagram for makVrl.Vector3d:
+ Collaboration diagram for makVrl.Vector3d:

Public Member Functions

 Vector3d (double value)
 Constructs a new instance.
 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.
Vector3d Normalized ()
 Returns a copy of the Vector3d scaled to unit length.
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 (Vector3f v3)
 Converts makVrl.Vector3 to makVrl.Vector3d.
static operator Vector3f (Vector3d v3d)
 Converts makVrl.Vector3d to makVrl.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 this[int index] [get, set]
 Gets or sets the value at the index of the Vector.
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 makVrl.Vector2d with the X and Y components of this instance.
Vector2d Xz [get, set]
 Gets or sets an makVrl.Vector2d with the X and Z components of this instance.
Vector2d Yx [get, set]
 Gets or sets an makVrl.Vector2d with the Y and X components of this instance.
Vector2d Yz [get, set]
 Gets or sets an makVrl.Vector2d with the Y and Z components of this instance.
Vector2d Zx [get, set]
 Gets or sets an makVrl.Vector2d with the Z and X components of this instance.
Vector2d Zy [get, set]
 Gets or sets an makVrl.Vector2d with the Z and Y components of this instance.
Vector3d Xzy [get, set]
 Gets or sets an makVrl.Vector3d with the X, Z, and Y components of this instance.
Vector3d Yxz [get, set]
 Gets or sets an makVrl.Vector3d with the Y, X, and Z components of this instance.
Vector3d Yzx [get, set]
 Gets or sets an makVrl.Vector3d with the Y, Z, and X components of this instance.
Vector3d Zxy [get, set]
 Gets or sets an makVrl.Vector3d with the Z, X, and Y components of this instance.
Vector3d Zyx [get, set]
 Gets or sets an makVrl.Vector3d with the Z, Y, and X components of this instance.

Static Private Attributes

static string listSeparator = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ListSeparator

Detailed Description

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

Constructor & Destructor Documentation

makVrl.Vector3d.Vector3d ( double  value)
inline
makVrl.Vector3d.Vector3d ( double  x,
double  y,
double  z 
)
inline

Constructs a new Vector3.

Parameters
xThe x component of the Vector3.
yThe y component of the Vector3.
zThe z component of the Vector3.

References makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

makVrl.Vector3d.Vector3d ( Vector2d  v)
inline

Constructs a new instance from the given Vector2d.

Parameters
vThe Vector2d to copy components from.

References makVrl.Vector2d.X, makVrl.Vector3d.X, makVrl.Vector2d.Y, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

makVrl.Vector3d.Vector3d ( Vector3d  v)
inline

Constructs a new instance from the given Vector3d.

Parameters
vThe Vector3d to copy components from.

References makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

makVrl.Vector3d.Vector3d ( Vector4d  v)
inline

Constructs a new instance from the given Vector4d.

Parameters
vThe Vector4d to copy components from.

References makVrl.Vector4d.X, makVrl.Vector3d.X, makVrl.Vector4d.Y, makVrl.Vector3d.Y, makVrl.Vector4d.Z, and makVrl.Vector3d.Z.

Member Function Documentation

void makVrl.Vector3d.Add ( Vector3d  right)
inline

Add the Vector passed as parameter to this instance.

Parameters
rightRight operand. This parameter is only read from.

References makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

Referenced by makVrl.Vector3d.Add(), makVrl.Vector3d.BaryCentric(), and makVrl.Vector3d.Transform().

void makVrl.Vector3d.Add ( ref Vector3d  right)
inline

Add the Vector passed as parameter to this instance.

Parameters
rightRight operand. This parameter is only read from.

References makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

static Vector3d makVrl.Vector3d.Add ( Vector3d  a,
Vector3d  b 
)
inlinestatic

Adds two vectors.

Parameters
aLeft operand.
bRight operand.
Returns
Result of operation.

References makVrl.Vector3d.Add().

static void makVrl.Vector3d.Add ( ref Vector3d  a,
ref Vector3d  b,
out Vector3d  result 
)
inlinestatic

Adds two vectors.

Parameters
aLeft operand.
bRight operand.
resultResult of operation.

References makVrl.Vector3d.Vector3d().

static Vector3d makVrl.Vector3d.BaryCentric ( Vector3d  a,
Vector3d  b,
Vector3d  c,
double  u,
double  v 
)
inlinestatic

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 makVrl.Vector3d.BaryCentric ( ref Vector3d  a,
ref Vector3d  b,
ref Vector3d  c,
double  u,
double  v,
out Vector3d  result 
)
inlinestatic

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

References makVrl.Vector3d.Add(), makVrl.Vector3d.Multiply(), and makVrl.Vector3d.Subtract().

static double makVrl.Vector3d.CalculateAngle ( Vector3d  first,
Vector3d  second 
)
inlinestatic

Calculates the angle (in radians) between two vectors.

Parameters
firstThe first vector.
secondThe second vector.
Returns
Angle (in radians) between the vectors.

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

References makVrl.Vector3d.Dot(), and makVrl.Vector3d.Length.

static void makVrl.Vector3d.CalculateAngle ( ref Vector3d  first,
ref Vector3d  second,
out double  result 
)
inlinestatic

Calculates the angle (in radians) between two vectors.

Parameters
firstThe first vector.
secondThe second vector.
resultAngle (in radians) between the vectors.

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

References makVrl.Vector3d.Dot().

static Vector3d makVrl.Vector3d.Clamp ( Vector3d  vec,
Vector3d  min,
Vector3d  max 
)
inlinestatic

Clamp a vector to the given minimum and maximum vectors

Parameters
vecInput vector
minMinimum vector
maxMaximum vector
Returns
The clamped vector

References makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

static void makVrl.Vector3d.Clamp ( ref Vector3d  vec,
ref Vector3d  min,
ref Vector3d  max,
out Vector3d  result 
)
inlinestatic

Clamp a vector to the given minimum and maximum vectors

Parameters
vecInput vector
minMinimum vector
maxMaximum vector
resultThe clamped vector

References makVrl.Vector3d.X.

static Vector3d makVrl.Vector3d.ComponentMax ( Vector3d  a,
Vector3d  b 
)
inlinestatic

Calculate the component-wise maximum of two vectors

Parameters
aFirst operand
bSecond operand
Returns
The component-wise maximum

References makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

static void makVrl.Vector3d.ComponentMax ( ref Vector3d  a,
ref Vector3d  b,
out Vector3d  result 
)
inlinestatic

Calculate the component-wise maximum of two vectors

Parameters
aFirst operand
bSecond operand
resultThe component-wise maximum

References makVrl.Vector3d.X.

static Vector3d makVrl.Vector3d.ComponentMin ( Vector3d  a,
Vector3d  b 
)
inlinestatic

Calculate the component-wise minimum of two vectors

Parameters
aFirst operand
bSecond operand
Returns
The component-wise minimum

References makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

static void makVrl.Vector3d.ComponentMin ( ref Vector3d  a,
ref Vector3d  b,
out Vector3d  result 
)
inlinestatic

Calculate the component-wise minimum of two vectors

Parameters
aFirst operand
bSecond operand
resultThe component-wise minimum

References makVrl.Vector3d.X.

static Vector3d makVrl.Vector3d.Cross ( Vector3d  left,
Vector3d  right 
)
inlinestatic

Caclulate the cross (vector) product of two vectors

Parameters
leftFirst operand
rightSecond operand
Returns
The cross product of the two inputs

Referenced by makVrl.Matrix4d.LookAt(), makVrl.Quaterniond.Mult(), makVrl.Quaterniond.Multiply(), and makVrl.Vector3d.Transform().

static void makVrl.Vector3d.Cross ( ref Vector3d  left,
ref Vector3d  right,
out Vector3d  result 
)
inlinestatic

Caclulate the cross (vector) product of two vectors

Parameters
leftFirst operand
rightSecond operand
Returns
The cross product of the two inputs
Parameters
resultThe cross product of the two inputs

References makVrl.Vector3d.Vector3d().

void makVrl.Vector3d.Div ( double  f)
inline

Divide this instance by a scalar.

Parameters
fScalar operand.

References makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

static Vector3d makVrl.Vector3d.Div ( Vector3d  a,
double  f 
)
inlinestatic

Divide a vector by a scalar

Parameters
aVector operand
fScalar operand
Returns
Result of the division

References makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

static void makVrl.Vector3d.Div ( ref Vector3d  a,
double  f,
out Vector3d  result 
)
inlinestatic

Divide a vector by a scalar

Parameters
aVector operand
fScalar operand
resultResult of the division
static Vector3d makVrl.Vector3d.Divide ( Vector3d  vector,
double  scale 
)
inlinestatic

Divides a vector by a scalar.

Parameters
vectorLeft operand.
scaleRight operand.
Returns
Result of the operation.

Referenced by makVrl.Vector3d.Divide().

static void makVrl.Vector3d.Divide ( ref Vector3d  vector,
double  scale,
out Vector3d  result 
)
inlinestatic

Divides a vector by a scalar.

Parameters
vectorLeft operand.
scaleRight operand.
resultResult of the operation.

References makVrl.Vector3d.Multiply().

static Vector3d makVrl.Vector3d.Divide ( Vector3d  vector,
Vector3d  scale 
)
inlinestatic

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

Parameters
vectorLeft operand.
scaleRight operand.
Returns
Result of the operation.

References makVrl.Vector3d.Divide().

static void makVrl.Vector3d.Divide ( ref Vector3d  vector,
ref Vector3d  scale,
out Vector3d  result 
)
inlinestatic

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

Parameters
vectorLeft operand.
scaleRight operand.
resultResult of the operation.

References makVrl.Vector3d.Vector3d().

static double makVrl.Vector3d.Dot ( Vector3d  left,
Vector3d  right 
)
inlinestatic

Calculate the dot (scalar) product of two vectors

Parameters
leftFirst operand
rightSecond operand
Returns
The dot product of the two inputs

References makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

Referenced by makVrl.Vector3d.CalculateAngle(), makVrl.Quaterniond.Mult(), makVrl.Quaterniond.Multiply(), makVrl.Quaterniond.Slerp(), makVrl.Vector3d.TransformNormalInverse(), makVrl.Vector3d.TransformPosition(), and makVrl.Vector3d.TransformVector().

static void makVrl.Vector3d.Dot ( ref Vector3d  left,
ref Vector3d  right,
out double  result 
)
inlinestatic

Calculate the dot (scalar) product of two vectors

Parameters
leftFirst operand
rightSecond operand
resultThe dot product of the two inputs
override bool makVrl.Vector3d.Equals ( object  obj)
inline

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.

Referenced by makVrl.Vector3d.operator!=(), and makVrl.Vector3d.operator==().

bool makVrl.Vector3d.Equals ( Vector3d  other)
inline

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.

References makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

override int makVrl.Vector3d.GetHashCode ( )
inline

Returns the hashcode for this instance.

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

References makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

Referenced by makVrl.Quaterniond.GetHashCode(), and makVrl.Matrix3d.GetHashCode().

static Vector3d makVrl.Vector3d.Lerp ( Vector3d  a,
Vector3d  b,
double  blend 
)
inlinestatic

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

References makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

static void makVrl.Vector3d.Lerp ( ref Vector3d  a,
ref Vector3d  b,
double  blend,
out Vector3d  result 
)
inlinestatic

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

References makVrl.Vector3d.X.

static Vector3d makVrl.Vector3d.Max ( Vector3d  left,
Vector3d  right 
)
inlinestatic

Returns the Vector3d with the minimum magnitude

Parameters
leftLeft operand
rightRight operand
Returns
The minimum Vector3

References makVrl.Vector3d.LengthSquared.

static Vector3d makVrl.Vector3d.Min ( Vector3d  left,
Vector3d  right 
)
inlinestatic

Returns the Vector3d with the minimum magnitude

Parameters
leftLeft operand
rightRight operand
Returns
The minimum Vector3

References makVrl.Vector3d.LengthSquared.

void makVrl.Vector3d.Mult ( double  f)
inline

Multiply this instance by a scalar.

Parameters
fScalar operand.

References makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

static Vector3d makVrl.Vector3d.Mult ( Vector3d  a,
double  f 
)
inlinestatic

Multiply a vector and a scalar

Parameters
aVector operand
fScalar operand
Returns
Result of the multiplication

References makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

static void makVrl.Vector3d.Mult ( ref Vector3d  a,
double  f,
out Vector3d  result 
)
inlinestatic

Multiply a vector and a scalar

Parameters
aVector operand
fScalar operand
resultResult of the multiplication
static Vector3d makVrl.Vector3d.Multiply ( Vector3d  vector,
double  scale 
)
inlinestatic

Multiplies a vector by a scalar.

Parameters
vectorLeft operand.
scaleRight operand.
Returns
Result of the operation.

Referenced by makVrl.Vector3d.BaryCentric(), makVrl.Vector3d.Divide(), makVrl.Vector3d.Multiply(), and makVrl.Vector3d.Transform().

static void makVrl.Vector3d.Multiply ( ref Vector3d  vector,
double  scale,
out Vector3d  result 
)
inlinestatic

Multiplies a vector by a scalar.

Parameters
vectorLeft operand.
scaleRight operand.
resultResult of the operation.

References makVrl.Vector3d.Vector3d().

static Vector3d makVrl.Vector3d.Multiply ( Vector3d  vector,
Vector3d  scale 
)
inlinestatic

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

Parameters
vectorLeft operand.
scaleRight operand.
Returns
Result of the operation.

References makVrl.Vector3d.Multiply().

static void makVrl.Vector3d.Multiply ( ref Vector3d  vector,
ref Vector3d  scale,
out Vector3d  result 
)
inlinestatic

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

Parameters
vectorLeft operand.
scaleRight operand.
resultResult of the operation.

References makVrl.Vector3d.Vector3d().

void makVrl.Vector3d.Normalize ( )
inline
static Vector3d makVrl.Vector3d.Normalize ( Vector3d  vec)
inlinestatic

Scale a vector to unit length

Parameters
vecThe input vector
Returns
The normalized vector

References makVrl.Vector3d.Length, makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

static void makVrl.Vector3d.Normalize ( ref Vector3d  vec,
out Vector3d  result 
)
inlinestatic

Scale a vector to unit length

Parameters
vecThe input vector
resultThe normalized vector
Vector3d makVrl.Vector3d.Normalized ( )
inline
void makVrl.Vector3d.NormalizeFast ( )
inline

Scales the Vector3d to approximately unit length.

References makVrl.MathHelper.InverseSqrtFast(), makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

static Vector3d makVrl.Vector3d.NormalizeFast ( Vector3d  vec)
inlinestatic

Scale a vector to approximately unit length

Parameters
vecThe input vector
Returns
The normalized vector

References makVrl.MathHelper.InverseSqrtFast(), makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

static void makVrl.Vector3d.NormalizeFast ( ref Vector3d  vec,
out Vector3d  result 
)
inlinestatic

Scale a vector to approximately unit length

Parameters
vecThe input vector
resultThe normalized vector

References makVrl.MathHelper.InverseSqrtFast().

static makVrl.Vector3d.operator Vector3d ( Vector3f  v3)
inlineexplicitstatic

Converts makVrl.Vector3 to makVrl.Vector3d.

Parameters
v3The Vector3 to convert.
Returns
The resulting Vector3d.

References makVrl.Vector3d.Vector3d(), makVrl.Vector3f.X, makVrl.Vector3f.Y, and makVrl.Vector3f.Z.

static makVrl.Vector3d.operator Vector3f ( Vector3d  v3d)
inlineexplicitstatic

Converts makVrl.Vector3d to makVrl.Vector3.

Parameters
v3dThe Vector3d to convert.
Returns
The resulting Vector3.

References makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

static bool makVrl.Vector3d.operator!= ( Vector3d  left,
Vector3d  right 
)
inlinestatic

Compares two instances for inequality.

Parameters
leftThe first instance.
rightThe second instance.
Returns
True, if left does not equa lright; false otherwise.

References makVrl.Vector3d.Equals().

static Vector3d makVrl.Vector3d.operator* ( Vector3d  vec,
double  scale 
)
inlinestatic

Multiplies an instance by a scalar.

Parameters
vecThe instance.
scaleThe scalar.
Returns
The result of the calculation.

References makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

static Vector3d makVrl.Vector3d.operator* ( double  scale,
Vector3d  vec 
)
inlinestatic

Multiplies an instance by a scalar.

Parameters
scaleThe scalar.
vecThe instance.
Returns
The result of the calculation.

References makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

static Vector3d makVrl.Vector3d.operator+ ( Vector3d  left,
Vector3d  right 
)
inlinestatic

Adds two instances.

Parameters
leftThe first instance.
rightThe second instance.
Returns
The result of the calculation.

References makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

static Vector3d makVrl.Vector3d.operator- ( Vector3d  left,
Vector3d  right 
)
inlinestatic

Subtracts two instances.

Parameters
leftThe first instance.
rightThe second instance.
Returns
The result of the calculation.

References makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

static Vector3d makVrl.Vector3d.operator- ( Vector3d  vec)
inlinestatic

Negates an instance.

Parameters
vecThe instance.
Returns
The result of the calculation.

References makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

static Vector3d makVrl.Vector3d.operator/ ( Vector3d  vec,
double  scale 
)
inlinestatic

Divides an instance by a scalar.

Parameters
vecThe instance.
scaleThe scalar.
Returns
The result of the calculation.

References makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

static bool makVrl.Vector3d.operator== ( Vector3d  left,
Vector3d  right 
)
inlinestatic

Compares two instances for equality.

Parameters
leftThe first instance.
rightThe second instance.
Returns
True, if left equals right; false otherwise.

References makVrl.Vector3d.Equals().

void makVrl.Vector3d.Scale ( double  sx,
double  sy,
double  sz 
)
inline

Scales the current Vector3d by the given amounts.

Parameters
sxThe scale of the X component.
syThe scale of the Y component.
szThe scale of the Z component.

References makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

void makVrl.Vector3d.Scale ( Vector3d  scale)
inline

Scales this instance by the given parameter.

Parameters
scaleThe scaling of the individual components.

References makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

void makVrl.Vector3d.Scale ( ref Vector3d  scale)
inline

Scales this instance by the given parameter.

Parameters
scaleThe scaling of the individual components.

References makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

void makVrl.Vector3d.Sub ( Vector3d  right)
inline

Subtract the Vector passed as parameter from this instance.

Parameters
rightRight operand. This parameter is only read from.

References makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

void makVrl.Vector3d.Sub ( ref Vector3d  right)
inline

Subtract the Vector passed as parameter from this instance.

Parameters
rightRight operand. This parameter is only read from.

References makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

static Vector3d makVrl.Vector3d.Sub ( Vector3d  a,
Vector3d  b 
)
inlinestatic

Subtract one Vector from another

Parameters
aFirst operand
bSecond operand
Returns
Result of subtraction

References makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

static void makVrl.Vector3d.Sub ( ref Vector3d  a,
ref Vector3d  b,
out Vector3d  result 
)
inlinestatic

Subtract one Vector from another

Parameters
aFirst operand
bSecond operand
resultResult of subtraction
static Vector3d makVrl.Vector3d.Subtract ( Vector3d  a,
Vector3d  b 
)
inlinestatic

Subtract one Vector from another

Parameters
aFirst operand
bSecond operand
Returns
Result of subtraction

Referenced by makVrl.Vector3d.BaryCentric().

static void makVrl.Vector3d.Subtract ( ref Vector3d  a,
ref Vector3d  b,
out Vector3d  result 
)
inlinestatic

Subtract one Vector from another

Parameters
aFirst operand
bSecond operand
resultResult of subtraction

References makVrl.Vector3d.Vector3d().

override string makVrl.Vector3d.ToString ( )
inline

Returns a System.String that represents the current Vector3.

Returns

References makVrl.Vector3d.listSeparator, makVrl.Vector3d.X, makVrl.Vector3d.Y, and makVrl.Vector3d.Z.

Referenced by makVrl.EntityStateRepository.printDataToConsole().

static Vector3d makVrl.Vector3d.Transform ( Vector3d  vec,
Matrix4d  mat 
)
inlinestatic

Transform a Vector by the given Matrix

Parameters
vecThe vector to transform
matThe desired transformation
Returns
The transformed vector

Referenced by makVrl.Vector3d.Transform().

static void makVrl.Vector3d.Transform ( ref Vector3d  vec,
ref Matrix4d  mat,
out Vector3d  result 
)
inlinestatic

Transform a Vector by the given Matrix

Parameters
vecThe vector to transform
matThe desired transformation
resultThe transformed vector

References makVrl.Vector4d.Transform(), and makVrl.Vector4d.Xyz.

static Vector3d makVrl.Vector3d.Transform ( Vector3d  vec,
Quaterniond  quat 
)
inlinestatic

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.

References makVrl.Vector3d.Transform().

static void makVrl.Vector3d.Transform ( ref Vector3d  vec,
ref Quaterniond  quat,
out Vector3d  result 
)
inlinestatic

Transforms a vector by a quaternion rotation.

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

References makVrl.Vector3d.Add(), makVrl.Vector3d.Cross(), and makVrl.Vector3d.Multiply().

static Vector3d makVrl.Vector3d.TransformNormal ( Vector3d  norm,
Matrix4d  mat 
)
inlinestatic

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
normThe normal to transform
matThe desired transformation
Returns
The transformed normal

References makVrl.Matrix4d.Invert(), and makVrl.Vector3d.TransformNormalInverse().

static void makVrl.Vector3d.TransformNormal ( ref Vector3d  norm,
ref Matrix4d  mat,
out Vector3d  result 
)
inlinestatic

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
normThe normal to transform
matThe desired transformation
resultThe transformed normal

References makVrl.Matrix4d.Invert(), and makVrl.Vector3d.TransformNormalInverse().

static Vector3d makVrl.Vector3d.TransformNormalInverse ( Vector3d  norm,
Matrix4d  invMat 
)
inlinestatic

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
normThe normal to transform
invMatThe inverse of the desired transformation
Returns
The transformed normal

References makVrl.Vector3d.Dot(), makVrl.Matrix4d.Row0, makVrl.Matrix4d.Row1, makVrl.Matrix4d.Row2, and makVrl.Vector3d.Vector3d().

Referenced by makVrl.Vector3d.TransformNormal().

static void makVrl.Vector3d.TransformNormalInverse ( ref Vector3d  norm,
ref Matrix4d  invMat,
out Vector3d  result 
)
inlinestatic

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
normThe normal to transform
invMatThe inverse of the desired transformation
resultThe transformed normal

References makVrl.Vector3d.X.

static Vector3d makVrl.Vector3d.TransformPerspective ( Vector3d  vec,
Matrix4d  mat 
)
inlinestatic

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

Parameters
vecThe vector to transform
matThe desired transformation
Returns
The transformed vector
static void makVrl.Vector3d.TransformPerspective ( ref Vector3d  vec,
ref Matrix4d  mat,
out Vector3d  result 
)
inlinestatic

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

Parameters
vecThe vector to transform
matThe desired transformation
resultThe transformed vector

References makVrl.Vector4d.Transform(), and makVrl.Vector4d.X.

static Vector3d makVrl.Vector3d.TransformPosition ( Vector3d  pos,
Matrix4d  mat 
)
inlinestatic

Transform a Position by the given Matrix

Parameters
posThe position to transform
matThe desired transformation
Returns
The transformed position

References makVrl.Matrix4d.Column0, makVrl.Matrix4d.Column1, makVrl.Matrix4d.Column2, makVrl.Vector3d.Dot(), makVrl.Matrix4d.Row3, makVrl.Vector3d.Vector3d(), makVrl.Vector4d.X, makVrl.Vector4d.Y, and makVrl.Vector4d.Z.

static void makVrl.Vector3d.TransformPosition ( ref Vector3d  pos,
ref Matrix4d  mat,
out Vector3d  result 
)
inlinestatic

Transform a Position by the given Matrix

Parameters
posThe position to transform
matThe desired transformation
resultThe transformed position

References makVrl.Vector3d.X.

static Vector3d makVrl.Vector3d.TransformVector ( Vector3d  vec,
Matrix4d  mat 
)
inlinestatic

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
vecThe vector to transform
matThe desired transformation
Returns
The transformed vector

References makVrl.Matrix4d.Column0, makVrl.Matrix4d.Column1, makVrl.Matrix4d.Column2, makVrl.Vector3d.Dot(), and makVrl.Vector3d.Vector3d().

static void makVrl.Vector3d.TransformVector ( ref Vector3d  vec,
ref Matrix4d  mat,
out Vector3d  result 
)
inlinestatic

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
vecThe vector to transform
matThe desired transformation
resultThe transformed vector

References makVrl.Vector3d.X.

Member Data Documentation

string makVrl.Vector3d.listSeparator = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ListSeparator
staticprivate
readonly Vector3d makVrl.Vector3d.One = new Vector3d(1, 1, 1)
static

Defines an instance with all components set to 1.

readonly int makVrl.Vector3d.SizeInBytes = Marshal.SizeOf(new Vector3d())
static

Defines the size of the Vector3d struct in bytes.

readonly Vector3d makVrl.Vector3d.UnitX = new Vector3d(1, 0, 0)
static

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

Referenced by makVrl.Quaterniond.ToAxisAngle().

readonly Vector3d makVrl.Vector3d.UnitY = new Vector3d(0, 1, 0)
static

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

readonly Vector3d makVrl.Vector3d.UnitZ = new Vector3d(0, 0, 1)
static

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

double makVrl.Vector3d.X

The X component of the Vector3.

Referenced by makVrl.Vector3d.Add(), makVrl.Vector3d.Clamp(), makVrl.Vector3d.ComponentMax(), makVrl.Vector3d.ComponentMin(), makVrl.Matrix4d.CreateFromAxisAngle(), makVrl.Matrix3d.CreateRotationY(), makVrl.Matrix3d.CreateRotationZ(), makVrl.Matrix3d.CreateScale(), makVrl.Matrix4d.CreateTranslation(), CollisionMessage.deserialize(), FireMessage.deserialize(), DetonateMessage.deserialize(), EntityStateMessage.deserialize(), TransmitterStateMessage.deserialize(), f18.VehicleSim.detonateMunition(), makVrl.Vector3d.Div(), makVrl.Vector3d.Dot(), makVrl.Vector3d.Equals(), makVrl.ReferenceEllipsoid.geodeticToGeocentric(), makVrl.Vector3d.GetHashCode(), makVrl.Vector3d.Lerp(), makVrl.Matrix4d.LookAt(), makVrl.Vector3d.Mult(), makVrl.Matrix3d.Mult(), makVrl.Vector3d.Normalize(), makVrl.Vector3d.NormalizeFast(), makVrl.Vector3d.operator Vector3f(), makVrl.Vector3d.operator*(), makVrl.Vector3d.operator+(), makVrl.Vector3d.operator-(), makVrl.Vector3d.operator/(), makVrl.Matrix4d.Rotate(), makVrl.Vector3d.Scale(), makVrl.Matrix4d.Scale(), CollisionMessage.serialize(), FireMessage.serialize(), DetonateMessage.serialize(), EntityStateMessage.serialize(), TransmitterStateMessage.serialize(), f18.VehicleSim.simTick(), makVrl.Vector3d.Sub(), makVrl.TaitBryan.TaitBryan(), makVrl.Quaterniond.ToAxisAngle(), makVrl.Vector3d.ToString(), makVrl.Vector3d.TransformNormalInverse(), makVrl.Vector3d.TransformPosition(), makVrl.Vector3d.TransformVector(), makVrl.Matrix4d.Translation(), makVrl.Vector3d.Vector3d(), and makVrl.Vector4d.Vector4d().

double makVrl.Vector3d.Y
double makVrl.Vector3d.Z
readonly Vector3d makVrl.Vector3d.Zero = new Vector3d(0, 0, 0)
static

Property Documentation

double makVrl.Vector3d.Length
get
double makVrl.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
double makVrl.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

Referenced by makVrl.Quaterniond.FromAxisAngle(), makVrl.Vector3d.Max(), and makVrl.Vector3d.Min().

double makVrl.Vector3d.this[int index]
getset

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

Vector2d makVrl.Vector3d.Xy
getset

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

Vector2d makVrl.Vector3d.Xz
getset

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

Vector3d makVrl.Vector3d.Xzy
getset

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

Vector2d makVrl.Vector3d.Yx
getset

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

Vector3d makVrl.Vector3d.Yxz
getset

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

Vector2d makVrl.Vector3d.Yz
getset

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

Vector3d makVrl.Vector3d.Yzx
getset

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

Vector2d makVrl.Vector3d.Zx
getset

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

Vector3d makVrl.Vector3d.Zxy
getset

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

Vector2d makVrl.Vector3d.Zy
getset

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

Vector3d makVrl.Vector3d.Zyx
getset

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


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

Document ID: Generated on Mon Apr 8 04:49:21 EDT 2019 from SVN revision 197403
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)