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.Vector2d Struct Reference

Represents a 2D vector using two double-precision floating-point numbers. More...

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

Public Member Functions

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

Static Public Member Functions

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

Public Attributes

double X
 The X coordinate of this instance. More...
 
double Y
 The Y coordinate of this instance. More...
 

Static Public Attributes

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

Properties

double this[int index] [get, set]
 Gets or sets the value at the index of the Vector. More...
 
double Length [get]
 Gets the length (magnitude) of the vector. More...
 
double LengthSquared [get]
 Gets the square of the vector length (magnitude). More...
 
Vector2d PerpendicularRight [get]
 Gets the perpendicular vector on the right side of this vector. More...
 
Vector2d PerpendicularLeft [get]
 Gets the perpendicular vector on the left side of this vector. More...
 
Vector2d Yx [get, set]
 Gets or sets an makVrl.Vector2d with the Y and X components of this instance. More...
 

Static Private Attributes

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

Detailed Description

Represents a 2D vector using two double-precision floating-point numbers.

Constructor & Destructor Documentation

makVrl.Vector2d.Vector2d ( double  value)
inline
makVrl.Vector2d.Vector2d ( double  x,
double  y 
)
inline

Constructs left vector with the given coordinates.

Parameters
xThe X coordinate.
yThe Y coordinate.

Member Function Documentation

void makVrl.Vector2d.Add ( Vector2d  right)
inline

Add the Vector passed as parameter to this instance.

Parameters
rightRight operand. This parameter is only read from.

Referenced by makVrl.Vector2d.Add(), and makVrl.Vector2d.BaryCentric().

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

Add the Vector passed as parameter to this instance.

Parameters
rightRight operand. This parameter is only read from.
static Vector2d makVrl.Vector2d.Add ( Vector2d  a,
Vector2d  b 
)
inlinestatic

Adds two vectors.

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

References makVrl.Vector2d.Add().

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

Adds two vectors.

Parameters
aLeft operand.
bRight operand.
resultResult of operation.

References makVrl.Vector2d.Vector2d().

