iOS Guides | Samples

OpenTK.Vector3 Structure

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

See Also: Vector3

Syntax

public struct Vector3 : IEquatable<Vector3>

Remarks

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

Requirements

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

The members of OpenTK.Vector3 are listed below.

See Also: ValueType

Public Constructors

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

Public Fields

static readonly
OneVector3. Defines an instance with all components set to 1.
static readonly
SizeInBytesInt32. Defines the size of the Vector3 struct in bytes.
static readonly
UnitXVector3. Defines a unit-length Vector3 that points towards the X-axis.
static readonly
UnitYVector3. Defines a unit-length Vector3 that points towards the Y-axis.
static readonly
UnitZVector3. /// Defines a unit-length Vector3 that points towards the Z-axis.
XSingle. The X component of the Vector3.
YSingle. The Y component of the Vector3.
ZSingle. The Z component of the Vector3.
static readonly
ZeroVector3. Defines a zero-length Vector3.

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.

Public Methods

Add(Vector3)
Add the Vector passed as parameter to this instance.
Add(ref Vector3)
Add the Vector passed as parameter to this instance.
static
Add(Vector3, Vector3) : Vector3
static
Add(ref Vector3, ref Vector3, out Vector3)
Add two Vectors
static
BaryCentric(Vector3, Vector3, Vector3, Single, Single) : Vector3
static
BaryCentric(ref Vector3, ref Vector3, ref Vector3, Single, Single, out Vector3)
static
CalculateAngle(Vector3, Vector3) : Single
Calculates the angle (in radians) between two vectors.
static
CalculateAngle(ref Vector3, ref Vector3, out Single)
static
Clamp(Vector3, Vector3, Vector3) : Vector3
static
Clamp(ref Vector3, ref Vector3, ref Vector3, out Vector3)
Clamp a vector to the given minimum and maximum vectors
static
ComponentMax(Vector3, Vector3) : Vector3
static
ComponentMax(ref Vector3, ref Vector3, out Vector3)
Calculate the component-wise maximum of two vectors
static
ComponentMin(Vector3, Vector3) : Vector3
static
ComponentMin(ref Vector3, ref Vector3, out Vector3)
Calculate the component-wise minimum of two vectors
static
Cross(Vector3, Vector3) : Vector3
static
Cross(ref Vector3, ref Vector3, out Vector3)
Caclulate the cross (vector) product of two vectors
Div(Single)
Divide this instance by a scalar.
static
Div(Vector3, Single) : Vector3
static
Div(ref Vector3, Single, out Vector3)
static
Divide(Vector3, Vector3) : Vector3
static
Divide(Vector3, Single) : Vector3
static
Divide(ref Vector3, ref Vector3, out Vector3)
static
Divide(ref Vector3, Single, out Vector3)
static
Dot(Vector3, Vector3) : Single
Calculate the dot (scalar) product of two vectors
static
Dot(ref Vector3, ref Vector3, out Single)
Equals(Vector3) : 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(Vector3, Vector3, Single) : Vector3
static
Lerp(ref Vector3, ref Vector3, Single, out Vector3)
static
Max(Vector3, Vector3) : Vector3
static
Min(Vector3, Vector3) : Vector3
Mult(Single)
Multiply this instance by a scalar.
static
Mult(Vector3, Single) : Vector3
static
Mult(ref Vector3, Single, out Vector3)
static
Multiply(Vector3, Vector3) : Vector3
static
Multiply(Vector3, Single) : Vector3
static
Multiply(ref Vector3, ref Vector3, out Vector3)
static
Multiply(ref Vector3, Single, out Vector3)
Normalize()
Scales the Vector3 to unit length.
static
Normalize(Vector3) : Vector3
static
Normalize(ref Vector3, out Vector3)
Scale a vector to unit length
NormalizeFast()
Scales the Vector3 to approximately unit length.
static
NormalizeFast(Vector3) : Vector3
static
NormalizeFast(ref Vector3, out Vector3)
Scale a vector to approximately unit length
Scale(Vector3)
Scales this instance by the given parameter.
Scale(ref Vector3)
Scales this instance by the given parameter.
Scale(Single, Single, Single)
Scales the current Vector3 by the given amounts.
Sub(Vector3)
Subtract the Vector passed as parameter from this instance.
Sub(ref Vector3)
Subtract the Vector passed as parameter from this instance.
static
Sub(Vector3, Vector3) : Vector3
static
Sub(ref Vector3, ref Vector3, out Vector3)
Subtract one Vector from another
static
Subtract(Vector3, Vector3) : Vector3
static
Subtract(ref Vector3, ref Vector3, out Vector3)
override
ToString() : String
Returns a System.String that represents the current Vector3.
static
Transform(Vector3, Matrix4) : Vector3
static
Transform(Vector3, Quaternion) : Vector3
static
Transform(ref Vector3, ref Matrix4, out Vector3)
static
Transform(ref Vector3, ref Matrix4, out Vector4)
Transform a Vector by the given Matrix
static
Transform(ref Vector3, ref Quaternion, out Vector3)
static
TransformNormal(Vector3, Matrix4) : Vector3
static
TransformNormal(ref Vector3, ref Matrix4, out Vector3)
Transform a Normal by the given Matrix
static
TransformNormalInverse(Vector3, Matrix4) : Vector3
static
TransformNormalInverse(ref Vector3, ref Matrix4, out Vector3)
Transform a Normal by the (transpose of the) given Matrix
static
TransformPerspective(Vector3, Matrix4) : Vector3
static
TransformPerspective(ref Vector3, ref Matrix4, out Vector3)
Transform a Vector3 by the given Matrix, and project the resulting Vector4 back to a Vector3
static
TransformPosition(Vector3, Matrix4) : Vector3
static
TransformPosition(ref Vector3, ref Matrix4, out Vector3)
Transform a Position by the given Matrix
static
TransformVector(Vector3, Matrix4) : Vector3
static
TransformVector(ref Vector3, ref Matrix4, out Vector3)
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.

Public Operators