Replaced 'm_region' with 'm_offset' and demonstrated its use.
This commit is contained in:
		| @@ -196,7 +196,7 @@ namespace PolyVox | ||||
| 			} | ||||
| 		} | ||||
|  | ||||
| 		m_meshCurrent->m_Region = m_regSizeInVoxels; | ||||
| 		m_meshCurrent->setOffset(m_regSizeInVoxels.getLowerCorner()); | ||||
| 		m_meshCurrent->removeUnusedVertices(); | ||||
|  | ||||
| 		m_meshCurrent->m_vecLodRecords.clear(); | ||||
|   | ||||
| @@ -122,7 +122,7 @@ namespace PolyVox | ||||
| 			m_regSliceCurrent.shift(Vector3DInt32(0,0,1)); | ||||
| 		} | ||||
|  | ||||
| 		m_meshCurrent->m_Region = m_regSizeInVoxels; | ||||
| 		m_meshCurrent->setOffset(m_regSizeInVoxels.getLowerCorner()); | ||||
|  | ||||
| 		m_meshCurrent->m_vecLodRecords.clear(); | ||||
| 		LodRecord lodRecord; | ||||
|   | ||||
| @@ -59,6 +59,9 @@ namespace PolyVox | ||||
| 		uint32_t getNoOfIndices(void) const; | ||||
| 		uint32_t getNoOfVertices(void) const; | ||||
| 		const std::vector<VertexType>& getVertices(void) const; | ||||
| 		const Vector3DInt32& getOffset(void) const; | ||||
|  | ||||
| 		void setOffset(const Vector3DInt32& offset); | ||||
|  | ||||
| 		void addTriangle(uint32_t index0, uint32_t index1, uint32_t index2); | ||||
| 		uint32_t addVertex(const VertexType& vertex); | ||||
| @@ -66,7 +69,7 @@ namespace PolyVox | ||||
| 		bool isEmpty(void) const; | ||||
| 		void removeUnusedVertices(void); | ||||
|  | ||||
| 		Region m_Region; | ||||
| 		Vector3DInt32 m_offset; | ||||
| 	 | ||||
| 	public:		 | ||||
| 		std::vector<uint32_t> m_vecTriangleIndices; | ||||
| @@ -88,7 +91,7 @@ namespace PolyVox | ||||
|  | ||||
| 		result.m_vecTriangleIndices = mesh.m_vecTriangleIndices; | ||||
|  | ||||
| 		result.m_Region = mesh.m_Region; | ||||
| 		result.m_offset = mesh.m_offset; | ||||
|  | ||||
| 		return result; | ||||
| 	} | ||||
|   | ||||
| @@ -55,7 +55,19 @@ namespace PolyVox | ||||
| 	const std::vector<VertexType>& Mesh<VertexType>::getVertices(void) const | ||||
| 	{ | ||||
| 		return m_vecVertices; | ||||
| 	}		 | ||||
| 	} | ||||
|  | ||||
| 	template <typename VertexType> | ||||
| 	const Vector3DInt32& Mesh<VertexType>::getOffset(void) const | ||||
| 	{ | ||||
| 		return m_offset; | ||||
| 	} | ||||
|  | ||||
| 	template <typename VertexType> | ||||
| 	void Mesh<VertexType>::setOffset(const Vector3DInt32& offset) | ||||
| 	{ | ||||
| 		m_offset = offset; | ||||
| 	} | ||||
|  | ||||
| 	template <typename VertexType> | ||||
| 	void Mesh<VertexType>::addTriangle(uint32_t index0, uint32_t index1, uint32_t index2) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user