Work on refactoring voxel types.
This commit is contained in:
@ -99,36 +99,36 @@ namespace PolyVox
|
||||
|
||||
// We have to define all the min and max values explicitly here rather than using std::numeric_limits because we need
|
||||
// compile time constants. The new 'constexpr' would help here but it's not supported by all compilers at the moment.
|
||||
template<>
|
||||
/*template<>
|
||||
class VoxelTypeTraits< Density<int8_t> >
|
||||
{
|
||||
public:
|
||||
const static int8_t MinDensity = -127;
|
||||
const static int8_t MaxDensity = 127;
|
||||
};
|
||||
const static int8_t MinDensity;
|
||||
const static int8_t MaxDensity;
|
||||
};*/
|
||||
|
||||
template<>
|
||||
/*template<>
|
||||
class VoxelTypeTraits< Density<uint8_t> >
|
||||
{
|
||||
public:
|
||||
const static uint8_t MinDensity = 0;
|
||||
const static uint8_t MaxDensity = 255;
|
||||
};
|
||||
const static uint8_t MinDensity;
|
||||
const static uint8_t MaxDensity;
|
||||
};*/
|
||||
|
||||
template<>
|
||||
/*template<>
|
||||
class VoxelTypeTraits< Density<int16_t> >
|
||||
{
|
||||
public:
|
||||
const static int16_t MinDensity = -32767;
|
||||
const static int16_t MaxDensity = 32767;
|
||||
const static int16_t MinDensity;
|
||||
const static int16_t MaxDensity;
|
||||
};
|
||||
|
||||
template<>
|
||||
class VoxelTypeTraits< Density<uint16_t> >
|
||||
{
|
||||
public:
|
||||
const static uint16_t MinDensity = 0;
|
||||
const static uint16_t MaxDensity = 65535;
|
||||
const static uint16_t MinDensity;
|
||||
const static uint16_t MaxDensity;
|
||||
};
|
||||
|
||||
//Constants for float defined in .cpp file as they are not integers.
|
||||
@ -147,7 +147,7 @@ namespace PolyVox
|
||||
public:
|
||||
const static double MinDensity;
|
||||
const static double MaxDensity;
|
||||
};
|
||||
};*/
|
||||
|
||||
}
|
||||
|
||||
|
@ -86,13 +86,13 @@ namespace PolyVox
|
||||
typedef MaterialDensityPair<uint8_t, 4, 4> MaterialDensityPair44;
|
||||
typedef MaterialDensityPair<uint16_t, 8, 8> MaterialDensityPair88;
|
||||
|
||||
template<typename Type, uint8_t NoOfMaterialBits, uint8_t NoOfDensityBits>
|
||||
/*template<typename Type, uint8_t NoOfMaterialBits, uint8_t NoOfDensityBits>
|
||||
class VoxelTypeTraits< MaterialDensityPair<Type, NoOfDensityBits, NoOfMaterialBits> >
|
||||
{
|
||||
public:
|
||||
const static Type MinDensity = 0;
|
||||
const static Type MaxDensity = (0x01 << NoOfDensityBits) - 1;
|
||||
};
|
||||
};*/
|
||||
}
|
||||
|
||||
#endif
|
@ -68,8 +68,8 @@ namespace PolyVox
|
||||
class VoxelTypeTraits
|
||||
{
|
||||
public:
|
||||
const static typename Type::DensityType MinDensity = 0;
|
||||
const static typename Type::DensityType MaxDensity = 0;
|
||||
const static typename Type::DensityType MinDensity;
|
||||
const static typename Type::DensityType MaxDensity;
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user