XMVectorSetBinaryConstant function (directxmath.h)

Creates a vector, each of whose components is either 0.0f or 1.0f.

Syntax

XMVECTOR XM_CALLCONV XMVectorSetBinaryConstant(
  [in] uint32_t C0,
  [in] uint32_t C1,
  [in] uint32_t C2,
  [in] uint32_t C3
) noexcept;

Parameters

[in] C0

This parameter must be a number (an immediate value, either 0 or 1) and not a variable. If C0 is 0, the x-component of the returned vector will be 0.0f. Otherwise, the x-component will be 1.0f.

[in] C1

This parameter must be a number (an immediate value, either 0 or 1) and not a variable. If C1 is 0, the y-component of the returned vector will be 0.0f. Otherwise, the y-component will be 1.0f.

[in] C2

This parameter must be a number (an immediate value, either 0 or 1) and not a variable. If C2 is 0, the z-component of the returned vector will be 0.0f. Otherwise, the z-component will be 1.0f.

[in] C3

This parameter must be a number (an immediate value, either 0 or 1) and not a variable. If C3 is 0, the w-component of the returned vector will be 0.0f. Otherwise, the w-component will be 1.0f.

Return value

Returns an XMVECTOR, each of whose components is either 0.0f or 1.0f.

Remarks

Platform Requirements

Microsoft Visual Studio 2010 or Microsoft Visual Studio 2012 with the Windows SDK for Windows 8. Supported for Win32 desktop apps, Windows Store apps, and Windows Phone 8 apps.

Requirements

Requirement Value
Target Platform Windows
Header directxmath.h

See also

Vector Initialization Functions

XMVectorSetInt

XMVectorSplatConstant

XMVectorSplatConstantInt