Applied patch from ker such that int32_t's are now used instead of uint16_t's for addressing voxel positions.

This commit is contained in:
David Williams
2011-03-03 23:00:00 +00:00
parent 3c34d401fc
commit 4ef0cfb468
24 changed files with 278 additions and 251 deletions

View File

@ -37,28 +37,28 @@ namespace PolyVox
{
public:
Region();
Region(const Vector3DInt16& v3dLowerCorner, const Vector3DInt16& v3dUpperCorner);
Region(const Vector3DInt32& v3dLowerCorner, const Vector3DInt32& v3dUpperCorner);
const Vector3DInt16& getLowerCorner(void) const;
const Vector3DInt16& getUpperCorner(void) const;
const Vector3DInt32& getLowerCorner(void) const;
const Vector3DInt32& getUpperCorner(void) const;
void setLowerCorner(const Vector3DInt16& v3dLowerCorner);
void setUpperCorner(const Vector3DInt16& v3dUpperCorner);
void setLowerCorner(const Vector3DInt32& v3dLowerCorner);
void setUpperCorner(const Vector3DInt32& v3dUpperCorner);
bool containsPoint(const Vector3DFloat& pos, float boundary = 0.0f) const;
bool containsPoint(const Vector3DInt16& pos, uint8_t boundary = 0) const;
bool containsPoint(const Vector3DInt32& pos, uint8_t boundary = 0) const;
void cropTo(const Region& other);
int16_t depth(void) const;
int16_t height(void) const;
void shift(const Vector3DInt16& amount);
void shiftLowerCorner(const Vector3DInt16& amount);
void shiftUpperCorner(const Vector3DInt16& amount);
Vector3DInt16 dimensions(void);
int16_t width(void) const;
int32_t depth(void) const;
int32_t height(void) const;
void shift(const Vector3DInt32& amount);
void shiftLowerCorner(const Vector3DInt32& amount);
void shiftUpperCorner(const Vector3DInt32& amount);
Vector3DInt32 dimensions(void);
int32_t width(void) const;
private:
Vector3DInt16 m_v3dLowerCorner;
Vector3DInt16 m_v3dUpperCorner;
Vector3DInt32 m_v3dLowerCorner;
Vector3DInt32 m_v3dUpperCorner;
//FIXME - This variable is unused, but without it the OpenGL example crashes in release mode
//when the volume size is 128^3 and the level of detail is 2. Very strange, but consistant.