   Dynamic Plane Shifting and rotated objects
  hi,i have a solid-bsp and use the dynamic plane shifting algorithm. it works ok, but now i want to check rotated objects.my objects have their collision volume as a property and according to this i have different shifting functions.now, for the rotations, i thought about just rotating the normal, of the plane that i shift, by the objects rotation matrix. but this doesnt work.this is my box shifting code for example:does anybody has an idea what i can do to also apply the objects rotation in the shifting code?struct box_t{float right, up, dir;};void CObjectHandler::ShiftPlaneBox(CPlane *plane, const bool &front, void *vol){static box_t *box;box = (box_t*)vol;if(front){plane->d -= DotProduct(ABS(plane->normal.x),ABS(plane->normal.y),ABS(plane->normal.z),box->right,box->up,box->dir);}else{plane->d += DotProduct(ABS(plane->normal.x),ABS(plane->normal.y),ABS(plane->normal.z),box->right,box->up,box->dir);}} 
  for the dynamic plane shifting stuff, as far as I remember, you only need a support function, that calculate the support vertex along the plane normal. Why don''t you just tweak the support funtion to make use of the orietnation? That should be relatively easy.  ;  ok, but what is the support vertex and a support function? ;  -Just because you rotated the plane normal, doesn''t mean that the plane has the same distance from the origin.  This means that you still need to calculate that by taking the dotproduct between the normal and a vertex on the plane normal, which means you''d have to also transform at least one vertex along with rotating the normalI''m not going to even try implementing rotating objects in a bsp...what I would do is take the single greatest absolute dimension for the box, use that as the radius of a sphere, find which leafs the sphere lies in, and then to a brute force overlap check for the objects that reside in the leafs you found the rotating object to lie in  ;  -Just because you rotated the plane normal, doesn''t mean that the plane has the same distance from the origin.  This means that you still need to calculate that by taking the dotproduct between the normal and a vertex on the plane normal, which means you''d have to also transform at least one vertex along with rotating the normalI''m not going to even try implementing rotating objects in a bsp...what I would do is take the single greatest absolute dimension for the box, use that as the radius of a sphere, find which leafs the sphere lies in, and then to a brute force overlap check for the objects that reside in the leafs you found the rotating object to lie in ;quote:Original post by IStrikerI  ok, but what is the support vertex and a support function?   I though that was the bread and butter of the Dynamic plane shifting algo, so you really should understand that ok, one of the use for a support mapping function would be to find the interval of a convex object along an axis. That''s what''s used when using the separation axis algorithm.  void OBox::CalculateInterval(const Vector& N, float& min, float& max) const{    float r = fabs(N.Dot(m_Dir[0])) * m_HalfSize.x +fabs(N.Dot(m_Dir[1])) * m_HalfSize.y +fabs(N.Dot(m_Dir[2])) * m_HalfSize.z;    float c = m_Centre.Dit(N);    min = c - r;    max = c + r;}A support point is the point that is at the bounds of the interval, or the ''minimum'' (or ''maximum'', if you want it the other way round) point on the convex shape. For example, a support mapping function for a oriented box would be something like. Vector COBox::FindSupport(const Vector& N, bool bGetMin){Vector Dx = m_HalfSize.x * sign(N.Dot(m_Dir[0])) * m_Dir[0];Vector Dy = m_HalfSize.y * sign(N.Dot(m_Dir[1])) * m_Dir[1];Vector Dz = m_HalfSize.z * sign(N.Dot(m_Dir[2])) * m_Dir[1];if (bGetMin)    return m_xCentre - Dx - Dy - Dz;else    return m_xCentre + Dx + Dy + Dz;}for a triangle, it would be Vector CTriangle::FindSupport(const Vector& N, bool bGetMin){    if (bGetMin)    {    Vector Vmin = V[0];    float dmin = V[0].Dot(N);    float d    = V[1].Dot(N);    if (d < dmin)    {   Vmin = V[1];   dmin = d;    }    d = V[2].Dot(N);    if (d < dmin)    {   Vmin = V[2];    }    return Vmin;    }    else    {    Vector Vmax = V[0];    float dmax = V[0].Dot(N);    float d    = V[1].Dot(N);    if (d > dmax)    {   Vmax = V[1];   dmax = d;    }    d = V[2].Dot(N);    if (d > dmax)    {   Vmax = V[2];    }    return Vmax;    }}you can have similar functions for cylinders, Axis aligned boxes, spheres, convex hulls, convex polyhedras, ect....ect....so you see, this function is entirely independent from orietnations, since the orietnation is already used in the calculations for support mapping. ;  hello ,on the same subject I would like to note that you can not use the ray intersection(with plane shifting) ,used in quake, for rotating objects, simply because the support function is not constant throughout the volume sweeping(because the object rotates). I was wondering if anyone has thought of a simple way getting around this. My guess is that you will need to solve a trigonometric equation of the form f(t) = sint + t = 0 which needs an iterative solution anyway. Stan melax in his technical demo supports rotating objects but he hasnt publshed any details on how he is doing that.I would be very interested to hear what your thoughts on this is  since an accurate volume sweeping with rotation collision detection scheme could be used to make very robust and fast rigid body simulationsthanks, ;  if you look at stephane redon''s paper on continuous collision detection, he explains that (some screwing motion equation of some sort ).  ;  btw, have you tried the binary time search? that should be dead simple with planes. 