• Advertisement
Sign in to follow this  

Need help with XMVector3TransformCoordStream

This topic is 1438 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I'm working on a bounding volume generation project, and I found a DirectXMath method, XMVector3TransformCoordStream, (http://msdn.microsoft.com/en-us/library/windows/desktop/hh404778(v=vs.85).aspx) that would be perfect for a need I have. Only it is just writing all (1, 1, 1) points to my output.  I'm not sure why this is happening, I've verified that the memory at the input and output pointers is correct beforehand, that the strides are the right size, and the transform is correct.

 

 

ArrayList<XMFLOAT3> points;

int count = mGeometries[*model]->mVertices.size();

points.clearAndReserve(count);

 

XMVector3TransformCoordStream(

    points.mData,

    sizeof(XMFLOAT3),

    &(mGeometries[*model]->mVertices.get_item(0)->mPos),

    sizeof(Vertex),

    count,

    (*model)->GetTransform());

 

points.mCount = count;

 

 

Any idea what I'm missing?  Thanks!

 

 

Share this post


Link to post
Share on other sites
Advertisement

It turns out XMVector3TransformCoordStream is an inline method so I was able to debug it, and I found out that my transform matrix was not getting returned correctly after all.

=)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement