Scaled vertices to always be integers.
This commit is contained in:
25
include/Constants.h
Normal file
25
include/Constants.h
Normal file
@ -0,0 +1,25 @@
|
||||
#ifndef __Constants_H__
|
||||
#define __Constants_H__
|
||||
|
||||
namespace Ogre
|
||||
{
|
||||
//FIXME - i think we can define mod using a bitmask which flattens the upper bits. Should define that here.
|
||||
const unsigned int OGRE_BLOCK_SIDE_LENGTH_POWER = 5;
|
||||
const unsigned int OGRE_BLOCK_SIDE_LENGTH = (0x0001 << OGRE_BLOCK_SIDE_LENGTH_POWER);
|
||||
const unsigned int OGRE_NO_OF_VOXELS_IN_BLOCK = (OGRE_BLOCK_SIDE_LENGTH * OGRE_BLOCK_SIDE_LENGTH * OGRE_BLOCK_SIDE_LENGTH);
|
||||
|
||||
const unsigned int OGRE_VOLUME_SIDE_LENGTH_POWER = 8;
|
||||
const unsigned int OGRE_VOLUME_SIDE_LENGTH = (0x0001 << OGRE_VOLUME_SIDE_LENGTH_POWER);
|
||||
const unsigned int OGRE_VOLUME_SIDE_LENGTH_IN_BLOCKS = (OGRE_VOLUME_SIDE_LENGTH >> OGRE_BLOCK_SIDE_LENGTH_POWER);
|
||||
const unsigned int OGRE_NO_OF_BLOCKS_IN_VOLUME = (OGRE_VOLUME_SIDE_LENGTH_IN_BLOCKS * OGRE_VOLUME_SIDE_LENGTH_IN_BLOCKS * OGRE_VOLUME_SIDE_LENGTH_IN_BLOCKS);
|
||||
const unsigned int OGRE_NO_OF_VOXELS_IN_VOLUME = (OGRE_VOLUME_SIDE_LENGTH * OGRE_VOLUME_SIDE_LENGTH * OGRE_VOLUME_SIDE_LENGTH);
|
||||
|
||||
const unsigned int OGRE_REGION_SIDE_LENGTH_POWER = 4;
|
||||
const unsigned int OGRE_REGION_SIDE_LENGTH = (0x0001 << OGRE_REGION_SIDE_LENGTH_POWER);
|
||||
const unsigned int OGRE_VOLUME_SIDE_LENGTH_IN_REGIONS = (OGRE_VOLUME_SIDE_LENGTH >> OGRE_REGION_SIDE_LENGTH_POWER);
|
||||
const unsigned int OGRE_NO_OF_REGIONS_IN_VOLUME = (OGRE_VOLUME_SIDE_LENGTH_IN_REGIONS * OGRE_VOLUME_SIDE_LENGTH_IN_REGIONS * OGRE_VOLUME_SIDE_LENGTH_IN_REGIONS);
|
||||
|
||||
const unsigned long OGRE_MAX_VOXELS_TO_BURN_PER_FRAME = 1000;
|
||||
}
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user