Struct XMFloat3
A 3D vector consisting of three single-precision floating-point values.
Implements
Inherited Members
Namespace: JeremyAnsel.DirectX.DXMath
Assembly: JeremyAnsel.DirectX.DXMath.dll
Syntax
public struct XMFloat3 : IEquatable<XMFloat3>
Constructors
| Edit this page View SourceXMFloat3(float, float, float)
Initializes a new instance of the XMFloat3 struct.
Declaration
public XMFloat3(float x, float y, float z)
Parameters
Type | Name | Description |
---|---|---|
float | x | The x-coordinate of the vector. |
float | y | The y-coordinate of the vector. |
float | z | The z-coordinate of the vector. |
XMFloat3(float[])
Initializes a new instance of the XMFloat3 struct.
Declaration
public XMFloat3(float[] array)
Parameters
Type | Name | Description |
---|---|---|
float[] | array | The components of the vector. |
Properties
| Edit this page View SourceX
Gets or sets the x-coordinate of the vector.
Declaration
public float X { get; set; }
Property Value
Type | Description |
---|---|
float |
Y
Gets or sets the y-coordinate of the vector.
Declaration
public float Y { get; set; }
Property Value
Type | Description |
---|---|
float |
Z
Gets or sets the z-coordinate of the vector.
Declaration
public float Z { get; set; }
Property Value
Type | Description |
---|---|
float |
Methods
| Edit this page View SourceEquals(XMFloat3)
Determines whether the specified object is equal to the current object.
Declaration
public bool Equals(XMFloat3 other)
Parameters
Type | Name | Description |
---|---|---|
XMFloat3 | other | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool |
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceFromVector(XMVector)
Declaration
public static XMFloat3 FromVector(XMVector value)
Parameters
Type | Name | Description |
---|---|---|
XMVector | value | A XMVector. |
Returns
Type | Description |
---|---|
XMFloat3 | A XMFloat3. |
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A 32-bit signed integer that is the hash code for this instance. |
Overrides
| Edit this page View SourceToVector()
Declaration
public XMVector ToVector()
Returns
Type | Description |
---|---|
XMVector | A XMVector. |
Operators
| Edit this page View Sourceoperator ==(XMFloat3, XMFloat3)
Compares two XMFloat3 objects. The result specifies whether the values of the two objects are equal.
Declaration
public static bool operator ==(XMFloat3 left, XMFloat3 right)
Parameters
Type | Name | Description |
---|---|---|
XMFloat3 | left | The left XMFloat3 to compare. |
XMFloat3 | right | The right XMFloat3 to compare. |
Returns
Type | Description |
---|---|
bool |
implicit operator XMVector(XMFloat3)
Declaration
public static implicit operator XMVector(XMFloat3 value)
Parameters
Type | Name | Description |
---|---|---|
XMFloat3 | value | A XMFloat3. |
Returns
Type | Description |
---|---|
XMVector | A XMVector. |
implicit operator XMFloat3(XMVector)
Declaration
public static implicit operator XMFloat3(XMVector value)
Parameters
Type | Name | Description |
---|---|---|
XMVector | value | A XMVector. |
Returns
Type | Description |
---|---|
XMFloat3 | A XMFloat3. |
operator !=(XMFloat3, XMFloat3)
Compares two XMFloat3 objects. The result specifies whether the values of the two objects are unequal.
Declaration
public static bool operator !=(XMFloat3 left, XMFloat3 right)
Parameters
Type | Name | Description |
---|---|---|
XMFloat3 | left | The left XMFloat3 to compare. |
XMFloat3 | right | The right XMFloat3 to compare. |
Returns
Type | Description |
---|---|
bool |