Updated LogVisor

This commit is contained in:
Jack Andersen 2015-11-09 09:44:47 -10:00
parent dcd0515f04
commit 262d6a6f28
3 changed files with 25 additions and 8 deletions

View File

@ -384,7 +384,7 @@ public:
Vector3f aabbMin; Vector3f aabbMin;
Vector3f aabbMax; Vector3f aabbMax;
/* HECL source of each material */ /** HECL source and metadata of each material */
struct Material struct Material
{ {
std::string name; std::string name;
@ -415,7 +415,7 @@ public:
std::vector<std::vector<SkinBind>> skins; std::vector<std::vector<SkinBind>> skins;
std::vector<size_t> contiguousSkinVertCounts; std::vector<size_t> contiguousSkinVertCounts;
/* Islands of the same material/skinBank are represented here */ /** Islands of the same material/skinBank are represented here */
struct Surface struct Surface
{ {
Vector3f centroid; Vector3f centroid;
@ -425,7 +425,7 @@ public:
Vector3f reflectionNormal; Vector3f reflectionNormal;
uint32_t skinBankIdx; uint32_t skinBankIdx;
/* Vertex indexing data (all primitives joined as degenerate tri-strip) */ /** Vertex indexing data (all primitives joined as degenerate tri-strip) */
struct Vert struct Vert
{ {
uint32_t iPos; uint32_t iPos;

@ -1 +1 @@
Subproject commit 189e047977b138b711259ad84d94471f5d006ffb Subproject commit 4c2442df2d800fc25339d3d301d7d3691da7bafb

View File

@ -399,7 +399,9 @@ public:
Hash(unsigned long long hashin) Hash(unsigned long long hashin)
: hash(hashin) {} : hash(hashin) {}
Hash(const Hash& other) {hash = other.hash;} Hash(const Hash& other) {hash = other.hash;}
unsigned long long val() const {return hash;} uint32_t val32() const {return uint32_t(hash);}
uint64_t val64() const {return uint64_t(hash);}
size_t valSizeT() const {return size_t(hash);}
Hash& operator=(const Hash& other) {hash = other.hash; return *this;} Hash& operator=(const Hash& other) {hash = other.hash; return *this;}
bool operator==(const Hash& other) const {return hash == other.hash;} bool operator==(const Hash& other) const {return hash == other.hash;}
bool operator!=(const Hash& other) const {return hash != other.hash;} bool operator!=(const Hash& other) const {return hash != other.hash;}
@ -502,7 +504,7 @@ public:
* @brief HECL-specific xxhash * @brief HECL-specific xxhash
* @return unique hash value * @return unique hash value
*/ */
size_t hash() const {return m_hash.val();} Hash hash() const {return m_hash;}
bool operator==(const ProjectRootPath& other) const {return m_hash == other.m_hash;} bool operator==(const ProjectRootPath& other) const {return m_hash == other.m_hash;}
bool operator!=(const ProjectRootPath& other) const {return m_hash != other.m_hash;} bool operator!=(const ProjectRootPath& other) const {return m_hash != other.m_hash;}
}; };
@ -543,6 +545,21 @@ public:
*/ */
operator bool() const {return m_absPath.size() != 0;} operator bool() const {return m_absPath.size() != 0;}
/**
* @brief Clears path
*/
void clear()
{
m_proj = nullptr;
m_absPath.clear();
m_relPath.clear();
m_hash = 0;
#if HECL_UCS2
m_utf8AbsPath.clear();
m_utf8RelPath.clear();
#endif
}
/** /**
* @brief Construct a project subpath representation within a project's root path * @brief Construct a project subpath representation within a project's root path
* @param project previously constructed Project to use root path of * @param project previously constructed Project to use root path of
@ -814,7 +831,7 @@ public:
* @brief HECL-specific xxhash * @brief HECL-specific xxhash
* @return unique hash value * @return unique hash value
*/ */
size_t hash() const {return m_hash.val();} Hash hash() const {return m_hash;}
bool operator==(const ProjectPath& other) const {return m_hash == other.m_hash;} bool operator==(const ProjectPath& other) const {return m_hash == other.m_hash;}
bool operator!=(const ProjectPath& other) const {return m_hash != other.m_hash;} bool operator!=(const ProjectPath& other) const {return m_hash != other.m_hash;}
@ -961,7 +978,7 @@ template <> struct hash<HECL::FourCC>
template <> struct hash<HECL::ProjectPath> template <> struct hash<HECL::ProjectPath>
{ {
size_t operator()(const HECL::ProjectPath& val) const NOEXCEPT size_t operator()(const HECL::ProjectPath& val) const NOEXCEPT
{return val.hash();} {return val.hash().valSizeT();}
}; };
} }