Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top