evelight/quad_tree.cpp
int QTNode::GetChildIndex(QTEntity* entity) const
{
    assert(!IsLeaf());

    for (uint i = 0; i < QTNODE_NUM_CHILDREN; i++)
        if (entity->GetAABB().FitsIn(mChildren[i]->mLimits))
            return i;

    return -1;
}
/**
 * Checks if this object(limits) fits in any of this node children.
 * @param obj - The object
 * @return child index on success, or -1 if it cannot fit
 */
Checks if this object(limits) fits in any of this node children.
@param obj - The object
@return child index on success, or -1 if it cannot fit
Checks if this object ( limits ) fits in any of this node children . @param obj - The object @return child index on success or - 1 if it cannot fit
int QTNode::GetChildIndex(QTEntity* entity) const
{
    assert(!IsLeaf());
    for (uint i = 0; i < QTNODE_NUM_CHILDREN; i++)
        if (entity->GetAABB().FitsIn(mChildren[i]->mLimits))
            return i;
    return -1;
}
int QTNode :: GetChildIndex ( QTEntity * entity ) const { assert ( ! IsLeaf ( ) ) ; for ( uint i = 0 ; i < QTNODE_NUM_CHILDREN ; i ++ ) if ( entity -> GetAABB ( ) . FitsIn ( mChildren [ i ] -> mLimits ) ) return i ; return -1 ; }
Checks if this object(limits) fits in any of this node children.
Checks if this object ( limits ) fits in any of this node children .