Core/Misc: update g3dlite lib (#2904)
* Core/Misc: update g3dlite lib * update Co-authored-by: Francesco Borzì <borzifrancesco@gmail.com>
This commit is contained in:
Vendored
+27
-6
@@ -1,16 +1,18 @@
|
||||
/**
|
||||
@file GUniqueID.h
|
||||
@author Morgan McGuire, http://graphics.cs.williams.edu
|
||||
\file G3D/GUniqueID.h
|
||||
\author Morgan McGuire, http://graphics.cs.williams.edu
|
||||
*/
|
||||
#ifndef G3D_GUNIQUEID_H
|
||||
#define G3D_GUNIQUEID_H
|
||||
#ifndef G3D_GUniqueID_h
|
||||
#define G3D_GUniqueID_h
|
||||
|
||||
#include "G3D/platform.h"
|
||||
#include "G3D/g3dmath.h"
|
||||
#include "G3D/Table.h"
|
||||
|
||||
namespace G3D {
|
||||
|
||||
|
||||
class Any;
|
||||
|
||||
/** Globally unique identifiers. The probability of two different
|
||||
programs generating the same value from UniqueID::create is
|
||||
vanishingly small.
|
||||
@@ -25,8 +27,27 @@ private:
|
||||
|
||||
public:
|
||||
|
||||
/** \sa create */
|
||||
GUniqueID() : id(0) {}
|
||||
|
||||
GUniqueID& operator=(const Any& a);
|
||||
|
||||
/** \sa create */
|
||||
GUniqueID(const Any& a) {
|
||||
*this = a;
|
||||
}
|
||||
|
||||
Any toAny() const;
|
||||
|
||||
/** Returns a 16-character string equivalent to this GUniqueID's uint64 value. */
|
||||
std::string toString16() const;
|
||||
|
||||
static GUniqueID fromString16(const std::string& s);
|
||||
|
||||
/** Returns the ID that has the specified tag (so that it is not uninitialized), but
|
||||
which is a common sentinel "none" value. */
|
||||
static GUniqueID NONE(uint16 tag);
|
||||
|
||||
bool uninitialized() const {
|
||||
return id == 0;
|
||||
}
|
||||
@@ -37,7 +58,7 @@ public:
|
||||
|
||||
operator uint64() const {
|
||||
return id;
|
||||
}
|
||||
}
|
||||
|
||||
bool operator==(const GUniqueID& other) const {
|
||||
return id == other.id;
|
||||
|
||||
Reference in New Issue
Block a user