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
mMinima.Set(points[0]);
mMaxima.Set(points[0]);
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; }
}