Fixing warnings - Changed Region to use int16 instead of int32.
This commit is contained in:
		| @@ -8,28 +8,28 @@ namespace PolyVox | ||||
| 	{ | ||||
| 	} | ||||
|  | ||||
| 	Region::Region(const Vector3DInt32& v3dLowerCorner, const Vector3DInt32& v3dUpperCorner) | ||||
| 	Region::Region(const Vector3DInt16& v3dLowerCorner, const Vector3DInt16& v3dUpperCorner) | ||||
| 		:m_v3dLowerCorner(v3dLowerCorner) | ||||
| 		,m_v3dUpperCorner(v3dUpperCorner) | ||||
| 	{ | ||||
| 	} | ||||
|  | ||||
| 	const Vector3DInt32& Region::getLowerCorner(void) const | ||||
| 	const Vector3DInt16& Region::getLowerCorner(void) const | ||||
| 	{ | ||||
| 		return m_v3dLowerCorner; | ||||
| 	} | ||||
|  | ||||
| 	const Vector3DInt32& Region::getUpperCorner(void) const | ||||
| 	const Vector3DInt16& Region::getUpperCorner(void) const | ||||
| 	{ | ||||
| 		return m_v3dUpperCorner; | ||||
| 	}	 | ||||
|  | ||||
| 	void Region::setLowerCorner(const Vector3DInt32& v3dLowerCorner) | ||||
| 	void Region::setLowerCorner(const Vector3DInt16& v3dLowerCorner) | ||||
| 	{ | ||||
| 		m_v3dLowerCorner = v3dLowerCorner; | ||||
| 	} | ||||
|  | ||||
| 	void Region::setUpperCorner(const Vector3DInt32& v3dUpperCorner) | ||||
| 	void Region::setUpperCorner(const Vector3DInt16& v3dUpperCorner) | ||||
| 	{ | ||||
| 		m_v3dUpperCorner = v3dUpperCorner; | ||||
| 	} | ||||
| @@ -44,7 +44,7 @@ namespace PolyVox | ||||
| 			&& (pos.getZ() >= m_v3dLowerCorner.getZ() + boundary); | ||||
| 	} | ||||
|  | ||||
| 	bool Region::containsPoint(const Vector3DInt32& pos, uint8_t boundary) const | ||||
| 	bool Region::containsPoint(const Vector3DInt16& pos, uint8_t boundary) const | ||||
| 	{ | ||||
| 		return (pos.getX() <= m_v3dUpperCorner.getX() - boundary) | ||||
| 			&& (pos.getY() <= m_v3dUpperCorner.getY() - boundary)  | ||||
| @@ -64,38 +64,38 @@ namespace PolyVox | ||||
| 		m_v3dUpperCorner.setZ((std::min)(m_v3dUpperCorner.getZ(), other.m_v3dUpperCorner.getZ())); | ||||
| 	} | ||||
|  | ||||
| 	int32_t Region::depth(void) const | ||||
| 	int16_t Region::depth(void) const | ||||
| 	{ | ||||
| 		return m_v3dUpperCorner.getZ() - m_v3dLowerCorner.getZ(); | ||||
| 	} | ||||
|  | ||||
| 	int32_t Region::height(void) const | ||||
| 	int16_t Region::height(void) const | ||||
| 	{ | ||||
| 		return m_v3dUpperCorner.getY() - m_v3dLowerCorner.getY(); | ||||
| 	} | ||||
|  | ||||
| 	void Region::shift(const Vector3DInt32& amount) | ||||
| 	void Region::shift(const Vector3DInt16& amount) | ||||
| 	{ | ||||
| 		m_v3dLowerCorner += amount; | ||||
| 		m_v3dUpperCorner += amount; | ||||
| 	} | ||||
|  | ||||
| 	void Region::shiftLowerCorner(const Vector3DInt32& amount) | ||||
| 	void Region::shiftLowerCorner(const Vector3DInt16& amount) | ||||
| 	{ | ||||
| 		m_v3dLowerCorner += amount; | ||||
| 	} | ||||
|  | ||||
| 	void Region::shiftUpperCorner(const Vector3DInt32& amount) | ||||
| 	void Region::shiftUpperCorner(const Vector3DInt16& amount) | ||||
| 	{ | ||||
| 		m_v3dUpperCorner += amount; | ||||
| 	} | ||||
|  | ||||
| 	Vector3DInt32 Region::dimensions(void) | ||||
| 	Vector3DInt16 Region::dimensions(void) | ||||
| 	{ | ||||
| 		return m_v3dUpperCorner - m_v3dLowerCorner; | ||||
| 	} | ||||
|  | ||||
| 	int32_t Region::width(void) const | ||||
| 	int16_t Region::width(void) const | ||||
| 	{ | ||||
| 		return m_v3dUpperCorner.getX() - m_v3dLowerCorner.getX(); | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user