static Vector2d makVrl.Vector2d.BaryCentric ( Vector2d  a,
Vector2d  b,
Vector2d  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.Vector2d.BaryCentric ( ref Vector2d  a,
ref Vector2d  b,
ref Vector2d  c,
double  u,
double  v,
out Vector2d  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.Vector2d.Add(), makVrl.Vector2d.Multiply(), and makVrl.Vector2d.Subtract().

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

Clamp a vector to the given minimum and maximum vectors

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

Clamp a vector to the given minimum and maximum vectors

Parameters
vecInput vector
minMinimum vector
maxMaximum vector
resultThe clamped vector
void makVrl.Vector2d.Div ( double  f)
inline

Divide this instance by a scalar.

Parameters
fScalar operand.
static Vector2d makVrl.Vector2d.Div ( Vector2d  a,
double  d 
)
inlinestatic

Divide a vector by a scalar

Parameters
aVector operand
dScalar operand
Returns
Result of the division
static void makVrl.Vector2d.Div ( ref Vector2d  a,
double  d,
out Vector2d  result 
)
inlinestatic

Divide a vector by a scalar

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

Divides a vector by a scalar.

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

Referenced by makVrl.Vector2d.Divide().

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

Divides a vector by a scalar.

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

References makVrl.Vector2d.Multiply().

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

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

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

References makVrl.Vector2d.Divide().

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

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

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

References makVrl.Vector2d.Vector2d().

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

Calculate the dot (scalar) product of two vectors

Parameters
leftFirst operand
rightSecond operand
Returns
The dot product of the two inputs
static void makVrl.Vector2d.Dot ( ref Vector2d  left,
ref Vector2d  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.Vector2d.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.

References makVrl.Vector2d.Vector2d().

bool makVrl.Vector2d.Equals ( Vector2d  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.Vector2d.X, and makVrl.Vector2d.Y.

override int makVrl.Vector2d.GetHashCode ( )
inline

Returns the hashcode for this instance.

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

References makVrl.Vector2d.Y.

static Vector2d makVrl.Vector2d.Lerp ( Vector2d  a,
Vector2d  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.Vector2d.X, and makVrl.Vector2d.Y.

static void makVrl.Vector2d.Lerp ( ref Vector2d  a,
ref Vector2d  b,
double  blend,
out Vector2d  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
static Vector2d makVrl.Vector2d.Max ( Vector2d  a,
Vector2d  b 
)
inlinestatic

Calculate the component-wise maximum of two vectors

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

Calculate the component-wise maximum of two vectors

Parameters
aFirst operand
bSecond operand
resultThe component-wise maximum
static Vector2d makVrl.Vector2d.Min ( Vector2d  a,
Vector2d  b 
)
inlinestatic

Calculate the component-wise minimum of two vectors

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

Calculate the component-wise minimum of two vectors

Parameters
aFirst operand
bSecond operand
resultThe component-wise minimum
void makVrl.Vector2d.Mult ( double  f)
inline

Multiply this instance by a scalar.

Parameters
fScalar operand.
static Vector2d makVrl.Vector2d.Mult ( Vector2d  a,
double  d 
)
inlinestatic

Multiply a vector and a scalar

Parameters
aVector operand
dScalar operand
Returns
Result of the multiplication
static void makVrl.Vector2d.Mult ( ref Vector2d  a,
double  d,
out Vector2d  result 
)
inlinestatic

Multiply a vector and a scalar

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

Multiplies a vector by a scalar.

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

Referenced by makVrl.Vector2d.BaryCentric(), makVrl.Vector2d.Divide(), and makVrl.Vector2d.Multiply().

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

Multiplies a vector by a scalar.

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

References makVrl.Vector2d.Vector2d().

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

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

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

References makVrl.Vector2d.Multiply().

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

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

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

References makVrl.Vector2d.Vector2d().

void makVrl.Vector2d.Normalize ( )
inline

Scales the Vector2 to unit length.

References makVrl.Vector2d.Length, makVrl.Vector2d.X, and makVrl.Vector2d.Y.

static Vector2d makVrl.Vector2d.Normalize ( Vector2d  vec)
inlinestatic

Scale a vector to unit length

Parameters
vecThe input vector
Returns
The normalized vector
static void makVrl.Vector2d.Normalize ( ref Vector2d  vec,
out Vector2d  result 
)
inlinestatic

Scale a vector to unit length

Parameters
vecThe input vector
resultThe normalized vector
Vector2d makVrl.Vector2d.Normalized ( )
inline

Returns a copy of the Vector2d scaled to unit length.

Returns
static Vector2d makVrl.Vector2d.NormalizeFast ( Vector2d  vec)
inlinestatic

Scale a vector to approximately unit length

Parameters
vecThe input vector
Returns
The normalized vector
static void makVrl.Vector2d.NormalizeFast ( ref Vector2d  vec,
out Vector2d  result 
)
inlinestatic

Scale a vector to approximately unit length

Parameters
vecThe input vector
resultThe normalized vector
static makVrl.Vector2d.operator Vector2 ( Vector2d  v2d)
inlineexplicitstatic

Converts makVrl.Vector2d to makVrl.Vector2.

Parameters
v2dThe Vector2d to convert.
Returns
The resulting Vector2.

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

static makVrl.Vector2d.operator Vector2d ( Vector2  v2)
inlineexplicitstatic

Converts makVrl.Vector2 to makVrl.Vector2d.

Parameters
v2The Vector2 to convert.
Returns
The resulting Vector2d.

References makVrl.Vector2d.Vector2d(), makVrl.Vector2.X, and makVrl.Vector2.Y.

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

Compares two instances for ienquality.

Parameters
leftThe left instance.
rightThe right instance.
Returns
True, if the instances are not equal; false otherwise.
static Vector2d makVrl.Vector2d.operator* ( Vector2d  vec,
double  f 
)
inlinestatic

Multiplies an instance by a scalar.

Parameters
vecThe instance.
fThe scalar.
Returns
The result of the operation.
static Vector2d makVrl.Vector2d.operator* ( double  f,
Vector2d  vec 
)
inlinestatic

Multiply an instance by a scalar.

Parameters
fThe scalar.
vecThe instance.
Returns
The result of the operation.
static Vector2d makVrl.Vector2d.operator+ ( Vector2d  left,
Vector2d  right 
)
inlinestatic

Adds two instances.

Parameters
leftThe left instance.
rightThe right instance.
Returns
The result of the operation.
static Vector2d makVrl.Vector2d.operator- ( Vector2d  left,
Vector2d  right 
)
inlinestatic

Subtracts two instances.

Parameters
leftThe left instance.
rightThe right instance.
Returns
The result of the operation.
static Vector2d makVrl.Vector2d.operator- ( Vector2d  vec)
inlinestatic

Negates an instance.

Parameters
vecThe instance.
Returns
The result of the operation.
static Vector2d makVrl.Vector2d.operator/ ( Vector2d  vec,
double  f 
)
inlinestatic

Divides an instance by a scalar.

Parameters
vecThe instance.
fThe scalar.
Returns
The result of the operation.
static bool makVrl.Vector2d.operator== ( Vector2d  left,
Vector2d  right 
)
inlinestatic

Compares two instances for equality.

Parameters
leftThe left instance.
rightThe right instance.
Returns
True, if both instances are equal; false otherwise.
void makVrl.Vector2d.Scale ( double  sx,
double  sy 
)
inline

Scales the current Vector2 by the given amounts.

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

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

void makVrl.Vector2d.Scale ( Vector2d  scale)
inline

Scales this instance by the given parameter.

Parameters
scaleThe scaling of the individual components.
void makVrl.Vector2d.Scale ( ref Vector2d  scale)
inline

Scales this instance by the given parameter.

Parameters
scaleThe scaling of the individual components.
void makVrl.Vector2d.Sub ( Vector2d  right)
inline

Subtract the Vector passed as parameter from this instance.

Parameters
rightRight operand. This parameter is only read from.
void makVrl.Vector2d.Sub ( ref Vector2d  right)
inline

Subtract the Vector passed as parameter from this instance.

Parameters
rightRight operand. This parameter is only read from.
static Vector2d makVrl.Vector2d.Sub ( Vector2d  a,
Vector2d  b 
)
inlinestatic

Subtract one Vector from another

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

Subtract one Vector from another

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

Subtract one Vector from another

Parameters
aFirst operand
bSecond operand
Returns
Result of subtraction

Referenced by makVrl.Vector2d.BaryCentric().

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

Subtract one Vector from another

Parameters
aFirst operand
bSecond operand
resultResult of subtraction

References makVrl.Vector2d.Vector2d().

override string makVrl.Vector2d.ToString ( )
inline

Returns a System.String that represents the current instance.

Returns

References makVrl.Vector2d.listSeparator, makVrl.Vector2d.X, and makVrl.Vector2d.Y.

static Vector2d makVrl.Vector2d.Transform ( Vector2d  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.
static void makVrl.Vector2d.Transform ( ref Vector2d  vec,
ref Quaterniond  quat,
out Vector2d  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.Vector2d.Vector2d().

Member Data Documentation

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

Defines an instance with all components set to 1.

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

Defines the size of the Vector2d struct in bytes.

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

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

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

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

double makVrl.Vector2d.X
double makVrl.Vector2d.Y
readonly Vector2d makVrl.Vector2d.Zero = new Vector2d(0, 0)
static

Defines a zero-length Vector2d.

Property Documentation

double makVrl.Vector2d.Length
get

Gets the length (magnitude) of the vector.

See Also
LengthSquared

Referenced by makVrl.Vector2d.Normalize().

double makVrl.Vector2d.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

Vector2d makVrl.Vector2d.PerpendicularLeft
get

Gets the perpendicular vector on the left side of this vector.

Vector2d makVrl.Vector2d.PerpendicularRight
get

Gets the perpendicular vector on the right side of this vector.

double makVrl.Vector2d.this[int index]
getset

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

Vector2d makVrl.Vector2d.Yx
getset

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


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

Document ID: Generated on Thu Sep 19 02:12:35 EDT 2024 from SVN revision 269601
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)