Table of Contents

Struct Quaternion

Namespace
Cobilas.GodotEngine.Utility.Numerics
Assembly
com.cobilas.godot.utility.dll
[Serializable]
public struct Quaternion : IEquatable<Quaternion>, IFormattable
Implements
Inherited Members

Constructors

Quaternion(Quaternion)

public Quaternion(Quaternion vector)

Parameters

vector Quaternion

Quaternion(Vector4D)

public Quaternion(Vector4D vector)

Parameters

vector Vector4D

Quaternion(float, float)

public Quaternion(float x, float y)

Parameters

x float
y float

Quaternion(float, float, float)

public Quaternion(float x, float y, float z)

Parameters

x float
y float
z float

Quaternion(float, float, float, float)

public Quaternion(float x, float y, float z, float w)

Parameters

x float
y float
z float
w float

Fields

Deg2Rad

public const double Deg2Rad = 0.017453292519943295

Field Value

double

KEpsilon

public const float KEpsilon = 1E-06

Field Value

float

Rad2Deg

public const double Rad2Deg = 57.29577951308232

Field Value

double

w

public float w

Field Value

float

x

public float x

Field Value

float

y

public float y

Field Value

float

z

public float z

Field Value

float

Properties

Euler

public readonly Vector3D Euler { get; }

Property Value

Vector3D

Identity

public static Quaternion Identity { get; }

Property Value

Quaternion

Normalized

public readonly Quaternion Normalized { get; }

Property Value

Quaternion

Methods

Angle(Quaternion, Quaternion)

public static float Angle(Quaternion a, Quaternion b)

Parameters

a Quaternion
b Quaternion

Returns

float

Dot(Quaternion, Quaternion)

public static float Dot(Quaternion a, Quaternion b)

Parameters

a Quaternion
b Quaternion

Returns

float

Equals(Quaternion)

Indicates whether the current object is equal to another object of the same type.

public readonly bool Equals(Quaternion other)

Parameters

other Quaternion

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Indicates whether this instance and a specified object are equal.

public override readonly bool Equals(object obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override readonly int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

Normalize(Quaternion)

public static Quaternion Normalize(Quaternion q)

Parameters

q Quaternion

Returns

Quaternion

ToEuler(Quaternion)

public static Vector3D ToEuler(Quaternion quaternion)

Parameters

quaternion Quaternion

Returns

Vector3D

ToQuaternion(Vector3D)

public static Quaternion ToQuaternion(Vector3D vector)

Parameters

vector Vector3D

Returns

Quaternion

ToString()

Returns the fully qualified type name of this instance.

public override readonly string ToString()

Returns

string

The fully qualified type name.

ToString(string)

public readonly string ToString(string format)

Parameters

format string

Returns

string

ToString(string, IFormatProvider)

Formats the value of the current instance using the specified format.

public readonly string ToString(string format, IFormatProvider formatProvider)

Parameters

format string

The format to use.-or- A null reference (Nothing in Visual Basic) to use the default format defined for the type of the IFormattable implementation.

formatProvider IFormatProvider

The provider to use to format the value.-or- A null reference (Nothing in Visual Basic) to obtain the numeric format information from the current locale setting of the operating system.

Returns

string

The value of the current instance in the specified format.

Operators

operator ==(Quaternion, Quaternion)

public static bool operator ==(Quaternion lhs, Quaternion rhs)

Parameters

lhs Quaternion
rhs Quaternion

Returns

bool

operator !=(Quaternion, Quaternion)

public static bool operator !=(Quaternion lhs, Quaternion rhs)

Parameters

lhs Quaternion
rhs Quaternion

Returns

bool

operator *(Quaternion, Quaternion)

public static Quaternion operator *(Quaternion lhs, Quaternion rhs)

Parameters

lhs Quaternion
rhs Quaternion

Returns

Quaternion

operator *(Quaternion, Vector3D)

public static Vector3D operator *(Quaternion rotation, Vector3D point)

Parameters

rotation Quaternion
point Vector3D

Returns

Vector3D