Vector3d Vector3d Struct

Definition

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

[System.Serializable]
public struct Vector3d : IEquatable<OpenTK.Vector3d>
type Vector3d = struct
Inheritance
Vector3dVector3d
Attributes
Implements

Constructors

Vector3d(Vector2d) Vector3d(Vector2d)

Constructs a new instance from the given Vector2d.

Vector3d(Vector3d) Vector3d(Vector3d)

Constructs a new instance from the given Vector3d.

Vector3d(Vector4d) Vector3d(Vector4d)

Constructs a new instance from the given Vector4d.

Vector3d(Double) Vector3d(Double)
Vector3d(Double, Double, Double) Vector3d(Double, Double, Double)

Constructs a new Vector3.

Fields

One One

Defines an instance with all components set to 1.

SizeInBytes SizeInBytes

Defines the size of the Vector3d struct in bytes.

UnitX UnitX

Defines a unit-length Vector3d that points towards the X-axis.

UnitY UnitY

Defines a unit-length Vector3d that points towards the Y-axis.

UnitZ UnitZ

/// Defines a unit-length Vector3d that points towards the Z-axis.

X X

The X component of the Vector3.

Y Y

The Y component of the Vector3.

Z Z

The Z component of the Vector3.

Zero Zero

Defines a zero-length Vector3.

Properties

Length Length

Gets the length (magnitude) of the vector.

LengthFast LengthFast

Gets an approximation of the vector length (magnitude).

LengthSquared LengthSquared

Gets the square of the vector length (magnitude).

Xy Xy

Gets or sets an OpenTK.Vector2d with the X and Y components of this instance.

Methods

Add(Vector3d) Add(Vector3d)

Add the Vector passed as parameter to this instance.

Add(Vector3d) Add(Vector3d)

Add the Vector passed as parameter to this instance.

Add(Vector3d, Vector3d) Add(Vector3d, Vector3d)
Add(Vector3d, Vector3d, Vector3d) Add(Vector3d, Vector3d, Vector3d)

Add two Vectors

BaryCentric(Vector3d, Vector3d, Vector3d, Double, Double, Vector3d) BaryCentric(Vector3d, Vector3d, Vector3d, Double, Double, Vector3d)
BaryCentric(Vector3d, Vector3d, Vector3d, Double, Double) BaryCentric(Vector3d, Vector3d, Vector3d, Double, Double)
CalculateAngle(Vector3d, Vector3d) CalculateAngle(Vector3d, Vector3d)

Calculates the angle (in radians) between two vectors.

CalculateAngle(Vector3d, Vector3d, Double) CalculateAngle(Vector3d, Vector3d, Double)
Clamp(Vector3d, Vector3d, Vector3d) Clamp(Vector3d, Vector3d, Vector3d)
Clamp(Vector3d, Vector3d, Vector3d, Vector3d) Clamp(Vector3d, Vector3d, Vector3d, Vector3d)

Clamp a vector to the given minimum and maximum vectors

ComponentMax(Vector3d, Vector3d) ComponentMax(Vector3d, Vector3d)
ComponentMax(Vector3d, Vector3d, Vector3d) ComponentMax(Vector3d, Vector3d, Vector3d)

Calculate the component-wise maximum of two vectors

ComponentMin(Vector3d, Vector3d) ComponentMin(Vector3d, Vector3d)
ComponentMin(Vector3d, Vector3d, Vector3d) ComponentMin(Vector3d, Vector3d, Vector3d)

Calculate the component-wise minimum of two vectors

Cross(Vector3d, Vector3d, Vector3d) Cross(Vector3d, Vector3d, Vector3d)

Caclulate the cross (vector) product of two vectors

Cross(Vector3d, Vector3d) Cross(Vector3d, Vector3d)
Div(Vector3d, Double) Div(Vector3d, Double)
Div(Vector3d, Double, Vector3d) Div(Vector3d, Double, Vector3d)
Div(Double) Div(Double)

Divide this instance by a scalar.

Divide(Vector3d, Vector3d) Divide(Vector3d, Vector3d)
Divide(Vector3d, Double) Divide(Vector3d, Double)
Divide(Vector3d, Vector3d, Vector3d) Divide(Vector3d, Vector3d, Vector3d)
Divide(Vector3d, Double, Vector3d) Divide(Vector3d, Double, Vector3d)
Dot(Vector3d, Vector3d) Dot(Vector3d, Vector3d)

Calculate the dot (scalar) product of two vectors

Dot(Vector3d, Vector3d, Double) Dot(Vector3d, Vector3d, Double)
Equals(Vector3d) Equals(Vector3d)

Indicates whether the current vector is equal to another vector.

Equals(Object) Equals(Object)

Indicates whether this instance and a specified object are equal.

GetHashCode() GetHashCode()

Returns the hashcode for this instance.

Lerp(Vector3d, Vector3d, Double) Lerp(Vector3d, Vector3d, Double)
Lerp(Vector3d, Vector3d, Double, Vector3d) Lerp(Vector3d, Vector3d, Double, Vector3d)
Max(Vector3d, Vector3d) Max(Vector3d, Vector3d)
Min(Vector3d, Vector3d) Min(Vector3d, Vector3d)
Mult(Double) Mult(Double)

