Edit

Share via


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
Vector3d
Attributes
Implements

Constructors

Vector3d(Double, Double, Double)

Constructs a new Vector3.

Vector3d(Double)
Vector3d(Vector2d)

Constructs a new instance from the given Vector2d.

Vector3d(Vector3d)

Constructs a new instance from the given Vector3d.

Vector3d(Vector4d)

Constructs a new instance from the given Vector4d.

Fields

One

Defines an instance with all components set to 1.

SizeInBytes

Defines the size of the Vector3d struct in bytes.

UnitX

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

UnitY

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

UnitZ

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

X

The X component of the Vector3.

Y

The Y component of the Vector3.

Z

The Z component of the Vector3.

Zero

Defines a zero-length Vector3.

Properties

Length

Gets the length (magnitude) of the vector.

LengthFast

Gets an approximation of the vector length (magnitude).

LengthSquared

Gets the square of the vector length (magnitude).

Xy

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

Methods

Add(Vector3d, Vector3d, Vector3d)

Add two Vectors

Add(Vector3d, Vector3d)
Add(Vector3d)
Obsolete.

Add the Vector passed as parameter to this instance.

Add(Vector3d)
Obsolete.

Add the Vector passed as parameter to this instance.

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

Calculates the angle (in radians) between two vectors.

Clamp(Vector3d, Vector3d, Vector3d, Vector3d)

Clamp a vector to the given minimum and maximum vectors

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

Calculate the component-wise maximum of two vectors

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

Calculate the component-wise minimum of two vectors

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

Caclulate the cross (vector) product of two vectors

Cross(Vector3d, Vector3d)
Div(Double)
Obsolete.

Divide this instance by a scalar.

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

Calculate the dot (scalar) product of two vectors

Equals(Object)

Indicates whether this instance and a specified object are equal.

Equals(Vector3d)

Indicates whether the current vector is equal to another vector.

GetHashCode()

Returns the hashcode for this instance.

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

Multiply this instance by a scalar.

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

Scales the Vector3d to unit length.

Normalize(Vector3d, Vector3d)

Scale a vector to unit length

Normalize(Vector3d)
NormalizeFast()

Scales the Vector3d to approximately unit length.

NormalizeFast(Vector3d, Vector3d)

Scale a vector to approximately unit length

NormalizeFast(Vector3d)
Scale(Double, Double, Double)
Obsolete.

Scales the current Vector3d by the given amounts.

Scale(Vector3d)
Obsolete.

Scales this instance by the given parameter.

Scale(Vector3d)
Obsolete.

Scales this instance by the given parameter.

Sub(Vector3d, Vector3d, Vector3d)
Obsolete.

Subtract one Vector from another

Sub(Vector3d, Vector3d)
Sub(Vector3d)
Obsolete.

Subtract the Vector passed as parameter from this instance.

Sub(Vector3d)
Obsolete.

Subtract the Vector passed as parameter from this instance.

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

Returns a System.String that represents the current Vector3.

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

Transform a Vector by the given Matrix

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

Transform a Normal by the given Matrix

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

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

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

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

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

Transform a Position by the given Matrix

TransformPosition(Vector3d, Matrix4d)
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.

TransformVector(Vector3d, Matrix4d)

Operators

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

Applies to