Applied default Visual Studio formatting to most files. This is a quick fix for the tabs vs spaces issue that messes up the formatting in any editor (esp. Linux) which handles tabs/spaces differently to Visual Studio. Some parts of the formatting look a bit worse but overall it should be better (or at least more consistent).

I didn't apply the changes to a few macro-heavy files as Visual Studio removes all indentation from macros, whereas the indentation can be handy to see nesting.
This commit is contained in:
David Williams
2015-12-26 23:11:27 +00:00
parent b3ca051878
commit e89a55d154
58 changed files with 1117 additions and 1114 deletions

View File

@ -30,12 +30,12 @@ namespace PolyVox
template <typename VoxelType>
PagedVolume<VoxelType>::Chunk::Chunk(Vector3DInt32 v3dPosition, uint16_t uSideLength, Pager* pPager)
:m_uChunkLastAccessed(0)
,m_bDataModified(true)
,m_tData(0)
,m_uSideLength(0)
,m_uSideLengthPower(0)
,m_pPager(pPager)
,m_v3dChunkSpacePosition(v3dPosition)
, m_bDataModified(true)
, m_tData(0)
, m_uSideLength(0)
, m_uSideLengthPower(0)
, m_pPager(pPager)
, m_v3dChunkSpacePosition(v3dPosition)
{
POLYVOX_ASSERT(m_pPager, "No valid pager supplied to chunk constructor.");
POLYVOX_ASSERT(uSideLength <= 256, "Chunk side length cannot be greater than 256.");
@ -46,7 +46,7 @@ namespace PolyVox
// Allocate the data
const uint32_t uNoOfVoxels = m_uSideLength * m_uSideLength * m_uSideLength;
m_tData = new VoxelType[uNoOfVoxels];
m_tData = new VoxelType[uNoOfVoxels];
// Pass the chunk to the Pager to give it a chance to initialise it with any data
// From the coordinates of the chunk we deduce the coordinates of the contained voxels.
@ -134,9 +134,9 @@ namespace PolyVox
template <typename VoxelType>
void PagedVolume<VoxelType>::Chunk::setVoxel(const Vector3DUint16& v3dPos, VoxelType tValue)
{
{
setVoxel(v3dPos.getX(), v3dPos.getY(), v3dPos.getZ(), tValue);
}
}
template <typename VoxelType>
uint32_t PagedVolume<VoxelType>::Chunk::calculateSizeInBytes(void)
@ -160,7 +160,7 @@ namespace PolyVox
// then the ordering is automatically handled correctly.
template <typename VoxelType>
void PagedVolume<VoxelType>::Chunk::changeLinearOrderingToMorton(void)
{
{
VoxelType* pTempBuffer = new VoxelType[m_uSideLength * m_uSideLength * m_uSideLength];
// We should prehaps restructure this loop. From: https://fgiesen.wordpress.com/2011/01/17/texture-tiling-and-swizzling/