   What does this part of an OBB mean?
// Region R = { x | x = c+r*u[0]+s*u[1]+t*u[2] }, |r|<=e[0], |s|<=e[1], |t|<=e[2]struct OBB {Point c; // OBB center pointVector u[3]; // Local x-, y-, and z-axesVector e; // Positive halfwidth extents of OBB along each axis};I am not sure what the is meant by "Local x-, y-, and z-axes", I am probably being stupid but please help.For the center of an OBB would I be right in calculating that as:center = (min + max) * 0.5f;...or alternatively providing a central point and then using that to create the min and max.  // BoundingBox min,max are at diagonals and can be worked out from the centre as follows:  Vector3 diagonalVector = new Vector3(sizeOfOBB / 2.0f, sizeOfOBB / 2.0f, size / 2.0f);  min = center - diagonalVector;   max = center + diagonalVector;For the extents, is this also correct?  extents = (max - min) * 0.5f;Thanks in advance programming experts.   
  The three axes represent the orientation of the box. They are equivalent, more or less, to a 3x3 rotation matrix.As for the min and max, I'm not sure what you're doing there. What are sizeOfOBB and size?   ;  It should read:Vector3 diagonalVector = new Vector3(sizeOfOBB / 2.0f, sizeOfOBB / 2.0f, sizeOfOBB / 2.0f);sizeOfOBB is the width/height of the cube/box.I should just change it to width and height, that way it wont always be a cube.So...Vector u[3]; // Local x-, y-, and z-axesWould = Scale, Rotate, Transformation matrix?   ;Quote:Original post by Spa8nkyVector u[3]; // Local x-, y-, and z-axesWould = Scale, Rotate, Transformation matrix?Generally u represents the rotation matrix here. Since the scaling values would be stored in the same fields it could also include scaling information, but generally you don't need that for an OBB. Whether this is the world rotation (I guess Would is a misspelling [smile]) depends on how it is defined (on world space, a parent's local space etc.).;  This representation doesn't seem quite optimal.I suppose three angles or a quaternion would be enough, you don't need three vectors.   ;  Go it.  So really I only need the rotation Matrix as the Position is already known from the center point.This will work in a World space without a using 3x3 World Matrix then.   ;  Three vectors are better for collision detection than a quaternion or angles. Angles probably not recommended anyway.   ;Quote:This representation doesn't seem quite optimal.I suppose three angles or a quaternion would be enough, you don't need three vectors.Like oliii said, having the basis vectors available is convenient for the purpose of collision detection (the most commonly used algorithms for detecting intersections between oriented boxes access the basis vectors frequently). If you store the box orientation using a quaternion, you will most likely just end up converting it to matrix form anyway, either once per update or every time you need to perform an intersection test.This conversion may need to occur anyway if the OBB is associated with an object whose orientation is represented by a quaternion, but for the orientation of the OBB itself, a set of three basis vectors is really a pretty optimal representation.   