Multiply this instance by a scalar.

Mult(Vector3d, Double) Mult(Vector3d, Double)
Mult(Vector3d, Double, Vector3d) Mult(Vector3d, Double, Vector3d)
Multiply(Vector3d, Vector3d, Vector3d) Multiply(Vector3d, Vector3d, Vector3d)
Multiply(Vector3d, Double, Vector3d) Multiply(Vector3d, Double, Vector3d)
Multiply(Vector3d, Vector3d) Multiply(Vector3d, Vector3d)
Multiply(Vector3d, Double) Multiply(Vector3d, Double)
Normalize(Vector3d, Vector3d) Normalize(Vector3d, Vector3d)

Scale a vector to unit length

Normalize(Vector3d) Normalize(Vector3d)
Normalize() Normalize()

Scales the Vector3d to unit length.

NormalizeFast() NormalizeFast()

Scales the Vector3d to approximately unit length.

NormalizeFast(Vector3d) NormalizeFast(Vector3d)
NormalizeFast(Vector3d, Vector3d) NormalizeFast(Vector3d, Vector3d)

Scale a vector to approximately unit length

Scale(Vector3d) Scale(Vector3d)

Scales this instance by the given parameter.

Scale(Vector3d) Scale(Vector3d)

Scales this instance by the given parameter.

Scale(Double, Double, Double) Scale(Double, Double, Double)

Scales the current Vector3d by the given amounts.

Sub(Vector3d) Sub(Vector3d)

Subtract the Vector passed as parameter from this instance.

Sub(Vector3d) Sub(Vector3d)

Subtract the Vector passed as parameter from this instance.

Sub(Vector3d, Vector3d) Sub(Vector3d, Vector3d)
Sub(Vector3d, Vector3d, Vector3d) Sub(Vector3d, Vector3d, Vector3d)

Subtract one Vector from another

Subtract(Vector3d, Vector3d, Vector3d) Subtract(Vector3d, Vector3d, Vector3d)
Subtract(Vector3d, Vector3d) Subtract(Vector3d, Vector3d)
ToString() ToString()

Returns a System.String that represents the current Vector3.

Transform(Vector3d, Matrix4d) Transform(Vector3d, Matrix4d)
Transform(Vector3d, Quaterniond) Transform(Vector3d, Quaterniond)
Transform(Vector3d, Matrix4d, Vector3d) Transform(Vector3d, Matrix4d, Vector3d)
Transform(Vector3d, Matrix4d, Vector4d) Transform(Vector3d, Matrix4d, Vector4d)

Transform a Vector by the given Matrix

Transform(Vector3d, Quaterniond, Vector3d) Transform(Vector3d, Quaterniond, Vector3d)
TransformNormal(Vector3d, Matrix4d) TransformNormal(Vector3d, Matrix4d)
TransformNormal(Vector3d, Matrix4d, Vector3d) TransformNormal(Vector3d, Matrix4d, Vector3d)

Transform a Normal by the given Matrix

TransformNormalInverse(Vector3d, Matrix4d) TransformNormalInverse(Vector3d, Matrix4d)
TransformNormalInverse(Vector3d, Matrix4d, Vector3d) TransformNormalInverse(Vector3d, Matrix4d, Vector3d)

Transform a Normal by the (transpose of the) given Matrix

TransformPerspective(Vector3d, Matrix4d, Vector3d) TransformPerspective(Vector3d, Matrix4d, Vector3d)

Transform a Vector3d by the given Matrix, and project the resulting Vector4d back to a Vector3d

TransformPerspective(Vector3d, Matrix4d) TransformPerspective(Vector3d, Matrix4d)
TransformPosition(Vector3d, Matrix4d) TransformPosition(Vector3d, Matrix4d)
TransformPosition(Vector3d, Matrix4d, Vector3d) TransformPosition(Vector3d, Matrix4d, Vector3d)

Transform a Position by the given Matrix

TransformVector(Vector3d, Matrix4d) TransformVector(Vector3d, Matrix4d)
TransformVector(Vector3d, Matrix4d, Vector3d) TransformVector(Vector3d, Matrix4d, Vector3d)

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.

Operators

Addition(Vector3d, Vector3d) Addition(Vector3d, Vector3d)
Division(Vector3d, Double) Division(Vector3d, Double)
Equality(Vector3d, Vector3d) Equality(Vector3d, Vector3d)
Explicit(Vector3 to Vector3d) Explicit(Vector3 to Vector3d)
Explicit(Vector3d to Vector3) Explicit(Vector3d to Vector3)
Inequality(Vector3d, Vector3d) Inequality(Vector3d, Vector3d)
Multiply(Double, Vector3d) Multiply(Double, Vector3d)
Multiply(Vector3d, Double) Multiply(Vector3d, Double)
Subtraction(Vector3d, Vector3d) Subtraction(Vector3d, Vector3d)
UnaryNegation(Vector3d) UnaryNegation(Vector3d)

Applies to