In Ogre, there's a class Ogre::Box that looks like it can support a three-dimensional box. However, this class is using a size_t data type for storage of its coordinates. Since size_t is essentially an unsigned integer, it cannot handle negative numbers, and so using it for any real geometry is not possible. I know I can just keep a few numbers or invent a homebrew box class by myself, but what is the usual Ogre way of doing this? Also, I don't care if the box is using integers or floats for storage, it just happens so that it doesn't matter for the task at hand.
            Asked
            
        
        
            Active
            
        
            Viewed 156 times
        
    5
            
            
        - 
                    6Out of curiosity, how would a box with negative dimensions actually look like? – Mihai Todor Mar 13 '13 at 14:34
 - 
                    2@MihaiTodor: inside-out ;-) – Steve Jessop Mar 13 '13 at 15:26
 - 
                    @MihaiTodor, sorry for the confusion, by "dimensions" I actually meant "coordinates". The box with negative coordinates will be just on the other side of the (0; 0; 0) point. – Septagram Mar 13 '13 at 15:33
 
1 Answers
3
            You can have a look at Ogre::AxisAlignedBox. If you are looking for a class representing a cube as mesh, you won't find it. However, there is a convenience class which creates an Ogre::Mesh for you: Ogre::PrefabFactory
        c_k
        
- 1,746
 - 1
 - 20
 - 35