iOS Guides | Samples

OpenTK.Vector4 Structure

Represents a 4D vector using four single-precision floating-point numbers.

See Also: Vector4

Syntax

public struct Vector4 : IEquatable<Vector4>

Remarks

The Vector4 structure is suitable for interoperation with unmanaged code requiring four consecutive floats.

Requirements

Namespace: OpenTK
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0

The members of OpenTK.Vector4 are listed below.

See Also: ValueType

Public Constructors

Constructs a new Vector4 from the given Vector2.
Constructs a new Vector4 from the given Vector3.
Constructs a new Vector4 from the given Vector4.
Constructs a new Vector4.

Public Fields

static readonly
OneVector4. Defines an instance with all components set to 1.
static readonly
SizeInBytesInt32. Defines the size of the Vector4 struct in bytes.
static
UnitWVector4. Defines a unit-length Vector4 that points towards the W-axis.
static
UnitXVector4. Defines a unit-length Vector4 that points towards the X-axis.
static
UnitYVector4. Defines a unit-length Vector4 that points towards the Y-axis.
static
UnitZVector4. Defines a unit-length Vector4 that points towards the Z-axis.
WSingle. The Z component of the Vector4.
XSingle. The X component of the Vector4.
YSingle. The Y component of the Vector4.
ZSingle. The Z component of the Vector4.
static
ZeroVector4. Defines a zero-length Vector4.

Public Properties

[read-only]
LengthSingle. Gets the length (magnitude) of the vector.
[read-only]
LengthFastSingle. Gets an approximation of the vector length (magnitude).
[read-only]
LengthSquaredSingle. Gets the square of the vector length (magnitude).
XyVector2. Gets or sets an OpenTK.Vector2 with the X and Y components of this instance.
XyzVector3. Gets or sets an OpenTK.Vector3 with the X, Y and Z components of this instance.

Public Methods

Add(Vector4)
Add the Vector passed as parameter to this instance.
Add(ref Vector4)
Add the Vector passed as parameter to this instance.
static
Add(Vector4, Vector4) : Vector4
static
Add(ref Vector4, ref Vector4, out Vector4)
Add two Vectors
static
BaryCentric(Vector4, Vector4, Vector4, Single, Single) : Vector4
static
BaryCentric(ref Vector4, ref Vector4, ref Vector4, Single, Single, out Vector4)
static
Clamp(Vector4, Vector4, Vector4) : Vector4
static
Clamp(ref Vector4, ref Vector4, ref Vector4, out Vector4)
Clamp a vector to the given minimum and maximum vectors
Div(Single)
Divide this instance by a scalar.
static
Div(Vector4, Single) : Vector4
static
Div(ref Vector4, Single, out Vector4)
static
Divide(Vector4, Vector4) : Vector4
static
Divide(Vector4, Single) : Vector4
static
Divide(ref Vector4, ref Vector4, out Vector4)
static
Divide(ref Vector4, Single, out Vector4)
static
Dot(Vector4, Vector4) : Single
Calculate the dot product of two vectors
static
Dot(ref Vector4, ref Vector4, out Single)
Equals(Vector4) : Boolean
Indicates whether the current vector is equal to another vector.
override
Equals(Object) : Boolean
Indicates whether this instance and a specified object are equal.
override
GetHashCode() : Int32
Returns the hashcode for this instance.
static
Lerp(Vector4, Vector4, Single) : Vector4
static
Lerp(ref Vector4, ref Vector4, Single, out Vector4)
static
Max(Vector4, Vector4) : Vector4
static
Max(ref Vector4, ref Vector4, out Vector4)
Calculate the component-wise maximum of two vectors
static
Min(Vector4, Vector4) : Vector4
static
Min(ref Vector4, ref Vector4, out Vector4)
Calculate the component-wise minimum of two vectors
Mult(Single)
Multiply this instance by a scalar.
static
Mult(Vector4, Single) : Vector4
static
Mult(ref Vector4, Single, out Vector4)
static
Multiply(Vector4, Vector4) : Vector4
static
Multiply(Vector4, Single) : Vector4
static
Multiply(ref Vector4, ref Vector4, out Vector4)
static
Multiply(ref Vector4, Single, out Vector4)
Normalize()
Scales the Vector4 to unit length.
static
Normalize(Vector4) : Vector4
static
Normalize(ref Vector4, out Vector4)
Scale a vector to unit length
NormalizeFast()
Scales the Vector4 to approximately unit length.
static
NormalizeFast(Vector4) : Vector4
static
NormalizeFast(ref Vector4, out Vector4)
Scale a vector to approximately unit length
Scale(Vector4)
Scales this instance by the given parameter.
Scale(ref Vector4)
Scales this instance by the given parameter.
Scale(Single, Single, Single, Single)
Scales the current Vector4 by the given amounts.
Sub(Vector4)
Subtract the Vector passed as parameter from this instance.
Sub(ref Vector4)
Subtract the Vector passed as parameter from this instance.
static
Sub(Vector4, Vector4) : Vector4
static
Sub(ref Vector4, ref Vector4, out Vector4)
Subtract one Vector from another
static
Subtract(Vector4, Vector4) : Vector4
static
Subtract(ref Vector4, ref Vector4, out Vector4)
override
ToString() : String
Returns a System.String that represents the current Vector4.
static
Transform(Vector4, Matrix4) : Vector4
static
Transform(Vector4, Quaternion) : Vector4
static
Transform(ref Vector4, ref Matrix4, out Vector4)
Transform a Vector by the given Matrix
static
Transform(ref Vector4, ref Quaternion, out Vector4)

Public Operators