diff options
author | Woazboat <f.kargl@posteo.de> | 2015-04-29 00:14:42 +0200 |
---|---|---|
committer | Woazboat <f.kargl@posteo.de> | 2015-04-29 00:14:42 +0200 |
commit | 3d1bd544b08ab67a6d1e9c89fa66ad3c28426360 (patch) | |
tree | c2ffc3dd07b235db6a0410baca1c4f7a3907e80b /src/Tracer.cpp | |
parent | Changed Vector3 Equals function to avoid using memcmp (diff) | |
download | cuberite-3d1bd544b08ab67a6d1e9c89fa66ad3c28426360.tar cuberite-3d1bd544b08ab67a6d1e9c89fa66ad3c28426360.tar.gz cuberite-3d1bd544b08ab67a6d1e9c89fa66ad3c28426360.tar.bz2 cuberite-3d1bd544b08ab67a6d1e9c89fa66ad3c28426360.tar.lz cuberite-3d1bd544b08ab67a6d1e9c89fa66ad3c28426360.tar.xz cuberite-3d1bd544b08ab67a6d1e9c89fa66ad3c28426360.tar.zst cuberite-3d1bd544b08ab67a6d1e9c89fa66ad3c28426360.zip |
Diffstat (limited to 'src/Tracer.cpp')
-rw-r--r-- | src/Tracer.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/Tracer.cpp b/src/Tracer.cpp index aa8689814..ad662aca7 100644 --- a/src/Tracer.cpp +++ b/src/Tracer.cpp @@ -15,16 +15,21 @@ const float FLOAT_EPSILON = 0.0001f; //TODO: Stash this in some header where it can be reused +const std::array<const Vector3f, 6> cTracer::m_NormalTable = +{ + Vector3f(-1, 0, 0), // 1: -x + Vector3f( 0, 0, -1), // 2: -z + Vector3f( 1, 0, 0), // 3: +x + Vector3f( 0, 0, 1), // 4: +z + Vector3f( 0, 1, 0), // 5: +y + Vector3f( 0, -1, 0) // 6: -y +}; + + cTracer::cTracer(cWorld * a_World): m_World(a_World) { - m_NormalTable[0].Set(-1, 0, 0); - m_NormalTable[1].Set( 0, 0, -1); - m_NormalTable[2].Set( 1, 0, 0); - m_NormalTable[3].Set( 0, 0, 1); - m_NormalTable[4].Set( 0, 1, 0); - m_NormalTable[5].Set( 0, -1, 0); } |