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

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

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

Public Member Functions

 Vector3f (float value)
 Constructs a new instance.
 Vector3f (float x, float y, float z)
 Constructs a new Vector3.
 Vector3f (Vector2 v)
 Constructs a new Vector3 from the given Vector2.
 Vector3f (Vector3f v)
 Constructs a new Vector3 from the given Vector3.
 Vector3f (Vector4 v)
 Constructs a new Vector3 from the given Vector4.
void Add (Vector3f right)
 Add the Vector passed as parameter to this instance.
void Add (ref Vector3f right)
 Add the Vector passed as parameter to this instance.
void Sub (Vector3f right)
 Subtract the Vector passed as parameter from this instance.
void Sub (ref Vector3f right)
 Subtract the Vector passed as parameter from this instance.
void Mult (float f)
 Multiply this instance by a scalar.
void Div (float f)
 Divide this instance by a scalar.
Vector3f Normalized ()
 Returns a copy of the Vector3 scaled to unit length.
void Normalize ()
 Scales the Vector3 to unit length.
void NormalizeFast ()
 Scales the Vector3 to approximately unit length.
void Scale (float sx, float sy, float sz)
 Scales the current Vector3 by the given amounts.
void Scale (Vector3f scale)
 Scales this instance by the given parameter.
void Scale (ref Vector3f 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 (Vector3f other)
 Indicates whether the current vector is equal to another vector.

Static Public Member Functions

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

Public Attributes

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

Static Public Attributes

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

Properties

float this[int index] [get, set]
 Gets or sets the value at the index of the Vector.
float Length [get]
 Gets the length (magnitude) of the vector.
float LengthFast [get]
 Gets an approximation of the vector length (magnitude).
float LengthSquared [get]
 Gets the square of the vector length (magnitude).
Vector2 Xy [get, set]
 Gets or sets an makVrl.Vector2 with the X and Y components of this instance.
Vector2 Xz [get, set]
 Gets or sets an makVrl.Vector2 with the X and Z components of this instance.
Vector2 Yx [get, set]
 Gets or sets an makVrl.Vector2 with the Y and X components of this instance.
Vector2 Yz [get, set]
 Gets or sets an makVrl.Vector2 with the Y and Z components of this instance.
Vector2 Zx [get, set]
 Gets or sets an makVrl.Vector2 with the Z and X components of this instance.
Vector2 Zy [get, set]
 Gets or sets an makVrl.Vector2 with the Z and Y components of this instance.
Vector3f Xzy [get, set]
 Gets or sets an makVrl.Vector3 with the X, Z, and Y components of this instance.
Vector3f Yxz [get, set]
 Gets or sets an makVrl.Vector3 with the Y, X, and Z components of this instance.
Vector3f Yzx [get, set]
 Gets or sets an makVrl.Vector3 with the Y, Z, and X components of this instance.
Vector3f Zxy [get, set]
 Gets or sets an makVrl.Vector3 with the Z, X, and Y components of this instance.
Vector3f Zyx [get, set]
 Gets or sets an makVrl.Vector3 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 single-precision floating-point numbers.

The Vector3 structure is suitable for inter operation with unmanaged code requiring three consecutive floats.

Constructor & Destructor Documentation

makVrl.Vector3f.Vector3f ( float  value)
inline
makVrl.Vector3f.Vector3f ( float  x,
float  y,
float  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.Vector3f.X, makVrl.Vector3f.Y, and makVrl.Vector3f.Z.

makVrl.Vector3f.Vector3f ( Vector2  v)
inline

Constructs a new Vector3 from the given Vector2.

Parameters
vThe Vector2 to copy components from.

References makVrl.Vector2.X, makVrl.Vector3f.X, makVrl.Vector2.Y, makVrl.Vector3f.Y, and makVrl.Vector3f.Z.

makVrl.Vector3f.Vector3f ( Vector3f  v)
inline

Constructs a new Vector3 from the given Vector3.

Parameters
vThe Vector3 to copy components from.

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

makVrl.Vector3f.Vector3f ( Vector4  v)
inline

Constructs a new Vector3 from the given Vector4.

Parameters
vThe Vector4 to copy components from.

References makVrl.Vector4.X, makVrl.Vector3f.X, makVrl.Vector4.Y, makVrl.Vector3f.Y, makVrl.Vector4.Z, and makVrl.Vector3f.Z.

Member Function Documentation

void makVrl.Vector3f.Add ( Vector3f  right)
inline

Add the Vector passed as parameter to this instance.

Parameters
rightRight operand. This parameter is only read from.

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

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

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

Add the Vector passed as parameter to this instance.

Parameters
rightRight operand. This parameter is only read from.

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

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

Adds two vectors.

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

References makVrl.Vector3f.Add().

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

Adds two vectors.

Parameters
aLeft operand.
bRight operand.
resultResult of operation.

References makVrl.Vector3f.Vector3f().

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

static float makVrl.Vector3f.CalculateAngle ( Vector3f  first,
Vector3f  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.Vector3f.Dot(), and makVrl.Vector3f.Length.

static void makVrl.Vector3f.CalculateAngle ( ref Vector3f  first,
ref Vector3f  second,
out float  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.Vector3f.Dot().

static Vector3f makVrl.Vector3f.Clamp ( Vector3f  vec,
Vector3f  min,
Vector3f  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.Vector3f.X, makVrl.Vector3f.Y, and makVrl.Vector3f.Z.

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

Clamp a vector to the given minimum and maximum vectors

Parameters
vecInput vector
minMinimum vector
maxMaximum vector
resultThe clamped vector

References makVrl.Vector3f.X.

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

Calculate the component-wise maximum of two vectors

Parameters
aFirst operand
bSecond operand
Returns
The component-wise maximum

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

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

Calculate the component-wise maximum of two vectors

Parameters
aFirst operand
bSecond operand
resultThe component-wise maximum

References makVrl.Vector3f.X.

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

Calculate the component-wise minimum of two vectors

Parameters
aFirst operand
bSecond operand
Returns
The component-wise minimum

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

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

Calculate the component-wise minimum of two vectors

Parameters
aFirst operand
bSecond operand
resultThe component-wise minimum

References makVrl.Vector3f.X.

static Vector3f makVrl.Vector3f.Cross ( Vector3f  left,
Vector3f  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.Matrix4.LookAt(), makVrl.Quaternion.Mult(), makVrl.Quaternion.Multiply(), and makVrl.Vector3f.Transform().

static void makVrl.Vector3f.Cross ( ref Vector3f  left,
ref Vector3f  right,
out Vector3f  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.Vector3f.Vector3f().

void makVrl.Vector3f.Div ( float  f)
inline

Divide this instance by a scalar.

Parameters
fScalar operand.

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

static Vector3f makVrl.Vector3f.Div ( Vector3f  a,
float  f 
)
inlinestatic

Divide a vector by a scalar

Parameters
aVector operand
fScalar operand
Returns
Result of the division

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

static void makVrl.Vector3f.Div ( ref Vector3f  a,
float  f,
out Vector3f  result 
)
inlinestatic

Divide a vector by a scalar

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

Divides a vector by a scalar.

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

Referenced by makVrl.Vector3f.Divide().

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

Divides a vector by a scalar.

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

References makVrl.Vector3f.Multiply().

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

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

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

References makVrl.Vector3f.Divide().

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

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

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

References makVrl.Vector3f.Vector3f().

static float makVrl.Vector3f.Dot ( Vector3f  left,
Vector3f  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.Vector3f.X, makVrl.Vector3f.Y, and makVrl.Vector3f.Z.

Referenced by makVrl.Vector3f.CalculateAngle(), makVrl.Quaternion.Mult(), makVrl.Quaternion.Multiply(), makVrl.Quaternion.Slerp(), makVrl.Vector3f.TransformNormalInverse(), makVrl.Vector3f.TransformPosition(), and makVrl.Vector3f.TransformVector().

static void makVrl.Vector3f.Dot ( ref Vector3f  left,
ref Vector3f  right,
out float  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.Vector3f.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.Vector3f.operator!=(), and makVrl.Vector3f.operator==().

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

override int makVrl.Vector3f.GetHashCode ( )
inline

Returns the hashcode for this instance.

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

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

Referenced by makVrl.Quaternion.GetHashCode(), and makVrl.Matrix3.GetHashCode().

static Vector3f makVrl.Vector3f.Lerp ( Vector3f  a,
Vector3f  b,
float  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.Vector3f.X, makVrl.Vector3f.Y, and makVrl.Vector3f.Z.

static void makVrl.Vector3f.Lerp ( ref Vector3f  a,
ref Vector3f  b,
float  blend,
out Vector3f  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.Vector3f.X.

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

Returns the Vector3 with the minimum magnitude

Parameters
leftLeft operand
rightRight operand
Returns
The minimum Vector3

References makVrl.Vector3f.LengthSquared.

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

Returns the Vector3 with the minimum magnitude

Parameters
leftLeft operand
rightRight operand
Returns
The minimum Vector3

References makVrl.Vector3f.LengthSquared.

void makVrl.Vector3f.Mult ( float  f)
inline

Multiply this instance by a scalar.

Parameters
fScalar operand.

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

static Vector3f makVrl.Vector3f.Mult ( Vector3f  a,
float  f 
)
inlinestatic

Multiply a vector and a scalar

Parameters
aVector operand
fScalar operand
Returns
Result of the multiplication

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

static void makVrl.Vector3f.Mult ( ref Vector3f  a,
float  f,
out Vector3f  result 
)
inlinestatic

Multiply a vector and a scalar

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

Multiplies a vector by a scalar.

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

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

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

Multiplies a vector by a scalar.

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

References makVrl.Vector3f.Vector3f().

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

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

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

References makVrl.Vector3f.Multiply().

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

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

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

References makVrl.Vector3f.Vector3f().

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

Scale a vector to unit length

Parameters
vecThe input vector
Returns
The normalized vector

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

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

Scale a vector to unit length

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

Scales the Vector3 to approximately unit length.

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

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

Scale a vector to approximately unit length

Parameters
vecThe input vector
Returns
The normalized vector

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

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

Scale a vector to approximately unit length

Parameters
vecThe input vector
resultThe normalized vector

References makVrl.MathHelper.InverseSqrtFast().

static bool makVrl.Vector3f.operator!= ( Vector3f  left,
Vector3f  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.Vector3f.Equals().

static Vector3f makVrl.Vector3f.operator* ( Vector3f  vec,
float  scale 
)
inlinestatic

Multiplies an instance by a scalar.

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

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

static Vector3f makVrl.Vector3f.operator* ( float  scale,
Vector3f  vec 
)
inlinestatic

Multiplies an instance by a scalar.

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

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

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

Adds two instances.

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

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

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

Subtracts two instances.

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

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

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

Negates an instance.

Parameters
vecThe instance.
Returns
The result of the calculation.

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

static Vector3f makVrl.Vector3f.operator/ ( Vector3f  vec,
float  scale 
)
inlinestatic

Divides an instance by a scalar.

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

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

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

Compares two instances for equality.

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

References makVrl.Vector3f.Equals().

void makVrl.Vector3f.Scale ( float  sx,
float  sy,
float  sz 
)
inline

Scales the current Vector3 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.Vector3f.X, makVrl.Vector3f.Y, and makVrl.Vector3f.Z.

void makVrl.Vector3f.Scale ( Vector3f  scale)
inline

Scales this instance by the given parameter.

Parameters
scaleThe scaling of the individual components.

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

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

Scales this instance by the given parameter.

Parameters
scaleThe scaling of the individual components.

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

void makVrl.Vector3f.Sub ( Vector3f  right)
inline

Subtract the Vector passed as parameter from this instance.

Parameters
rightRight operand. This parameter is only read from.

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

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

Subtract the Vector passed as parameter from this instance.

Parameters
rightRight operand. This parameter is only read from.

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

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

Subtract one Vector from another

Parameters
aFirst operand
bSecond operand
Returns
Result of subtraction

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

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

Subtract one Vector from another

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

Subtract one Vector from another

Parameters
aFirst operand
bSecond operand
Returns
Result of subtraction

Referenced by makVrl.Vector3f.BaryCentric().

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

Subtract one Vector from another

Parameters
aFirst operand
bSecond operand
resultResult of subtraction

References makVrl.Vector3f.Vector3f().

override string makVrl.Vector3f.ToString ( )
inline

Returns a System.String that represents the current Vector3.

Returns

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

Referenced by makVrl.EntityStateRepository.printDataToConsole().

static Vector3f makVrl.Vector3f.Transform ( Vector3f  vec,
Matrix4  mat 
)
inlinestatic

Transform a Vector by the given Matrix

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

Referenced by makVrl.Vector3f.Transform().

static void makVrl.Vector3f.Transform ( ref Vector3f  vec,
ref Matrix4  mat,
out Vector3f  result 
)
inlinestatic

Transform a Vector by the given Matrix

Parameters
vecThe vector to transform
matThe desired transformation
resultThe transformed vector

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

static Vector3f makVrl.Vector3f.Transform ( Vector3f  vec,
Quaternion  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.Vector3f.Transform().

static void makVrl.Vector3f.Transform ( ref Vector3f  vec,
ref Quaternion  quat,
out Vector3f  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.Vector3f.Add(), makVrl.Vector3f.Cross(), and makVrl.Vector3f.Multiply().

static Vector3f makVrl.Vector3f.TransformNormal ( Vector3f  norm,
Matrix4  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.Matrix4.Invert(), and makVrl.Vector3f.TransformNormalInverse().

static void makVrl.Vector3f.TransformNormal ( ref Vector3f  norm,
ref Matrix4  mat,
out Vector3f  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.Matrix4.Invert(), and makVrl.Vector3f.TransformNormalInverse().

static Vector3f makVrl.Vector3f.TransformNormalInverse ( Vector3f  norm,
Matrix4  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.Vector3f.Dot(), makVrl.Matrix4.Row0, makVrl.Matrix4.Row1, makVrl.Matrix4.Row2, makVrl.Vector3f.Vector3f(), makVrl.Vector3f.X, makVrl.Vector3f.Y, and makVrl.Vector3f.Z.

Referenced by makVrl.Vector3f.TransformNormal().

static void makVrl.Vector3f.TransformNormalInverse ( ref Vector3f  norm,
ref Matrix4  invMat,
out Vector3f  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.Vector3f.X.

static Vector3f makVrl.Vector3f.TransformPerspective ( Vector3f  vec,
Matrix4  mat 
)
inlinestatic

Transform a Vector3 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.Vector3f.TransformPerspective ( ref Vector3f  vec,
ref Matrix4  mat,
out Vector3f  result 
)
inlinestatic

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

Parameters
vecThe vector to transform
matThe desired transformation
resultThe transformed vector

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

static Vector3f makVrl.Vector3f.TransformPosition ( Vector3f  pos,
Matrix4  mat 
)
inlinestatic

Transform a Position by the given Matrix

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

References makVrl.Matrix4.Column0, makVrl.Matrix4.Column1, makVrl.Matrix4.Column2, makVrl.Vector3f.Dot(), makVrl.Matrix4.Row3, makVrl.Vector3f.Vector3f(), makVrl.Vector4.X, makVrl.Vector3f.X, makVrl.Vector4.Y, makVrl.Vector3f.Y, makVrl.Vector4.Z, and makVrl.Vector3f.Z.

static void makVrl.Vector3f.TransformPosition ( ref Vector3f  pos,
ref Matrix4  mat,
out Vector3f  result 
)
inlinestatic

Transform a Position by the given Matrix

Parameters
posThe position to transform
matThe desired transformation
resultThe transformed position

References makVrl.Vector3f.X.

static Vector3f makVrl.Vector3f.TransformVector ( Vector3f  vec,
Matrix4  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.Matrix4.Column0, makVrl.Matrix4.Column1, makVrl.Matrix4.Column2, makVrl.Vector3f.Dot(), makVrl.Vector3f.Vector3f(), makVrl.Vector3f.X, makVrl.Vector3f.Y, and makVrl.Vector3f.Z.

static void makVrl.Vector3f.TransformVector ( ref Vector3f  vec,
ref Matrix4  mat,
out Vector3f  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.Vector3f.X.

Member Data Documentation

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

Defines an instance with all components set to 1.

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

Defines the size of the Vector3 struct in bytes.

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

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

Referenced by makVrl.Quaternion.ToAxisAngle().

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

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

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

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

float makVrl.Vector3f.X

The X component of the Vector3.

Referenced by makVrl.Vector3f.Add(), makVrl.Vector3f.Clamp(), makVrl.Vector3f.ComponentMax(), makVrl.Vector3f.ComponentMin(), makVrl.Matrix3d.CreateFromAxisAngle(), makVrl.Matrix3.CreateFromAxisAngle(), makVrl.Matrix4.CreateFromAxisAngle(), makVrl.Matrix3.CreateRotationY(), makVrl.Matrix3.CreateRotationZ(), makVrl.Matrix3.CreateScale(), makVrl.Matrix4.CreateTranslation(), FireMessage.deserialize(), EmitterStateMessage.deserialize(), DetonateMessage.deserialize(), EntityStateMessage.deserialize(), TransmitterStateMessage.deserialize(), f18.VehicleSim.detonateMunition(), makVrl.Vector3f.Div(), makVrl.Vector3f.Dot(), makVrl.Vector3f.Equals(), makVrl.Vector3f.GetHashCode(), makVrl.Vector3f.Lerp(), makVrl.Matrix4.LookAt(), makVrl.Vector3f.Mult(), makVrl.Matrix3.Mult(), makVrl.Vector3f.Normalize(), makVrl.Vector3f.NormalizeFast(), makVrl.JsonObject.operator JsonObject(), makVrl.Vector3d.operator Vector3d(), makVrl.JsonObject.operator Vector3f(), makVrl.Vector3f.operator*(), makVrl.Vector3f.operator+(), makVrl.Vector3f.operator-(), makVrl.Vector3f.operator/(), makVrl.Vector3f.Scale(), makVrl.Matrix4.Scale(), FireMessage.serialize(), EmitterStateMessage.serialize(), DetonateMessage.serialize(), EntityStateMessage.serialize(), TransmitterStateMessage.serialize(), makVrl.Vector3f.Sub(), makVrl.Vector3f.ToString(), makVrl.Vector3f.TransformNormalInverse(), makVrl.Vector3f.TransformPosition(), makVrl.Vector3f.TransformVector(), makVrl.Vector2.Vector2(), makVrl.Vector3f.Vector3f(), and makVrl.Vector4.Vector4().

float makVrl.Vector3f.Y
float makVrl.Vector3f.Z
readonly Vector3f makVrl.Vector3f.Zero = new Vector3f(0, 0, 0)
static

Property Documentation

float makVrl.Vector3f.Length
get
float makVrl.Vector3f.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
float makVrl.Vector3f.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.Quaternion.FromAxisAngle(), makVrl.Vector3f.Max(), and makVrl.Vector3f.Min().

float makVrl.Vector3f.this[int index]
getset

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

Vector2 makVrl.Vector3f.Xy
getset

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

Vector2 makVrl.Vector3f.Xz
getset

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

Vector3f makVrl.Vector3f.Xzy
getset

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

Vector2 makVrl.Vector3f.Yx
getset

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

Vector3f makVrl.Vector3f.Yxz
getset

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

Vector2 makVrl.Vector3f.Yz
getset

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

Vector3f makVrl.Vector3f.Yzx
getset

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

Vector2 makVrl.Vector3f.Zx
getset

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

Vector3f makVrl.Vector3f.Zxy
getset

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

Vector2 makVrl.Vector3f.Zy
getset

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

Vector3f makVrl.Vector3f.Zyx
getset

Gets or sets an makVrl.Vector3 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 Thu Feb 22 04:26:36 EST 2018 from SVN revision 186468
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)