last ...
This commit is contained in:
@@ -1265,6 +1265,65 @@ bool IsBoxUsed(
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find an Inside Box of source in a Collection ...
|
||||
*
|
||||
* @param index: int, Founded Index ...
|
||||
* @param source: XBoxZone instance ...
|
||||
* @param dest: XBoxZone instance Collection ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool HasInsideBox(
|
||||
int &index,
|
||||
XBoxZone &source,
|
||||
XBoxZone &dest[] //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
index = -1;
|
||||
|
||||
//
|
||||
result = source.IsValid() &&
|
||||
HasChild(dest);
|
||||
|
||||
//
|
||||
int count = ArraySize(dest);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox = dest[i];
|
||||
|
||||
//
|
||||
bool isInside = !iBox.IsSameAs(source) &&
|
||||
IsBoxInside(
|
||||
iBox,
|
||||
source //
|
||||
);
|
||||
if (isInside)
|
||||
{
|
||||
//
|
||||
index = i;
|
||||
iBox.Clean();
|
||||
|
||||
//
|
||||
break;
|
||||
}
|
||||
|
||||
//
|
||||
iBox.Clean();
|
||||
}
|
||||
|
||||
//
|
||||
result = IsValidIndex(index);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts to XBoxZone ...
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user