Struct Half3
- Namespace
- HelixToolkit.Maths
- Assembly
- HelixToolkit.Maths.dll
Defines a three component vector, using half precision floating point coordinates.
public struct Half3 : IEquatable<Half3>
- Implements
- Inherited Members
- Extension Methods
Constructors
Half3(Half)
Initializes a new instance of the SharpDX.Half3 structure.
public Half3(Half value)
Parameters
valueHalfThe value to set for the X, Y, and Z components.
Half3(Half, Half, Half)
Initializes a new instance of the SharpDX.Half3 structure.
public Half3(Half x, Half y, Half z)
Parameters
Half3(float, float, float)
Initializes a new instance of the SharpDX.Half3 structure.
public Half3(float x, float y, float z)
Parameters
Half3(ushort, ushort, ushort)
Initializes a new instance of the SharpDX.Half3 structure.
public Half3(ushort x, ushort y, ushort z)
Parameters
Fields
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(Half3)
Returns a value that indicates whether the current instance is equal to the specified object.
public readonly bool Equals(Half3 other)
Parameters
otherHalf3Object to make the comparison with.
Returns
- bool
trueif the current instance is equal to the specified object;falseotherwise.
Equals(ref Half3, ref Half3)
Determines whether the specified object instances are considered equal.
public static bool Equals(ref Half3 value1, ref Half3 value2)
Parameters
Returns
- bool
trueifvalue1is the same instance asvalue2or if both arenullreferences or ifvalue1.Equals(value2)returnstrue; 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
objobjectObject to make the comparison with.
Returns
- bool
trueif the current instance is equal to the specified object;falseotherwise.
GetHashCode()
Returns the hash code for this instance.
public override readonly int GetHashCode()
Returns
- int
A 32-bit signed integer hash code.
Operators
operator ==(Half3, Half3)
Tests for equality between two objects.
public static bool operator ==(Half3 left, Half3 right)
Parameters
Returns
- bool
trueiflefthas the same value asright; otherwise,false.
explicit operator Vector2(Half3)
public static explicit operator Vector2(Half3 value)
Parameters
valueHalf3The value.
Returns
- Vector2
The result of the conversion.
explicit operator Half3(Vector2)
public static explicit operator Half3(Vector2 value)
Parameters
valueVector2The value.
Returns
- Half3
The result of the conversion.
implicit operator Vector3(Half3)
public static implicit operator Vector3(Half3 value)
Parameters
valueHalf3The value.
Returns
- Vector3
The result of the conversion.
implicit operator Half3(Vector3)
public static implicit operator Half3(Vector3 value)
Parameters
valueVector3The value.
Returns
- Half3
The result of the conversion.
operator !=(Half3, Half3)
Tests for inequality between two objects.
public static bool operator !=(Half3 left, Half3 right)
Parameters
Returns
- bool
trueiflefthas a different value thanright; otherwise,false.