Compile fixes for Visual Studio.
This commit is contained in:
@ -97,99 +97,55 @@ namespace PolyVox
|
|||||||
typedef DensityU8 Density8;
|
typedef DensityU8 Density8;
|
||||||
typedef DensityU16 Density16;
|
typedef DensityU16 Density16;
|
||||||
|
|
||||||
// We have to define all the min and max values explicitly here rather than using std::numeric_limits because we need
|
// We have to define 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.
|
// compile time constants. The new 'constexpr' would help here but it's not supported by all compilers at the moment.
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
class VoxelTypeTraits< DensityI8 >
|
class VoxelTypeTraits< DensityI8 >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
const static typename DensityI8::DensityType MinDensity;
|
const static DensityI8::DensityType MinDensity;
|
||||||
const static typename DensityI8::DensityType MaxDensity;
|
const static DensityI8::DensityType MaxDensity;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
class VoxelTypeTraits< DensityU8 >
|
class VoxelTypeTraits< DensityU8 >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
const static typename DensityU8::DensityType MinDensity;
|
const static DensityU8::DensityType MinDensity;
|
||||||
const static typename DensityU8::DensityType MaxDensity;
|
const static DensityU8::DensityType MaxDensity;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
class VoxelTypeTraits< DensityI16 >
|
class VoxelTypeTraits< DensityI16 >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
const static typename DensityI16::DensityType MinDensity;
|
const static DensityI16::DensityType MinDensity;
|
||||||
const static typename DensityI16::DensityType MaxDensity;
|
const static DensityI16::DensityType MaxDensity;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
class VoxelTypeTraits< DensityU16 >
|
class VoxelTypeTraits< DensityU16 >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
const static typename DensityU16::DensityType MinDensity;
|
const static DensityU16::DensityType MinDensity;
|
||||||
const static typename DensityU16::DensityType MaxDensity;
|
const static DensityU16::DensityType MaxDensity;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
class VoxelTypeTraits< DensityFloat >
|
class VoxelTypeTraits< DensityFloat >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
const static typename DensityFloat::DensityType MinDensity;
|
const static DensityFloat::DensityType MinDensity;
|
||||||
const static typename DensityFloat::DensityType MaxDensity;
|
const static DensityFloat::DensityType MaxDensity;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
class VoxelTypeTraits< DensityDouble >
|
class VoxelTypeTraits< DensityDouble >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
const static typename DensityDouble::DensityType MinDensity;
|
const static DensityDouble::DensityType MinDensity;
|
||||||
const static typename DensityDouble::DensityType MaxDensity;
|
const static DensityDouble::DensityType MaxDensity;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*template<>
|
|
||||||
class VoxelTypeTraits< Density<uint8_t> >
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
const static uint8_t MinDensity;
|
|
||||||
const static uint8_t MaxDensity;
|
|
||||||
};
|
|
||||||
|
|
||||||
template<>
|
|
||||||
class VoxelTypeTraits< Density<int16_t> >
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
const static int16_t MinDensity;
|
|
||||||
const static int16_t MaxDensity;
|
|
||||||
};
|
|
||||||
|
|
||||||
template<>
|
|
||||||
class VoxelTypeTraits< Density<uint16_t> >
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
const static uint16_t MinDensity;
|
|
||||||
const static uint16_t MaxDensity;
|
|
||||||
};
|
|
||||||
|
|
||||||
//Constants for float defined in .cpp file as they are not integers.
|
|
||||||
template<>
|
|
||||||
class VoxelTypeTraits< Density<float> >
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
const static float MinDensity;
|
|
||||||
const static float MaxDensity;
|
|
||||||
};
|
|
||||||
|
|
||||||
//Constants for double defined in .cpp file as they are not integers.
|
|
||||||
template<>
|
|
||||||
class VoxelTypeTraits< Density<double> >
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
const static double MinDensity;
|
|
||||||
const static double MaxDensity;
|
|
||||||
};*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //__PolyVox_Density_H__
|
#endif //__PolyVox_Density_H__
|
||||||
|
@ -90,16 +90,16 @@ namespace PolyVox
|
|||||||
class VoxelTypeTraits< MaterialDensityPair44 >
|
class VoxelTypeTraits< MaterialDensityPair44 >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
const static typename MaterialDensityPair44::DensityType MinDensity;
|
const static MaterialDensityPair44::DensityType MinDensity;
|
||||||
const static typename MaterialDensityPair44::DensityType MaxDensity;
|
const static MaterialDensityPair44::DensityType MaxDensity;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
class VoxelTypeTraits< MaterialDensityPair88 >
|
class VoxelTypeTraits< MaterialDensityPair88 >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
const static typename MaterialDensityPair88::DensityType MinDensity;
|
const static MaterialDensityPair88::DensityType MinDensity;
|
||||||
const static typename MaterialDensityPair88::DensityType MaxDensity;
|
const static MaterialDensityPair88::DensityType MaxDensity;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,6 +72,7 @@ namespace PolyVox
|
|||||||
void shift(const Vector3DInt32& amount);
|
void shift(const Vector3DInt32& amount);
|
||||||
void shiftLowerCorner(const Vector3DInt32& amount);
|
void shiftLowerCorner(const Vector3DInt32& amount);
|
||||||
void shiftUpperCorner(const Vector3DInt32& amount);
|
void shiftUpperCorner(const Vector3DInt32& amount);
|
||||||
|
//FIXME - Add dilate and erode functions?
|
||||||
/// Deprecated and misleading
|
/// Deprecated and misleading
|
||||||
Vector3DInt32 dimensions(void);
|
Vector3DInt32 dimensions(void);
|
||||||
/// Deprecated and misleading
|
/// Deprecated and misleading
|
||||||
|
@ -27,62 +27,21 @@ freely, subject to the following restrictions:
|
|||||||
|
|
||||||
namespace PolyVox
|
namespace PolyVox
|
||||||
{
|
{
|
||||||
//const typename Density8::DensityType VoxelTypeTraits< Density8 >::MinDensity = 0;
|
const DensityI8::DensityType VoxelTypeTraits< DensityI8 >::MinDensity = -127;
|
||||||
//const typename Density8::DensityType VoxelTypeTraits< Density8 >::MaxDensity = 255;
|
const DensityI8::DensityType VoxelTypeTraits< DensityI8 >::MaxDensity = 127;
|
||||||
|
|
||||||
const typename DensityI8::DensityType VoxelTypeTraits< DensityI8 >::MinDensity = -127;
|
const DensityU8::DensityType VoxelTypeTraits< DensityU8 >::MinDensity = 0;
|
||||||
const typename DensityI8::DensityType VoxelTypeTraits< DensityI8 >::MaxDensity = 127;
|
const DensityU8::DensityType VoxelTypeTraits< DensityU8 >::MaxDensity = 255;
|
||||||
|
|
||||||
const typename DensityU8::DensityType VoxelTypeTraits< DensityU8 >::MinDensity = 0;
|
const DensityI16::DensityType VoxelTypeTraits< DensityI16 >::MinDensity = -32767;
|
||||||
const typename DensityU8::DensityType VoxelTypeTraits< DensityU8 >::MaxDensity = 255;
|
const DensityI16::DensityType VoxelTypeTraits< DensityI16 >::MaxDensity = 32767;
|
||||||
|
|
||||||
//const typename Density16::DensityType VoxelTypeTraits< Density16 >::MinDensity = 0;
|
const DensityU16::DensityType VoxelTypeTraits< DensityU16 >::MinDensity = 0;
|
||||||
//const typename Density16::DensityType VoxelTypeTraits< Density16 >::MaxDensity = 65535;
|
const DensityU16::DensityType VoxelTypeTraits< DensityU16 >::MaxDensity = 65535;
|
||||||
|
|
||||||
const typename DensityI16::DensityType VoxelTypeTraits< DensityI16 >::MinDensity = -32767;
|
const DensityFloat::DensityType VoxelTypeTraits< DensityFloat >::MinDensity = FLT_MIN;
|
||||||
const typename DensityI16::DensityType VoxelTypeTraits< DensityI16 >::MaxDensity = 32767;
|
const DensityFloat::DensityType VoxelTypeTraits< DensityFloat >::MaxDensity = FLT_MAX;
|
||||||
|
|
||||||
const typename DensityU16::DensityType VoxelTypeTraits< DensityU16 >::MinDensity = 0;
|
const DensityDouble::DensityType VoxelTypeTraits< DensityDouble >::MinDensity = DBL_MIN;
|
||||||
const typename DensityU16::DensityType VoxelTypeTraits< DensityU16 >::MaxDensity = 65535;
|
const DensityDouble::DensityType VoxelTypeTraits< DensityDouble >::MaxDensity = DBL_MAX;
|
||||||
|
|
||||||
const typename DensityFloat::DensityType VoxelTypeTraits< DensityFloat >::MinDensity = FLT_MIN;
|
|
||||||
const typename DensityFloat::DensityType VoxelTypeTraits< DensityFloat >::MaxDensity = FLT_MAX;
|
|
||||||
|
|
||||||
const typename DensityDouble::DensityType VoxelTypeTraits< DensityDouble >::MinDensity = DBL_MIN;
|
|
||||||
const typename DensityDouble::DensityType VoxelTypeTraits< DensityDouble >::MaxDensity = DBL_MAX;
|
|
||||||
|
|
||||||
//template<>
|
|
||||||
//const typename DensityI8::DensityType VoxelTypeTraits< DensityI8 >::MinDensity = -127;
|
|
||||||
//template<>
|
|
||||||
//const typename DensityI8::DensityType VoxelTypeTraits< DensityI8 >::MaxDensity = 127;
|
|
||||||
|
|
||||||
//template<>
|
|
||||||
//const typename DensityU8::DensityType VoxelTypeTraits< DensityU8 >::MinDensity = 0;
|
|
||||||
//template<>
|
|
||||||
//const typename DensityU8::DensityType VoxelTypeTraits< DensityU8 >::MaxDensity = 255;
|
|
||||||
|
|
||||||
/*template<>
|
|
||||||
const uint8_t VoxelTypeTraits< Density8 >::MinDensity = 0;
|
|
||||||
template<>
|
|
||||||
const uint8_t VoxelTypeTraits< Density8 >::MaxDensity = 255;
|
|
||||||
|
|
||||||
template<>
|
|
||||||
const int16_t VoxelTypeTraits< DensityI16 >::MinDensity = -32767;
|
|
||||||
template<>
|
|
||||||
const int16_t VoxelTypeTraits< DensityI16 >::MaxDensity = 32767;
|
|
||||||
|
|
||||||
template<>
|
|
||||||
const uint16_t VoxelTypeTraits< Density16 >::MinDensity = 0;
|
|
||||||
template<>
|
|
||||||
const uint16_t VoxelTypeTraits< Density16 >::MaxDensity = 65535;
|
|
||||||
|
|
||||||
template<>
|
|
||||||
const float VoxelTypeTraits< DensityFloat >::MinDensity = FLT_MIN;
|
|
||||||
template<>
|
|
||||||
const float VoxelTypeTraits< DensityFloat >::MaxDensity = FLT_MAX;
|
|
||||||
|
|
||||||
template<>
|
|
||||||
const double VoxelTypeTraits< DensityDouble >::MinDensity = DBL_MIN;
|
|
||||||
template<>
|
|
||||||
const double VoxelTypeTraits< DensityDouble >::MaxDensity = DBL_MAX;*/
|
|
||||||
}
|
}
|
@ -25,9 +25,9 @@ freely, subject to the following restrictions:
|
|||||||
|
|
||||||
namespace PolyVox
|
namespace PolyVox
|
||||||
{
|
{
|
||||||
const typename MaterialDensityPair44::DensityType VoxelTypeTraits< MaterialDensityPair44 >::MinDensity = 0;
|
const MaterialDensityPair44::DensityType VoxelTypeTraits< MaterialDensityPair44 >::MinDensity = 0;
|
||||||
const typename MaterialDensityPair44::DensityType VoxelTypeTraits< MaterialDensityPair44 >::MaxDensity = 15;
|
const MaterialDensityPair44::DensityType VoxelTypeTraits< MaterialDensityPair44 >::MaxDensity = 15;
|
||||||
|
|
||||||
const typename MaterialDensityPair88::DensityType VoxelTypeTraits< MaterialDensityPair88 >::MinDensity = 0;
|
const MaterialDensityPair88::DensityType VoxelTypeTraits< MaterialDensityPair88 >::MinDensity = 0;
|
||||||
const typename MaterialDensityPair88::DensityType VoxelTypeTraits< MaterialDensityPair88 >::MaxDensity = 255;
|
const MaterialDensityPair88::DensityType VoxelTypeTraits< MaterialDensityPair88 >::MaxDensity = 255;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user