XMU565::XMU565(constfloat*) function (directxpackedvector.h)

Initializes a new instance of XMU565 from a three element float array.

This constructor initializes a new instance of XMU565 from a three element float array.

Note  This is only available for C++ based development.

Syntax

void XMU565(
  const float *pArray
) noexcept;

Parameters

pArray

Three element floating point array containing the values used to initialize the x-, y- and z-components of a new instance of XMU565.

Return value

None

Remarks

Array elements and the _w argument are mapped to the vector components of a new instance of XMU565 as follows:

XMU565 Member Argument Range
x pArray[0] 0.0, 31.0
y pArray[1] 0.0, 63.0
z pArray[2] 0.0, 31.0

Arguments to the constructors will be clamped to the permitted range prior to assignment to the appropriate member of XMU565.

The following pseudocode demonstrates the operation of this constructor, which takes union of the three components of the XMU565vector with an instance of uint16_t in the definition of the structure:

XMU565 instance;
_x1=min( max( pArray[0], 0.0 ), 31.0);
_y1=min( max( pArray[1], 0.0 ), 63.0 );
_z1=min( max( pArray[2], 0.0 ), 31.0 );

instance.v= ((z & 0x1F) << 11) |
            ((y & 0x3F) << 5) |
            ((x & 0x1F));

Requirements

Requirement Value
Target Platform Windows
Header directxpackedvector.h

See also

XMU565

XMU565 Constructors