Work on using a bitfield to set up chunk key.

This commit is contained in:
David Williams
2015-03-20 15:48:46 +01:00
parent e82d6beca1
commit 8bd8f8ba7a
3 changed files with 54 additions and 23 deletions

View File

@ -30,6 +30,14 @@ freely, subject to the following restrictions:
namespace PolyVox
{
// Cast any type to any other type with no safety checks.
// Should only be used if you really know what you are doing!
template<typename to, typename from>
inline to force_cast(from input)
{
return *(reinterpret_cast<to*>(&input));
}
inline bool isPowerOf2(uint32_t uInput)
{
if (uInput == 0)