I have a function:
bool IntersectBoxBox(IShape3D* a, IShape3D* b)
{
Box* boxA = (Box*)a;
Box* boxB = (Box)b;
return(boxA->Intersects(boxB));
}
and it's called when the 2 IShape3D's are determined to be a box
and a box
type (there is a IShape3D->GetType()
method).
Anyways,the problem is that Intersects takes a Box& box
,so I can't pass it a pointer. Is there an cheap way to convert the arguments?