Edit

Share via


Vector4d Struct

Definition

Represents a 4D vector using four double-precision floating-point numbers.

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

Constructors

Vector4d(Double, Double, Double, Double)

Constructs a new Vector4d.

Vector4d(Double)
Vector4d(Vector2d)

Constructs a new Vector4d from the given Vector2d.

Vector4d(Vector3, Double)
Vector4d(Vector3d, Double)
Vector4d(Vector3d)

Constructs a new Vector4d from the given Vector3d.

Vector4d(Vector4d)

Constructs a new Vector4d from the given Vector4d.

Fields

One

Defines an instance with all components set to 1.

SizeInBytes

Defines the size of the Vector4d struct in bytes.

UnitW

Defines a unit-length Vector4d that points towards the W-axis.

UnitX

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

UnitY

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

UnitZ

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

W

The Z component of the Vector4d.

X

The X component of the Vector4d.

Y

The Y component of the Vector4d.

Z

The Z component of the Vector4d.

Zero

Defines a zero-length Vector4d.

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.

Xyz

Gets or sets an OpenTK.Vector3d with the X, Y and Z components of this instance.

Methods

Add(Vector4d, Vector4d, Vector4d)

Add two Vectors

Add(Vector4d, Vector4d)
Add(Vector4d)
Obsolete.

Add the Vector passed as parameter to this instance.

Add(Vector4d)
Obsolete.

Add the Vector passed as parameter to this instance.

BaryCentric(Vector4d, Vector4d, Vector4d, Double, Double, Vector4d)
BaryCentric(Vector4d, Vector4d, Vector4d, Double, Double)
Clamp(Vector4d, Vector4d, Vector4d, Vector4d)

Clamp a vector to the given minimum and maximum vectors

Clamp(Vector4d, Vector4d, Vector4d)
Div(Double)
Obsolete.

Divide this instance by a scalar.

Div(Vector4d, Double, Vector4d)
Div(Vector4d, Double)
Divide(Vector4d, Double, Vector4d)
Divide(Vector4d, Double)
Divide(Vector4d, Vector4d, Vector4d)
Divide(Vector4d, Vector4d)
Dot(Vector4d, Vector4d, Double)
Dot(Vector4d, Vector4d)

Calculate the dot product of two vectors

Equals(Object)

Indicates whether this instance and a specified object are equal.

Equals(Vector4d)

Indicates whether the current vector is equal to another vector.

GetHashCode()

Returns the hashcode for this instance.

Lerp(Vector4d, Vector4d, Double, Vector4d)
Lerp(Vector4d, Vector4d, Double)
Max(Vector4d, Vector4d, Vector4d)

Calculate the component-wise maximum of two vectors

Max(Vector4d, Vector4d)
Min(Vector4d, Vector4d, Vector4d)

Calculate the component-wise minimum of two vectors

Min(Vector4d, Vector4d)
Mult(Double)
Obsolete.

Multiply this instance by a scalar.

Mult(Vector4d, Double, Vector4d)
Mult(Vector4d, Double)
Multiply(Vector4d, Double, Vector4d)
Multiply(Vector4d, Double)
Multiply(Vector4d, Vector4d, Vector4d)
Multiply(Vector4d, Vector4d)
Normalize()

Scales the Vector4d to unit length.

Normalize(Vector4d, Vector4d)

Scale a vector to unit length

Normalize(Vector4d)
NormalizeFast()

Scales the Vector4d to approximately unit length.

NormalizeFast(Vector4d, Vector4d)

Scale a vector to approximately unit length

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

Scales the current Vector4d by the given amounts.

Scale(Vector4d)
Obsolete.

Scales this instance by the given parameter.

Scale(Vector4d)
Obsolete.

Scales this instance by the given parameter.

Sub(Vector4d, Vector4d, Vector4d)
Obsolete.

Subtract one Vector from another

Sub(Vector4d, Vector4d)
Sub(Vector4d)
Obsolete.

Subtract the Vector passed as parameter from this instance.

Sub(Vector4d)
Obsolete.

Subtract the Vector passed as parameter from this instance.

Subtract(Vector4d, Vector4d, Vector4d)
Subtract(Vector4d, Vector4d)
ToString()

Returns a System.String that represents the current Vector4d.

Transform(Vector4d, Matrix4d, Vector4d)

Transform a Vector by the given Matrix

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

Operators

Applies to