Removed support from SurfaceExtractor for extracting surfaces at different LOD levels.

This commit is contained in:
David Williams
2010-03-13 00:05:32 +00:00
parent 8e6da15120
commit b6eb517021
3 changed files with 82 additions and 246 deletions

View File

@ -41,23 +41,18 @@ namespace PolyVox
public:
SurfaceExtractor(Volume<uint8_t>& volData);
uint8_t getLodLevel(void);
void setLodLevel(uint8_t uLodLevel);
POLYVOX_SHARED_PTR<SurfaceMesh> extractSurfaceForRegion(Region region);
private:
//Extract the surface for a particular LOD level
template<uint8_t uLodLevel>
void extractSurfaceImpl(void);
//Compute the cell bitmask for a particular slice in z.
template<bool isPrevZAvail, uint8_t uLodLevel>
template<bool isPrevZAvail>
uint32_t computeBitmaskForSlice(void);
//Compute the cell bitmask for a given cell.
template<bool isPrevXAvail, bool isPrevYAvail, bool isPrevZAvail, uint8_t uLodLevel>
template<bool isPrevXAvail, bool isPrevYAvail, bool isPrevZAvail>
void computeBitmaskForCell(void);
//Use the cell bitmasks to generate all the vertices needed for that slice
@ -72,10 +67,6 @@ namespace PolyVox
return x + (y * m_uScratchPadWidth);
}
//The lod level can step size.
uint8_t m_uLodLevel;
uint8_t m_uStepSize;
//The volume data and a sampler to access it.
Volume<uint8_t> m_volData;
VolumeSampler<uint8_t> m_sampVolume;