Ok I guess you need to consider this guys... In debug mode everything works just fine but in release mode there's a problem about "isFullInside" function.
This is my function :
Code: Select all
bool CLevel::IsSuccess(CBall* ball)
{
scene::IMeshBuffer* m = m_mesh->getMeshBuffer(m_finishMeshNumber);
core::aabbox3df box = m->getBoundingBox();
m_node->getAbsoluteTransformation().transformBoxEx(box);
if (ball->GetNode()->getTransformedBoundingBox().isFullInside(box))
{
#define _DEBUG
#ifdef _DEBUG
char m[250];
core::aabbox3df ballBox = ball->GetNode()->getTransformedBoundingBox();
sprintf(m, "BOX min[%.2f, %.2f, %.2f] max[%.2f, %.2f, %.2f] BALL min[%.2f, %.2f, %.2f] max[%.2f, %.2f, %.2f] \n",
box.MinEdge.X, box.MinEdge.Y, box.MinEdge.Z, box.MaxEdge.X, box.MaxEdge.Y, box.MaxEdge.Z,
ballBox.MinEdge.X, ballBox.MinEdge.Y, ballBox.MinEdge.Z, ballBox.MaxEdge.X, ballBox.MaxEdge.Y, ballBox.MaxEdge.Z);
OutputDebugStringA(m);
#endif
return true;
}
return false;
}
And this is what I see in debug output window:
BOX min[-0.44, -2.21, 10.76] max[3.41, 1.72, 14.45] BALL min[1.30, 2.50, -12.50] max[2.30, 3.50, -11.50]
BOX min[-0.44, -2.21, 10.76] max[3.41, 1.72, 14.45] BALL min[1.30, 2.43, -12.50] max[2.30, 3.43, -11.50]
BOX min[-0.44, -2.21, 10.76] max[3.41, 1.72, 14.45] BALL min[1.30, 2.39, -12.50] max[2.30, 3.39, -11.50]
BOX min[-0.44, -2.21, 10.76] max[3.41, 1.72, 14.45] BALL min[1.30, 2.31, -12.50] max[2.30, 3.31, -11.50]
BOX min[-0.44, -2.21, 10.76] max[3.41, 1.72, 14.45] BALL min[1.30, 2.24, -12.50] max[2.30, 3.24, -11.50]
BOX min[-0.44, -2.21, 10.76] max[3.41, 1.72, 14.45] BALL min[1.30, 2.16, -12.50] max[2.30, 3.19, -11.48]
As you can see the ball's box is not inside the bigger box (notice Z vector's sign) What do you think about this guys?