Table of Contents

Struct Half4

Namespace
HelixToolkit.Maths
Assembly
HelixToolkit.Maths.dll

Defines a four component vector, using half precision floating point coordinates.

public struct Half4 : IEquatable<Half4>
Implements
Inherited Members
Extension Methods

Constructors

Half4(Half)

Initializes a new instance of the SharpDX.Half4 structure.

public Half4(Half value)

Parameters

value Half

The value to set for the X, Y, Z, and W components.

Half4(Half, Half, Half, Half)

Initializes a new instance of the SharpDX.Half4 structure.

public Half4(Half x, Half y, Half z, Half w)

Parameters

x Half

The X component.

y Half

The Y component.

z Half

The Z component.

w Half

The W component.

Half4(float, float, float, float)

Initializes a new instance of the SharpDX.Half4 structure.

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

Parameters

x float

The X component.

y float

The Y component.

z float

The Z component.

w float

The W component.

Half4(ushort, ushort, ushort, ushort)

Initializes a new instance of the SharpDX.Half4 structure.

public Half4(ushort x, ushort y, ushort z, ushort w)

Parameters

x ushort

The X component.

y ushort

The Y component.

z ushort

The Z component.

w ushort

The W component.

Fields

W

Gets or sets the W component of the vector.

public Half W

Field Value

Half

The W component of the vector.

X

Gets or sets the X component of the vector.

public Half X

Field Value

Half

The X component of the vector.

Y

Gets or sets the Y component of the vector.

public Half Y

Field Value

Half

The Y component of the vector.

Z

Gets or sets the Z component of the vector.

public Half Z

Field Value

Half

The Z component of the vector.

Methods

Equals(Half4)

Returns a value that indicates whether the current instance is equal to the specified object.

public readonly bool Equals(Half4 other)

Parameters

other Half4

Object to make the comparison with.

Returns

bool

true if the current instance is equal to the specified object; false otherwise.

Equals(ref Half4, ref Half4)

Determines whether the specified object instances are considered equal.

public static bool Equals(ref Half4 value1, ref Half4 value2)

Parameters

value1 Half4
value2 Half4

Returns

bool

true if value1 is the same instance as value2 or if both are null references or if value1.Equals(value2) returns true; otherwise, false.

Equals(object?)

Returns a value that indicates whether the current instance is equal to a specified object.

public override readonly bool Equals(object? obj)

Parameters

obj object

Object to make the comparison with.

Returns

bool

true if the current instance is equal to the specified object; false otherwise.

GetHashCode()

Returns the hash code for this instance.

public override readonly int GetHashCode()

Returns

int

A 32-bit signed integer hash code.

Operators

operator ==(Half4, Half4)

Tests for equality between two objects.

public static bool operator ==(Half4 left, Half4 right)

Parameters

left Half4

The first value to compare.

right Half4

The second value to compare.

Returns

bool

true if left has the same value as right; otherwise, false.

explicit operator Vector2(Half4)

Performs an explicit conversion from Half4 to Vector2.

public static explicit operator Vector2(Half4 value)

Parameters

value Half4

The value.

Returns

Vector2

The result of the conversion.

explicit operator Vector3(Half4)

Performs an explicit conversion from Half4 to Vector3.

public static explicit operator Vector3(Half4 value)

Parameters

value Half4

The value.

Returns

Vector3

The result of the conversion.

explicit operator Half4(Vector2)

Performs an explicit conversion from Vector2 to Half4.

public static explicit operator Half4(Vector2 value)

Parameters

value Vector2

The value.

Returns

Half4

The result of the conversion.

explicit operator Half4(Vector3)

Performs an explicit conversion from Vector3 to Half4.

public static explicit operator Half4(Vector3 value)

Parameters

value Vector3

The value.

Returns

Half4

The result of the conversion.

implicit operator Vector4(Half4)

Performs an implicit conversion from Half4 to Vector4.

public static implicit operator Vector4(Half4 value)

Parameters

value Half4

The value.

Returns

Vector4

The result of the conversion.

implicit operator Half4(Vector4)

Performs an implicit conversion from Vector4 to Half4.

public static implicit operator Half4(Vector4 value)

Parameters

value Vector4

The value.

Returns

Half4

The result of the conversion.

operator !=(Half4, Half4)

Tests for inequality between two objects.

public static bool operator !=(Half4 left, Half4 right)

Parameters

left Half4

The first value to compare.

right Half4

The second value to compare.

Returns

bool

true if left has a different value than right; otherwise, false.