![]() |
VR-Link C# API Documentation
|
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. More... | |
| Vector3f (float x, float y, float z) | |
| Constructs a new Vector3. More... | |
| Vector3f (Vector2 v) | |
| Constructs a new Vector3 from the given Vector2. More... | |
| Vector3f (Vector3f v) | |
| Constructs a new Vector3 from the given Vector3. More... | |
| Vector3f (Vector4 v) | |
| Constructs a new Vector3 from the given Vector4. More... | |
| void | Add (Vector3f right) |
| Add the Vector passed as parameter to this instance. More... | |
| void | Add (ref Vector3f right) |
| Add the Vector passed as parameter to this instance. More... | |
| void | Sub (Vector3f right) |
| Subtract the Vector passed as parameter from this instance. More... | |
| void | Sub (ref Vector3f right) |
| Subtract the Vector passed as parameter from this instance. More... | |
| void | Mult (float f) |
| Multiply this instance by a scalar. More... | |
| void | Div (float f) |
| Divide this instance by a scalar. More... | |
| Vector3f | Normalized () |
| Returns a copy of the Vector3 scaled to unit length. More... | |
| void | Normalize () |
| Scales the Vector3 to unit length. More... | |
| void | NormalizeFast () |
| Scales the Vector3 to approximately unit length. More... | |
| void | Scale (float sx, float sy, float sz) |
| Scales the current Vector3 by the given amounts. More... | |
| void | Scale (Vector3f scale) |
| Scales this instance by the given parameter. More... | |
| void | Scale (ref Vector3f scale) |
| Scales this instance by the given parameter. More... | |
| override string | ToString () |
| Returns a System.String that represents the current Vector3. 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 (Vector3f other) |
| Indicates whether the current vector is equal to another vector. More... | |
Static Public Member Functions | |
| static Vector3f | Sub (Vector3f a, Vector3f b) |
| Subtract one Vector from another More... | |
| static void | Sub (ref Vector3f a, ref Vector3f b, out Vector3f result) |
| Subtract one Vector from another More... | |
| static Vector3f | Mult (Vector3f a, float f) |
| Multiply a vector and a scalar More... | |
| static void | Mult (ref Vector3f a, float f, out Vector3f result) |
| Multiply a vector and a scalar More... | |
| static Vector3f | Div (Vector3f a, float f) |
| Divide a vector by a scalar More... | |
| static void | Div (ref Vector3f a, float f, out Vector3f result) |
| Divide a vector by a scalar More... | |
| static Vector3f | Add (Vector3f a, Vector3f b) |
| Adds two vectors. More... | |
| static void | Add (ref Vector3f a, ref Vector3f b, out Vector3f result) |
| Adds two vectors. More... | |
| static Vector3f | Subtract (Vector3f a, Vector3f b) |
| Subtract one Vector from another More... | |
| static void | Subtract (ref Vector3f a, ref Vector3f b, out Vector3f result) |
| Subtract one Vector from another More... | |
| static Vector3f | Multiply (Vector3f vector, float scale) |
| Multiplies a vector by a scalar. More... | |
| static void | Multiply (ref Vector3f vector, float scale, out Vector3f result) |
| Multiplies a vector by a scalar. More... | |
| static Vector3f | Multiply (Vector3f vector, Vector3f scale) |
| Multiplies a vector by the components a vector (scale). More... | |
| static void | Multiply (ref Vector3f vector, ref Vector3f scale, out Vector3f result) |
| Multiplies a vector by the components of a vector (scale). More... | |
| static Vector3f | Divide (Vector3f vector, float scale) |
| Divides a vector by a scalar. More... | |
| static void | Divide (ref Vector3f vector, float scale, out Vector3f result) |
| Divides a vector by a scalar. More... | |
| static Vector3f | Divide (Vector3f vector, Vector3f scale) |
| Divides a vector by the components of a vector (scale). More... | |
| static void | Divide (ref Vector3f vector, ref Vector3f scale, out Vector3f result) |
| Divide a vector by the components of a vector (scale). More... | |
| static Vector3f | ComponentMin (Vector3f a, Vector3f b) |
| Calculate the component-wise minimum of two vectors More... | |
| static void | ComponentMin (ref Vector3f a, ref Vector3f b, out Vector3f result) |
| Calculate the component-wise minimum of two vectors More... | |
| static Vector3f | ComponentMax (Vector3f a, Vector3f b) |
| Calculate the component-wise maximum of two vectors More... | |
| static void | ComponentMax (ref Vector3f a, ref Vector3f b, out Vector3f result) |
| Calculate the component-wise maximum of two vectors More... | |
| static Vector3f | Min (Vector3f left, Vector3f right) |
| Returns the Vector3 with the minimum magnitude More... | |
| static Vector3f | Max (Vector3f left, Vector3f right) |
| Returns the Vector3 with the minimum magnitude More... | |
| static Vector3f | Clamp (Vector3f vec, Vector3f min, Vector3f max) |
| Clamp a vector to the given minimum and maximum vectors More... | |
| 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 More... | |
| static Vector3f | Normalize (Vector3f vec) |
| Scale a vector to unit length More... | |
| static void | Normalize (ref Vector3f vec, out Vector3f result) |
| Scale a vector to unit length More... | |
| static Vector3f | NormalizeFast (Vector3f vec) |
| Scale a vector to approximately unit length More... | |
| static void | NormalizeFast (ref Vector3f vec, out Vector3f result) |
| Scale a vector to approximately unit length More... | |
| static float | Dot (Vector3f left, Vector3f right) |
| Calculate the dot (scalar) product of two vectors More... | |
| static void | Dot (ref Vector3f left, ref Vector3f right, out float result) |
| Calculate the dot (scalar) product of two vectors More... | |
| static Vector3f | Cross (Vector3f left, Vector3f right) |
| Caclulate the cross (vector) product of two vectors More... | |
| static void | Cross (ref Vector3f left, ref Vector3f right, out Vector3f result) |
| Caclulate the cross (vector) product of two vectors More... | |
| static Vector3f | Lerp (Vector3f a, Vector3f b, float blend) |
| Returns a new Vector that is the linear blend of the 2 given Vectors More... | |
| 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 More... | |
| static Vector3f | BaryCentric (Vector3f a, Vector3f b, Vector3f c, float u, float v) |
| Interpolate 3 Vectors using Barycentric coordinates More... | |
| 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 More... | |
| 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. More... | |
| 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. More... | |
| static Vector3f | TransformNormal (Vector3f norm, Matrix4 mat) |
| Transform a Normal by the given Matrix More... | |
| static void | TransformNormal (ref Vector3f norm, ref Matrix4 mat, out Vector3f result) |
| Transform a Normal by the given Matrix More... | |
| static Vector3f | TransformNormalInverse (Vector3f norm, Matrix4 invMat) |
| Transform a Normal by the (transpose of the) given Matrix More... | |
| static void | TransformNormalInverse (ref Vector3f norm, ref Matrix4 invMat, out Vector3f result) |
| Transform a Normal by the (transpose of the) given Matrix More... | |
| static Vector3f | TransformPosition (Vector3f pos, Matrix4 mat) |
| Transform a Position by the given Matrix More... | |
| static void | TransformPosition (ref Vector3f pos, ref Matrix4 mat, out Vector3f result) |
| Transform a Position by the given Matrix More... | |
| static Vector3f | Transform (Vector3f vec, Matrix4 mat) |
| Transform a Vector by the given Matrix More... | |
| static void | Transform (ref Vector3f vec, ref Matrix4 mat, out Vector3f result) |
| Transform a Vector by the given Matrix More... | |
| static Vector3f | Transform (Vector3f vec, Quaternion quat) |
| Transforms a vector by a quaternion rotation. More... | |
| static void | Transform (ref Vector3f vec, ref Quaternion quat, out Vector3f result) |
| Transforms a vector by a quaternion rotation. More... | |
| static Vector3f | TransformPerspective (Vector3f vec, Matrix4 mat) |
| Transform a Vector3 by the given Matrix, and project the resulting Vector4 back to a Vector3 More... | |
| 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 More... | |
| static float | CalculateAngle (Vector3f first, Vector3f second) |
| Calculates the angle (in radians) between two vectors. More... | |
| static void | CalculateAngle (ref Vector3f first, ref Vector3f second, out float result) |
| Calculates the angle (in radians) between two vectors. More... | |
| static Vector3f | operator+ (Vector3f left, Vector3f right) |
| Adds two instances. More... | |
| static Vector3f | operator- (Vector3f left, Vector3f right) |
| Subtracts two instances. More... | |
| static Vector3f | operator- (Vector3f vec) |
| Negates an instance. More... | |
| static Vector3f | operator* (Vector3f vec, float scale) |
| Multiplies an instance by a scalar. More... | |
| static Vector3f | operator* (float scale, Vector3f vec) |
| Multiplies an instance by a scalar. More... | |
| static Vector3f | operator/ (Vector3f vec, float scale) |
| Divides an instance by a scalar. More... | |
| static bool | operator== (Vector3f left, Vector3f right) |
| Compares two instances for equality. More... | |
| static bool | operator!= (Vector3f left, Vector3f right) |
| Compares two instances for inequality. More... | |
Public Attributes | |
| float | X |
| The X component of the Vector3. More... | |
| float | Y |
| The Y component of the Vector3. More... | |
| float | Z |
| The Z component of the Vector3. More... | |
Static Public Attributes | |
| static readonly Vector3f | UnitX = new Vector3f(1, 0, 0) |
| Defines a unit-length Vector3 that points towards the X-axis. More... | |
| static readonly Vector3f | UnitY = new Vector3f(0, 1, 0) |
| Defines a unit-length Vector3 that points towards the Y-axis. More... | |
| static readonly Vector3f | UnitZ = new Vector3f(0, 0, 1) |
| /// Defines a unit-length Vector3 that points towards the Z-axis. More... | |
| static readonly Vector3f | Zero = new Vector3f(0, 0, 0) |
| Defines a zero-length Vector3. More... | |
| static readonly Vector3f | One = new Vector3f(1, 1, 1) |
| Defines an instance with all components set to 1. More... | |
| static readonly int | SizeInBytes = Marshal.SizeOf(new Vector3f()) |
| Defines the size of the Vector3 struct in bytes. More... | |
Properties | |
| float | this[int index] [get, set] |
| Gets or sets the value at the index of the Vector. More... | |
| float | Length [get] |
| Gets the length (magnitude) of the vector. More... | |
| float | LengthFast [get] |
| Gets an approximation of the vector length (magnitude). More... | |
| float | LengthSquared [get] |
| Gets the square of the vector length (magnitude). More... | |
| Vector2 | Xy [get, set] |
| Gets or sets an makVrl.Vector2 with the X and Y components of this instance. More... | |
| Vector2 | Xz [get, set] |
| Gets or sets an makVrl.Vector2 with the X and Z components of this instance. More... | |
| Vector2 | Yx [get, set] |
| Gets or sets an makVrl.Vector2 with the Y and X components of this instance. More... | |
| Vector2 | Yz [get, set] |
| Gets or sets an makVrl.Vector2 with the Y and Z components of this instance. More... | |
| Vector2 | Zx [get, set] |
| Gets or sets an makVrl.Vector2 with the Z and X components of this instance. More... | |
| Vector2 | Zy [get, set] |
| Gets or sets an makVrl.Vector2 with the Z and Y components of this instance. More... | |
| Vector3f | Xzy [get, set] |
| Gets or sets an makVrl.Vector3 with the X, Z, and Y components of this instance. More... | |
| Vector3f | Yxz [get, set] |
| Gets or sets an makVrl.Vector3 with the Y, X, and Z components of this instance. More... | |
| Vector3f | Yzx [get, set] |
| Gets or sets an makVrl.Vector3 with the Y, Z, and X components of this instance. More... | |
| Vector3f | Zxy [get, set] |
| Gets or sets an makVrl.Vector3 with the Z, X, and Y components of this instance. More... | |
| Vector3f | Zyx [get, set] |
| Gets or sets an makVrl.Vector3 with the Z, Y, and X components of this instance. More... | |
Static Private Attributes | |
| static string | listSeparator = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ListSeparator |
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.
|
inline |
Constructs a new instance.
| value | The value that will initialize this instance. |
References makVrl.Vector3f.X, makVrl.Vector3f.Y, and makVrl.Vector3f.Z.
Referenced by makVrl.Vector3f.Add(), makVrl.Vector3f.Cross(), makVrl.Vector3f.Divide(), makVrl.Vector3f.Equals(), makVrl.Vector3f.Multiply(), makVrl.Vector3f.Subtract(), makVrl.Vector3f.TransformNormalInverse(), makVrl.Vector3f.TransformPosition(), and makVrl.Vector3f.TransformVector().
|
inline |
Constructs a new Vector3.
| x | The x component of the Vector3. |
| y | The y component of the Vector3. |
| z | The z component of the Vector3. |
References makVrl.Vector3f.X, makVrl.Vector3f.Y, and makVrl.Vector3f.Z.
|
inline |
Constructs a new Vector3 from the given Vector2.
| v | The Vector2 to copy components from. |
References makVrl.Vector3f.X, makVrl.Vector3f.Y, and makVrl.Vector3f.Z.
|
inline |
Constructs a new Vector3 from the given Vector3.
| v | The Vector3 to copy components from. |
References makVrl.Vector3f.X, makVrl.Vector3f.Y, and makVrl.Vector3f.Z.
|
inline |
Constructs a new Vector3 from the given Vector4.
| v | The Vector4 to copy components from. |
References makVrl.Vector3f.X, makVrl.Vector3f.Y, and makVrl.Vector3f.Z.
|
inline |
Add the Vector passed as parameter to this instance.
| right | Right operand. This parameter is only read from. |
Referenced by makVrl.Vector3f.Add(), and makVrl.Vector3f.BaryCentric().
|
inline |
Add the Vector passed as parameter to this instance.
| right | Right operand. This parameter is only read from. |
Adds two vectors.
| a | Left operand. |
| b | Right operand. |
References makVrl.Vector3f.Add().
|
inlinestatic |
Adds two vectors.
| a | Left operand. |
| b | Right operand. |
| result | Result of operation. |
References makVrl.Vector3f.Vector3f().
|
inlinestatic |
Interpolate 3 Vectors using Barycentric coordinates
| a | First input Vector |
| b | Second input Vector |
| c | Third input Vector |
| u | First Barycentric Coordinate |
| v | Second Barycentric Coordinate |
|
inlinestatic |
Interpolate 3 Vectors using Barycentric coordinates
| a | First input Vector. |
| b | Second input Vector. |
| c | Third input Vector. |
| u | First Barycentric Coordinate. |
| v | Second Barycentric Coordinate. |
| result | Output Vector. a when u=v=0, b when u=1,v=0, c when u=0,v=1, and a linear combination of a,b,c otherwise |
References makVrl.Vector3f.Add(), makVrl.Vector3f.Multiply(), and makVrl.Vector3f.Subtract().
Calculates the angle (in radians) between two vectors.
| first | The first vector. |
| second | The second vector. |
Note that the returned angle is never bigger than the constant Pi.
|
inlinestatic |
Calculates the angle (in radians) between two vectors.
| first | The first vector. |
| second | The second vector. |
| result | Angle (in radians) between the vectors. |
Note that the returned angle is never bigger than the constant Pi.
Clamp a vector to the given minimum and maximum vectors
| vec | Input vector |
| min | Minimum vector |
| max | Maximum vector |
|
inlinestatic |
Clamp a vector to the given minimum and maximum vectors
| vec | Input vector |
| min | Minimum vector |
| max | Maximum vector |
| result | The clamped vector |
Calculate the component-wise maximum of two vectors
| a | First operand |
| b | Second operand |
|
inlinestatic |
Calculate the component-wise maximum of two vectors
| a | First operand |
| b | Second operand |
| result | The component-wise maximum |
Calculate the component-wise minimum of two vectors
| a | First operand |
| b | Second operand |
|
inlinestatic |
Calculate the component-wise minimum of two vectors
| a | First operand |
| b | Second operand |
| result | The component-wise minimum |
Caclulate the cross (vector) product of two vectors
| left | First operand |
| right | Second operand |
Referenced by makVrl.Quaternion.Mult(), and makVrl.Quaternion.Multiply().
|
inlinestatic |
Caclulate the cross (vector) product of two vectors
| left | First operand |
| right | Second operand |
| result | The cross product of the two inputs |
References makVrl.Vector3f.Vector3f().
|
inline |
Divide this instance by a scalar.
| f | Scalar operand. |
Divide a vector by a scalar
| a | Vector operand |
| f | Scalar operand |
Divide a vector by a scalar
| a | Vector operand |
| f | Scalar operand |
| result | Result of the division |
Divides a vector by a scalar.
| vector | Left operand. |
| scale | Right operand. |
Referenced by makVrl.Vector3f.Divide().
|
inlinestatic |
Divides a vector by a scalar.
| vector | Left operand. |
| scale | Right operand. |
| result | Result of the operation. |
References makVrl.Vector3f.Multiply().
Divides a vector by the components of a vector (scale).
| vector | Left operand. |
| scale | Right operand. |
References makVrl.Vector3f.Divide().
|
inlinestatic |
Divide a vector by the components of a vector (scale).
| vector | Left operand. |
| scale | Right operand. |
| result | Result of the operation. |
References makVrl.Vector3f.Vector3f().
Calculate the dot (scalar) product of two vectors
| left | First operand |
| right | Second operand |
Referenced by makVrl.Vector3f.TransformPosition().
|
inlinestatic |
Calculate the dot (scalar) product of two vectors
| left | First operand |
| right | Second operand |
| result | The dot product of the two inputs |
|
inline |
Indicates whether this instance and a specified object are equal.
| obj | The object to compare to. |
References makVrl.Vector3f.Vector3f().
|
inline |
Indicates whether the current vector is equal to another vector.
| other | A vector to compare with this vector. |
References makVrl.Vector3f.X, makVrl.Vector3f.Y, and makVrl.Vector3f.Z.
|
inline |
Returns the hashcode for this instance.
References makVrl.Vector3f.Y.
Referenced by makVrl.Matrix3.GetHashCode().
Returns a new Vector that is the linear blend of the 2 given Vectors
| a | First input vector |
| b | Second input vector |
| blend | The blend factor. a when blend=0, b when blend=1. |
References makVrl.Vector3f.X, makVrl.Vector3f.Y, and makVrl.Vector3f.Z.
|
inlinestatic |
Returns a new Vector that is the linear blend of the 2 given Vectors
| a | First input vector |
| b | Second input vector |
| blend | The blend factor. a when blend=0, b when blend=1. |
| result | a when blend=0, b when blend=1, and a linear combination otherwise |
Returns the Vector3 with the minimum magnitude
| left | Left operand |
| right | Right operand |
Returns the Vector3 with the minimum magnitude
| left | Left operand |
| right | Right operand |
|
inline |
Multiply this instance by a scalar.
| f | Scalar operand. |
Multiply a vector and a scalar
| a | Vector operand |
| f | Scalar operand |
Multiply a vector and a scalar
| a | Vector operand |
| f | Scalar operand |
| result | Result of the multiplication |
Multiplies a vector by a scalar.
| vector | Left operand. |
| scale | Right operand. |
Referenced by makVrl.Vector3f.BaryCentric(), makVrl.Vector3f.Divide(), and makVrl.Vector3f.Multiply().
|
inlinestatic |
Multiplies a vector by a scalar.
| vector | Left operand. |
| scale | Right operand. |
| result | Result of the operation. |
References makVrl.Vector3f.Vector3f().
Multiplies a vector by the components a vector (scale).
| vector | Left operand. |
| scale | Right operand. |
References makVrl.Vector3f.Multiply().
|
inlinestatic |
Multiplies a vector by the components of a vector (scale).
| vector | Left operand. |
| scale | Right operand. |
| result | Result of the operation. |
References makVrl.Vector3f.Vector3f().
|
inline |
Scales the Vector3 to unit length.
References makVrl.Vector3f.X, makVrl.Vector3f.Y, and makVrl.Vector3f.Z.
Scale a vector to unit length
| vec | The input vector |
Scale a vector to unit length
| vec | The input vector |
| result | The normalized vector |
|
inline |
Returns a copy of the Vector3 scaled to unit length.
|
inline |
Scales the Vector3 to approximately unit length.
References makVrl.Vector3f.X, makVrl.Vector3f.Y, and makVrl.Vector3f.Z.
Scale a vector to approximately unit length
| vec | The input vector |
Scale a vector to approximately unit length
| vec | The input vector |
| result | The normalized vector |
Compares two instances for inequality.
| left | The first instance. |
| right | The second instance. |
Multiplies an instance by a scalar.
| vec | The instance. |
| scale | The scalar. |
Multiplies an instance by a scalar.
| scale | The scalar. |
| vec | The instance. |
Adds two instances.
| left | The first instance. |
| right | The second instance. |
Subtracts two instances.
| left | The first instance. |
| right | The second instance. |
Negates an instance.
| vec | The instance. |
Divides an instance by a scalar.
| vec | The instance. |
| scale | The scalar. |
Compares two instances for equality.
| left | The first instance. |
| right | The second instance. |
|
inline |
Scales the current Vector3 by the given amounts.
| sx | The scale of the X component. |
| sy | The scale of the Y component. |
| sz | The scale of the Z component. |
References makVrl.Vector3f.X, makVrl.Vector3f.Y, and makVrl.Vector3f.Z.
|
inline |
Scales this instance by the given parameter.
| scale | The scaling of the individual components. |
|
inline |
Scales this instance by the given parameter.
| scale | The scaling of the individual components. |
|
inline |
Subtract the Vector passed as parameter from this instance.
| right | Right operand. This parameter is only read from. |
|
inline |
Subtract the Vector passed as parameter from this instance.
| right | Right operand. This parameter is only read from. |
Subtract one Vector from another
| a | First operand |
| b | Second operand |
|
inlinestatic |
Subtract one Vector from another
| a | First operand |
| b | Second operand |
| result | Result of subtraction |
Subtract one Vector from another
| a | First operand |
| b | Second operand |
Referenced by makVrl.Vector3f.BaryCentric().
|
inlinestatic |
Subtract one Vector from another
| a | First operand |
| b | Second operand |
| result | Result of subtraction |
References makVrl.Vector3f.Vector3f().
|
inline |
Returns a System.String that represents the current Vector3.
References makVrl.Vector3f.listSeparator, makVrl.Vector3f.X, makVrl.Vector3f.Y, and makVrl.Vector3f.Z.
Transform a Vector by the given Matrix
| vec | The vector to transform |
| mat | The desired transformation |
Referenced by makVrl.Vector3f.Transform().
|
inlinestatic |
Transform a Vector by the given Matrix
| vec | The vector to transform |
| mat | The desired transformation |
| result | The transformed vector |
|
inlinestatic |
Transforms a vector by a quaternion rotation.
| vec | The vector to transform. |
| quat | The quaternion to rotate the vector by. |
References makVrl.Vector3f.Transform().
|
inlinestatic |
Transforms a vector by a quaternion rotation.
| vec | The vector to transform. |
| quat | The quaternion to rotate the vector by. |
| result | The result of the operation. |
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
| norm | The normal to transform |
| mat | The desired transformation |
References makVrl.Vector3f.TransformNormalInverse().
|
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
| norm | The normal to transform |
| mat | The desired transformation |
| result | The transformed normal |
|
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
| norm | The normal to transform |
| invMat | The inverse of the desired transformation |
References makVrl.Matrix4.Row0, makVrl.Matrix4.Row1, makVrl.Matrix4.Row2, and makVrl.Vector3f.Vector3f().
Referenced by makVrl.Vector3f.TransformNormal().
|
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
| norm | The normal to transform |
| invMat | The inverse of the desired transformation |
| result | The transformed normal |
Transform a Vector3 by the given Matrix, and project the resulting Vector4 back to a Vector3
| vec | The vector to transform |
| mat | The desired transformation |
|
inlinestatic |
Transform a Vector3 by the given Matrix, and project the resulting Vector4 back to a Vector3
| vec | The vector to transform |
| mat | The desired transformation |
| result | The transformed vector |
Transform a Position by the given Matrix
| pos | The position to transform |
| mat | The desired transformation |
References makVrl.Matrix4.Column0, makVrl.Matrix4.Column1, makVrl.Matrix4.Column2, makVrl.Vector3f.Dot(), makVrl.Matrix4.Row3, makVrl.Vector3f.Vector3f(), makVrl.Vector4.X, makVrl.Vector3f.Y, and makVrl.Vector4.Z.
|
inlinestatic |
Transform a Position by the given Matrix
| pos | The position to transform |
| mat | The desired transformation |
| result | The transformed position |
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.
| vec | The vector to transform |
| mat | The desired transformation |
References makVrl.Matrix4.Column0, makVrl.Matrix4.Column1, makVrl.Matrix4.Column2, and makVrl.Vector3f.Vector3f().
|
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.
| vec | The vector to transform |
| mat | The desired transformation |
| result | The transformed vector |
|
staticprivate |
Referenced by makVrl.Vector3f.ToString().
Defines an instance with all components set to 1.
|
static |
Defines the size of the Vector3 struct in bytes.
Defines a unit-length Vector3 that points towards the X-axis.
Referenced by makVrl.Quaternion.ToAxisAngle().
Defines a unit-length Vector3 that points towards the Y-axis.
/// Defines a unit-length Vector3 that points towards the Z-axis.
| float makVrl.Vector3f.X |
The X component of the Vector3.
Referenced by makVrl.Matrix4.CreateTranslation(), makVrl.Vector3f.Equals(), makVrl.Vector3f.Lerp(), makVrl.Vector3f.Normalize(), makVrl.Vector3f.NormalizeFast(), makVrl.TaitBryan.operator TaitBryan(), makVrl.Vector3d.operator Vector3d(), makVrl.Vector3f.Scale(), makVrl.Matrix4.Scale(), makVrl.Vector3f.ToString(), and makVrl.Vector3f.Vector3f().
| float makVrl.Vector3f.Y |
The Y component of the Vector3.
Referenced by makVrl.Matrix4.CreateTranslation(), makVrl.Vector3f.Equals(), makVrl.Vector3f.GetHashCode(), makVrl.Vector3f.Lerp(), makVrl.Matrix4.LookAt(), makVrl.Vector3f.Normalize(), makVrl.Vector3f.NormalizeFast(), makVrl.TaitBryan.operator TaitBryan(), makVrl.Vector3d.operator Vector3d(), makVrl.Vector3f.Scale(), makVrl.Matrix4.Scale(), makVrl.Vector3f.ToString(), makVrl.Vector3f.TransformPosition(), and makVrl.Vector3f.Vector3f().
| float makVrl.Vector3f.Z |
The Z component of the Vector3.
Referenced by makVrl.Matrix4.CreateTranslation(), makVrl.Vector3f.Equals(), makVrl.Vector3f.Lerp(), makVrl.Vector3f.Normalize(), makVrl.Vector3f.NormalizeFast(), makVrl.TaitBryan.operator TaitBryan(), makVrl.Vector3d.operator Vector3d(), makVrl.Vector3f.Scale(), makVrl.Matrix4.Scale(), makVrl.Vector3f.ToString(), and makVrl.Vector3f.Vector3f().
Defines a zero-length Vector3.
Referenced by makVrl.Matrix4.ClearTranslation(), makVrl.EmitterStateRepository.EmitterStateRepository(), makVrl.IffStateRepository.IffStateRepository(), and makVrl.JsonObject.operator Vector3f().
|
get |
Gets the length (magnitude) of the vector.
Referenced by makVrl.Matrix3.ClearRotation(), makVrl.Matrix4.ClearRotation(), makVrl.Matrix3.ExtractScale(), and makVrl.Matrix4.ExtractScale().
|
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.
|
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.
Referenced by makVrl.Quaternion.FromAxisAngle().
|
getset |
Gets or sets the value at the index of the Vector.
|
getset |
Gets or sets an makVrl.Vector2 with the X and Y components of this instance.
|
getset |
Gets or sets an makVrl.Vector2 with the X and Z components of this instance.
|
getset |
Gets or sets an makVrl.Vector3 with the X, Z, and Y components of this instance.
|
getset |
Gets or sets an makVrl.Vector2 with the Y and X components of this instance.
|
getset |
Gets or sets an makVrl.Vector3 with the Y, X, and Z components of this instance.
|
getset |
Gets or sets an makVrl.Vector2 with the Y and Z components of this instance.
|
getset |
Gets or sets an makVrl.Vector3 with the Y, Z, and X components of this instance.
|
getset |
Gets or sets an makVrl.Vector2 with the Z and X components of this instance.
|
getset |
Gets or sets an makVrl.Vector3 with the Z, X, and Y components of this instance.
|
getset |
Gets or sets an makVrl.Vector2 with the Z and Y components of this instance.
|
getset |
Gets or sets an makVrl.Vector3 with the Z, Y, and X components of this instance.