Mac Guides | Samples

MonoMac.OpenGL.Vector2d Structure

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

See Also: Vector2d

Syntax

public struct Vector2d : IEquatable<Vector2d>

Requirements

Namespace: MonoMac.OpenGL
Assembly: XamMac (in XamMac.dll)
Assembly Versions: 0.0.0.0

The members of MonoMac.OpenGL.Vector2d are listed below.

See Also: ValueType

Public Constructors

Constructs a new instance.
Constructs left vector with the given coordinates.

Public Fields

static readonly
OneVector2d. Defines an instance with all components set to 1.
static readonly
SizeInBytesInt32. Defines the size of the Vector2d struct in bytes.
static
UnitXVector2d. Defines a unit-length Vector2d that points towards the X-axis.
static
UnitYVector2d. Defines a unit-length Vector2d that points towards the Y-axis.
XDouble. The X coordinate of this instance.
YDouble. The Y coordinate of this instance.
static
ZeroVector2d. Defines a zero-length Vector2d.

Public Properties

[read-only]
LengthDouble. Gets the length (magnitude) of the vector.
[read-only]
LengthSquaredDouble. Gets the square of the vector length (magnitude).
[read-only]
PerpendicularLeftVector2d. Gets the perpendicular vector on the left side of this vector.
[read-only]
PerpendicularRightVector2d. Gets the perpendicular vector on the right side of this vector.

Public Methods

Add(Vector2d)
Add the Vector passed as parameter to this instance.
Add(ref Vector2d)
Add the Vector passed as parameter to this instance.
static
Add(Vector2d, Vector2d) : Vector2d
Adds two vectors.
static
Add(ref Vector2d, ref Vector2d, out Vector2d)
Adds two vectors.
static
BaryCentric(Vector2d, Vector2d, Vector2d, Double, Double) : Vector2d
Interpolate 3 Vectors using Barycentric coordinates
static
BaryCentric(ref Vector2d, ref Vector2d, ref Vector2d, Double, Double, out Vector2d)
Interpolate 3 Vectors using Barycentric coordinates
static
Clamp(Vector2d, Vector2d, Vector2d) : Vector2d
Clamp a vector to the given minimum and maximum vectors
static
Clamp(ref Vector2d, ref Vector2d, ref Vector2d, out Vector2d)
Clamp a vector to the given minimum and maximum vectors
Div(Double)
Divide this instance by a scalar.
static
Div(Vector2d, Double) : Vector2d
Divide a vector by a scalar
static
Div(ref Vector2d, Double, out Vector2d)
Divide a vector by a scalar
static
Divide(Vector2d, Vector2d) : Vector2d
Divides a vector by the components of a vector (scale).
static
Divide(Vector2d, Double) : Vector2d
Divides a vector by a scalar.
static
Divide(ref Vector2d, ref Vector2d, out Vector2d)
Divide a vector by the components of a vector (scale).
static
Divide(ref Vector2d, Double, out Vector2d)
Divides a vector by a scalar.
static
Dot(Vector2d, Vector2d) : Double
Calculate the dot (scalar) product of two vectors
static
Dot(ref Vector2d, ref Vector2d, out Double)
Calculate the dot (scalar) product of two vectors
Equals(Vector2d) : 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(Vector2d, Vector2d, Double) : Vector2d
Returns a new Vector that is the linear blend of the 2 given Vectors
static
Lerp(ref Vector2d, ref Vector2d, Double, out Vector2d)
Returns a new Vector that is the linear blend of the 2 given Vectors
static
Max(Vector2d, Vector2d) : Vector2d
Calculate the component-wise maximum of two vectors
static
Max(ref Vector2d, ref Vector2d, out Vector2d)
Calculate the component-wise maximum of two vectors
static
Min(Vector2d, Vector2d) : Vector2d
Calculate the component-wise minimum of two vectors
static
Min(ref Vector2d, ref Vector2d, out Vector2d)
Calculate the component-wise minimum of two vectors
Mult(Double)
Multiply this instance by a scalar.
static
Mult(Vector2d, Double) : Vector2d
Multiply a vector and a scalar
static
Mult(ref Vector2d, Double, out Vector2d)
Multiply a vector and a scalar
static
Multiply(Vector2d, Vector2d) : Vector2d
Multiplies a vector by the components a vector (scale).
static
Multiply(Vector2d, Double) : Vector2d
Multiplies a vector by a scalar.
static
Multiply(ref Vector2d, ref Vector2d, out Vector2d)
Multiplies a vector by the components of a vector (scale).
static
Multiply(ref Vector2d, Double, out Vector2d)
Multiplies a vector by a scalar.
Normalize()
Scales the Vector2 to unit length.
static
Normalize(Vector2d) : Vector2d
Scale a vector to unit length
static
Normalize(ref Vector2d, out Vector2d)
Scale a vector to unit length
static
NormalizeFast(Vector2d) : Vector2d
Scale a vector to approximately unit length
static
NormalizeFast(ref Vector2d, out Vector2d)
Scale a vector to approximately unit length
Scale(Vector2d)
Scales this instance by the given parameter.
Scale(ref Vector2d)
Scales this instance by the given parameter.
Scale(Double, Double)
Scales the current Vector2 by the given amounts.
Sub(Vector2d)
Subtract the Vector passed as parameter from this instance.
Sub(ref Vector2d)
Subtract the Vector passed as parameter from this instance.
static
Sub(Vector2d, Vector2d) : Vector2d
Subtract one Vector from another
static
Sub(ref Vector2d, ref Vector2d, out Vector2d)
Subtract one Vector from another
static
Subtract(Vector2d, Vector2d) : Vector2d
Subtract one Vector from another
static
Subtract(ref Vector2d, ref Vector2d, out Vector2d)
Subtract one Vector from another
override
ToString() : String
Returns a System.String that represents the current instance.
static
Transform(Vector2d, Quaterniond) : Vector2d
Transforms a vector by a quaternion rotation.
static
Transform(ref Vector2d, ref Quaterniond, out Vector2d)
Transforms a vector by a quaternion rotation.

Public Operators

static
Addition(Vector2d, Vector2d) Adds two instances.
static
Division(Vector2d, Double) Divides an instance by a scalar.
static
Equality(Vector2d, Vector2d) Compares two instances for equality.
static
Inequality(Vector2d, Vector2d) Compares two instances for ienquality.
static
Multiply(Vector2d, Double) Multiplies an instance by a scalar.
static
Multiply(Double, Vector2d) Multiply an instance by a scalar.
static
Subtraction(Vector2d, Vector2d) Subtracts two instances.
static
UnaryNegation Negates an instance.
static
Conversion to MonoMac.OpenGL.Vector2d(Explicit)Converts OpenTK.Vector2 to OpenTK.Vector2d.
static
Conversion to MonoMac.OpenGL.Vector2(Explicit)Converts OpenTK.Vector2d to OpenTK.Vector2.