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

@ -53,8 +53,8 @@ namespace PolyVox
{
Node(int x, int y, int z)
:gVal(std::numeric_limits<float>::quiet_NaN()) //Initilise with NaNs so that we will
,hVal(std::numeric_limits<float>::quiet_NaN()) //know if we forget to set these properly.
,parent(0)
, hVal(std::numeric_limits<float>::quiet_NaN()) //know if we forget to set these properly.
, parent(0)
{
position.setX(x);
position.setY(y);

View File

@ -141,19 +141,19 @@ namespace PolyVox
/*inline uint32_t convertCoordinates(uint16_t uXPos, uint16_t uYPos, uint16_t uZPos)
{
uint64_t answer = 0;
answer = morton256_z[(uZPos >> 16) & 0xFF] | // we start by shifting the third byte, since we only look at the first 21 bits
morton256_y[(uYPos >> 16) & 0xFF] |
morton256_x[(uXPos >> 16) & 0xFF];
answer = answer << 48 |
morton256_z[(uZPos >> 8) & 0xFF] | // shifting second byte
morton256_y[(uYPos >> 8) & 0xFF] |
morton256_x[(uXPos >> 8) & 0xFF];
answer = answer << 24 |
morton256_z[(uZPos)& 0xFF] | // first byte
morton256_y[(uYPos)& 0xFF] |
morton256_x[(uXPos)& 0xFF];
return answer;
uint64_t answer = 0;
answer = morton256_z[(uZPos >> 16) & 0xFF] | // we start by shifting the third byte, since we only look at the first 21 bits
morton256_y[(uYPos >> 16) & 0xFF] |
morton256_x[(uXPos >> 16) & 0xFF];
answer = answer << 48 |
morton256_z[(uZPos >> 8) & 0xFF] | // shifting second byte
morton256_y[(uYPos >> 8) & 0xFF] |
morton256_x[(uXPos >> 8) & 0xFF];
answer = answer << 24 |
morton256_z[(uZPos)& 0xFF] | // first byte
morton256_y[(uYPos)& 0xFF] |
morton256_x[(uXPos)& 0xFF];
return answer;
}*/
}

View File

@ -30,7 +30,7 @@
#include "PolyVox/Vector.h"
namespace PolyVox
{
{
const Vector3DFloat randomUnitVectors[1024] =
{
Vector3DFloat(+0.339922f, +0.827727f, -0.446454f),

View File

@ -30,7 +30,7 @@
#include "PolyVox/Vector.h"
namespace PolyVox
{
{
const Vector3DFloat randomVectors[1024] =
{
Vector3DFloat(+0.348918f, -0.385662f, +0.650197f),

View File

@ -41,12 +41,12 @@ namespace PolyVox
start();
}
}
void start(void)
{
m_start = clock::now();
}
float elapsedTimeInSeconds(void)
{
std::chrono::duration<float> elapsed_seconds = clock::now() - m_start;
@ -64,7 +64,7 @@ namespace PolyVox
std::chrono::duration<float, std::micro> elapsed_microseconds = clock::now() - m_start;
return elapsed_microseconds.count();
}
private:
typedef std::chrono::system_clock clock;
std::chrono::time_point<clock> m_start;