Mac Guides | Samples

MonoMac.OpenGL.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: MonoMac.OpenGL
Assembly: XamMac (in XamMac.dll)
Assembly Versions: 0.0.0.0

The members of MonoMac.OpenGL.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 instance.
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
Adds two vectors.
static
Add(ref Vector3, ref Vector3, out Vector3)
Adds two vectors.
static
BaryCentric(Vector3, Vector3, Vector3, Single, Single) : Vector3
Interpolate 3 Vectors using Barycentric coordinates
static
BaryCentric(ref Vector3, ref Vector3, ref Vector3, Single, Single, out Vector3)
Interpolate 3 Vectors using Barycentric coordinates
static
CalculateAngle(Vector3, Vector3) : Single
Calculates the angle (in radians) between two vectors.
static
CalculateAngle(ref Vector3, ref Vector3, out Single)
Calculates the angle (in radians) between two vectors.
static
Clamp(Vector3, Vector3, Vector3) : Vector3
Clamp a vector to the given minimum and maximum vectors
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
Calculate the component-wise maximum of two vectors
static
ComponentMax(ref Vector3, ref Vector3, out Vector3)
Calculate the component-wise maximum of two vectors
static
ComponentMin(Vector3, Vector3) : Vector3
Calculate the component-wise minimum of two vectors
static
ComponentMin(ref Vector3, ref Vector3, out Vector3)
Calculate the component-wise minimum of two vectors
static
Cross(Vector3, Vector3) : Vector3
Caclulate the cross (vector) product of two vectors
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
Divide a vector by a scalar
static
Div(ref Vector3, Single, out Vector3)
Divide a vector by a scalar
static
Divide(Vector3, Vector3) : Vector3
Divides a vector by the components of a vector (scale).
static
Divide(Vector3, Single) : Vector3
Divides a vector by a scalar.
static
Divide(ref Vector3, ref Vector3, out Vector3)
Divide a vector by the components of a vector (scale).
static
Divide(ref Vector3, Single, out Vector3)
Divides a vector by a scalar.
static
Dot(Vector3, Vector3) : Single
Calculate the dot (scalar) product of two vectors
static
Dot(ref Vector3, ref Vector3, out Single)
Calculate the dot (scalar) product of two vectors
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
Returns a new Vector that is the linear blend of the 2 given Vectors
static
Lerp(ref Vector3, ref Vector3, Single, out Vector3)
Returns a new Vector that is the linear blend of the 2 given Vectors
static
Max(Vector3, Vector3) : Vector3
Returns the Vector3 with the minimum magnitude
static
Min(Vector3, Vector3) : Vector3
Returns the Vector3 with the minimum magnitude
Mult(Single)
Multiply this instance by a scalar.
static
Mult(Vector3, Single) : Vector3
Multiply a vector and a scalar
static
Mult(ref Vector3, Single, out Vector3)
Multiply a vector and a scalar
static
Multiply(Vector3, Vector3) : Vector3
Multiplies a vector by the components a vector (scale).
static
Multiply(Vector3, Single) : Vector3
Multiplies a vector by a scalar.
static
Multiply(ref Vector3, ref Vector3, out Vector3)
Multiplies a vector by the components of a vector (scale).
static
Multiply(ref Vector3, Single, out Vector3)
Multiplies a vector by a scalar.
Normalize()
Scales the Vector3 to unit length.
static
Normalize(Vector3) : Vector3
Scale a vector to unit length
static
Normalize(ref Vector3, out Vector3)
Scale a vector to unit length
NormalizeFast()
Scales the Vector3 to approximately unit length.
static
NormalizeFast(Vector3) : Vector3
Scale a vector to approximately unit length
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
Subtract one Vector from another
static
Sub(ref Vector3, ref Vector3, out Vector3)
Subtract one Vector from another
static
Subtract(Vector3, Vector3) : Vector3
Subtract one Vector from another
static
Subtract(ref Vector3, ref Vector3, out Vector3)
Subtract one Vector from another
override
ToString() : String
Returns a System.String that represents the current Vector3.
static
Transform(Vector3, Matrix4) : Vector3
Transform a Vector by the given Matrix
static
Transform(Vector3, Quaternion) : Vector3
Transforms a vector by a quaternion rotation.
static
Transform(ref Vector3, ref Matrix4, out Vector3)
Transform a Vector by the given Matrix
static
Transform(ref Vector3, ref Quaternion, out Vector3)
Transforms a vector by a quaternion rotation.
static
TransformNormal(Vector3, Matrix4) : Vector3
Transform a Normal by the given Matrix
static
TransformNormal(ref Vector3, ref Matrix4, out Vector3)
Transform a Normal by the given Matrix
static
TransformNormalInverse(Vector3, Matrix4) : Vector3
Transform a Normal by the (transpose of the) given Matrix
static
TransformNormalInverse(ref Vector3, ref Matrix4, out Vector3)
Transform a Normal by the (transpose of the) given Matrix
static
TransformPerspective(Vector3, Matrix4) : Vector3
Transform a Vector3 by the given Matrix, and project the resulting Vector4 back to a 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
Transform a Position by the given Matrix
static
TransformPosition(ref Vector3, ref Matrix4, out Vector3)
Transform a Position by the given Matrix
static
TransformVector(Vector3, Matrix4) : 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.
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

static
Addition(Vector3, Vector3) Adds two instances.
static
Division(Vector3, Single) Divides an instance by a scalar.
static
Equality(Vector3, Vector3) Compares two instances for equality.
static
Inequality(Vector3, Vector3) Compares two instances for inequality.
static
Multiply(Vector3, Single) Multiplies an instance by a scalar.
static
Multiply(Single, Vector3) Multiplies an instance by a scalar.
static
Subtraction(Vector3, Vector3) Subtracts two instances.
static
UnaryNegation Negates an instance.