Skip to content
Snippets Groups Projects
Commit 86e0d7ea authored by Shon Ferguson's avatar Shon Ferguson
Browse files

Made sure all classes fell into 3 namespaces: Niflib, triangle_stripper, and NvTriStrip.

parent 639803de
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,10 @@
#include "NvTriStripObjects.h"
#include "NvTriStrip.h"
using namespace NvTriStrip;
namespace NvTriStrip {
////////////////////////////////////////////////////////////////////////////////////////
//private data
static unsigned int cacheSize = CACHESIZE_GEFORCE1_2;
......@@ -496,3 +500,5 @@ void RemapIndices(const PrimitiveGroup* in_primGroups, const unsigned short numG
delete[] indexCache;
}
} //end namespace
......@@ -5,6 +5,8 @@
#define NULL 0
#endif
namespace NvTriStrip {
////////////////////////////////////////////////////////////////////////////////////////
// Public interface for stripifier
////////////////////////////////////////////////////////////////////////////////////////
......@@ -140,4 +142,6 @@ bool GenerateStrips(const unsigned short* in_indices, const unsigned int in_numI
void RemapIndices(const PrimitiveGroup* in_primGroups, const unsigned short numGroups,
const unsigned short numVerts, PrimitiveGroup** remappedGroups);
#endif
} //End namespace
#endif
\ No newline at end of file
......@@ -6,6 +6,8 @@
#include "NvTriStripObjects.h"
#include "VertexCache.h"
using namespace NvTriStrip;
#define CACHE_INEFFICIENCY 6
NvStripifier::NvStripifier()
......
......@@ -7,6 +7,9 @@
#include <list>
#include "VertexCache.h"
//Wrap these types in a namespace
namespace NvTriStrip {
/////////////////////////////////////////////////////////////////////////////////
//
// Types defined for stripification
......@@ -240,4 +243,6 @@ protected:
friend class NvStripInfo;
};
#endif
} //End namespace
#endif
\ No newline at end of file
#include "VertexCache.h"
using namespace NvTriStrip;
VertexCache::VertexCache()
{
......
......@@ -3,6 +3,8 @@
#define VERTEX_CACHE_H
namespace NvTriStrip {
class VertexCache
{
......@@ -24,4 +26,6 @@ private:
};
} //End namespace
#endif
......@@ -18,6 +18,9 @@ All rights reserved. Please see niflib.h for licence. */
using namespace Niflib;
//Wrape these in the Niflib namespace so they don't polute the Class View
namespace Niflib {
struct VertNorm {
Vector3 position;
Vector3 normal;
......@@ -91,6 +94,15 @@ struct CompoundVertex {
}
};
struct MergeLookUp {
unsigned int vertIndex;
unsigned int normIndex;
unsigned int colorIndex;
map<unsigned int, unsigned int> uvIndices; //TexCoordSet Index, TexCoord Index
};
} //End namespace
void ComplexShape::SetName( const string & n ) {
name = n;
}
......@@ -167,13 +179,6 @@ void ComplexShape::Clear() {
name.clear();
}
struct MergeLookUp {
unsigned int vertIndex;
unsigned int normIndex;
unsigned int colorIndex;
map<unsigned int, unsigned int> uvIndices; //TexCoordSet Index, TexCoord Index
};
void ComplexShape::Merge( NiAVObject * root ) {
if ( root == NULL ) {
......
......@@ -12,6 +12,7 @@ All rights reserved. Please see niflib.h for licence. */
#include "../../NvTriStrip/NvTriStrip.h"
#include <algorithm>
using namespace Niflib;
using namespace NvTriStrip;
typedef vector<float> WeightList;
typedef vector<unsigned short> BoneList;
......
......@@ -7,6 +7,7 @@ All rights reserved. Please see niflib.h for licence. */
using namespace Niflib;
using namespace triangle_stripper;
using namespace NvTriStrip;
// Helper methods
typedef vector<unsigned short> TriStrip;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment