5

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.

Community
  • 1
  • 1
Septagram
  • 9,425
  • 13
  • 50
  • 81

1 Answers1

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