What is the recommended class for representing the field?

There is a class in Ogre Ogre::Boxthat looks like it can support a three-dimensional block. However, this class uses a data type size_tto store its coordinates. Since it size_tis essentially an unsigned integer , it cannot process negative numbers, so using it for any real geometry is not possible. I know that I can just keep a few digits or independently come up with a homegrown boxing class, but what is Ogre’s usual way of doing this? Also, I don't care if the box uses integers or floats for storage, it's just that it doesn't matter to the task.

+5
source share
1 answer

You can look at Ogre :: AxisAlignedBox . If you are looking for a class that represents a cube as a grid, you will not find it. However, there is a convenience class that creates for you Ogre::Mesh: Ogre :: PrefabFactory

+3
source

All Articles