Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
This topic has not yet been rated - Rate this topic

XMVectorSetByIndexPtr method

Use a pointer to a floating-point instance to set the value of one of the four components of an XMVECTOR Data Type containing floating-point data referenced by an index.

Syntax


XMVECTOR XMVectorSetByIndexPtr(
  XMVECTOR V,
  [in]  const float *f,
  size_t i
);

Parameters

V

A XMVECTOR Data Type containing floating-point data.

f [in]

A pointer to an floating-point instance used to set the i component of the returned XMVECTOR Data Type.

i

The index of the component to be set.

Return value

An instance of XMVECTOR Data Type whose i component has been set to the floating-point value provided by the argument f. All other components of the returned XMVECTOR Data Type instance have the same value as those of the input vector V.

Remarks

The value of i must be positive and less than or equal to three ( 0 <= i <= 3 ).

The indexes have the following correspondence with XMVECTOR Data Type vector components:

IndexComponent

0

x

1

y

2

z

3

w

 

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

Namespace

Use DirectX.

Header

DirectXMath.h

See also

XMVectorGetByIndexPtr
XMVectorSetByIndex

 

 

Send comments about this topic to Microsoft

Build date: 11/14/2012

Community Additions

© 2013 Microsoft. All rights reserved.