Talk:Oriented Bounding Box        

In Ember I provide a non-axis aligned bounding box by extending the axis aligned one and override some of the methods. The code is this. It works just as the AABBWireBoundingBox.

namespace Ogre {

    /**
    This is just like a WireBoundBox but not aligned to the axes, hence it will correctly line up according to its orientation.
    */
    class OOBBWireBoundingBox  : public WireBoundingBox
    {
        public:
    
        void getWorldTransforms( Matrix4* xform ) const
        {
            SimpleRenderable::getWorldTransforms(xform);
        }
        //-----------------------------------------------------------------------
        const Quaternion& getWorldOrientation(void) const
        {
            return SimpleRenderable::getWorldOrientation();
        }
        //-----------------------------------------------------------------------
        const Vector3& getWorldPosition(void) const
        {
            return SimpleRenderable::getWorldPosition();
        }                

    };

};

--Azatoth 11:07, 12 July 2007 (BST)