Jump to content
  • Advertisement

System memory copy of vertices/mesh

This topic is 805 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

I needed a system memory copy of the vertices for AABB Collision so I can update there min/max because I only have static vertices access. How can I do this. Im in directx 11. c++. As my object translates, I need to calculale the new AABB min/max and I cant get to the vertices.


void IvAABB::Set( const IvPoint3* points, unsigned int numPoints)
 ASSERT( points);
 // compute minimal and maximal bounds
 for (unsigned int i = 1; i < numPoints; ++i) 
if (points.x < mMinima.x) 
mMinima.x = points.x; 
else if (points.x > mMaxima.x)
 mMaxima.x = points.x;
 if (points.y < mMinima.y)
 mMinima.y = points.y; else if (points.y > mMaxima.y)
 mMaxima.y = points.y; 
if (points.z < mMinima.z)
 mMinima.z = points.z; 
else if (points.z > mMaxima.z)
 mMaxima.z = points.z; }


Edited by terrysworkstations

Share this post

Link to post
Share on other sites

Just keep a copy of whatever you need. Your app had the vertices at some point before copying them to the GPU, there's no reason you can't keep them around if you must. This also doesn't have anything to do with the graphics API's you are using

Share this post

Link to post
Share on other sites

haha, i had automatically assumed he meant transformed. That's good you pointed that out

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!