Esempio n. 1
0
    //-----------------------------------------------------------------------
    DiPlane::Side DiPlane::getSide (const DiAABB& box) const
    {
        if (box.IsNull()) 
            return NO_SIDE;
        if (box.IsInfinite())
            return BOTH_SIDE;

        return getSide(box.GetCenter(), box.GetHalfSize());
    }
Esempio n. 2
0
    void DiOctreeNode::Init(const DiAABB& box, DiOctreeNode* parent)
    {
        for (int i = 0; i < 8; i++)
            mChildren[i] = nullptr;

        mSceneNodeNum = 0;
        mNodeBox    = box;
        mObjectsBox = box;
        mNodeCenter = box.GetCenter();
        mNodeRadius = box.GetRadius();
        mObjectsBox.mMaximum = box.mMinimum;
        mObjectsBox.mMinimum = box.mMaximum;
    }