mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 21:17:01 +02:00
Replace some QMap occurrences with QHash
This commit is contained in:
parent
d1136c2d3e
commit
58a6ac384e
3 changed files with 7 additions and 7 deletions
|
@ -1583,7 +1583,7 @@ bool GLTFSerializer::buildGeometry(HFMModel& hfmModel, const hifi::VariantHash&
|
||||||
&& fileTargetNames.contains("viseme_O")
|
&& fileTargetNames.contains("viseme_O")
|
||||||
&& fileTargetNames.contains("mouthShrugLower");
|
&& fileTargetNames.contains("mouthShrugLower");
|
||||||
if (blendshapeMappings.count() == 0 && likelyReadyPlayerMeFile) {
|
if (blendshapeMappings.count() == 0 && likelyReadyPlayerMeFile) {
|
||||||
QMap<QString, QPair<QString, float>>::const_iterator synonym
|
QHash<QString, QPair<QString, float>>::const_iterator synonym
|
||||||
= READYPLAYERME_BLENDSHAPES_MAP.constBegin();
|
= READYPLAYERME_BLENDSHAPES_MAP.constBegin();
|
||||||
while (synonym != READYPLAYERME_BLENDSHAPES_MAP.constEnd()) {
|
while (synonym != READYPLAYERME_BLENDSHAPES_MAP.constEnd()) {
|
||||||
if (fileTargetNames.contains(synonym.key())) {
|
if (fileTargetNames.contains(synonym.key())) {
|
||||||
|
|
|
@ -77,15 +77,15 @@ const char* BLENDSHAPE_NAMES[] = {
|
||||||
""
|
""
|
||||||
};
|
};
|
||||||
|
|
||||||
const QMap<QString, int> BLENDSHAPE_LOOKUP_MAP = [] {
|
const QHash<QString, int> BLENDSHAPE_LOOKUP_MAP = [] {
|
||||||
QMap<QString, int> toReturn;
|
QHash<QString, int> toReturn;
|
||||||
for (int i = 0; i < (int)Blendshapes::BlendshapeCount; i++) {
|
for (int i = 0; i < (int)Blendshapes::BlendshapeCount; i++) {
|
||||||
toReturn[BLENDSHAPE_NAMES[i]] = i;
|
toReturn[BLENDSHAPE_NAMES[i]] = i;
|
||||||
}
|
}
|
||||||
return toReturn;
|
return toReturn;
|
||||||
}();
|
}();
|
||||||
|
|
||||||
const QMap<QString, QPair<QString, float>> READYPLAYERME_BLENDSHAPES_MAP = {
|
const QHash<QString, QPair<QString, float>> READYPLAYERME_BLENDSHAPES_MAP = {
|
||||||
// ReadyPlayerMe blendshape default mapping.
|
// ReadyPlayerMe blendshape default mapping.
|
||||||
{ "mouthOpen", { "JawOpen", 1.0f } },
|
{ "mouthOpen", { "JawOpen", 1.0f } },
|
||||||
{ "eyeBlinkLeft", { "EyeBlink_L", 1.0f } },
|
{ "eyeBlinkLeft", { "EyeBlink_L", 1.0f } },
|
||||||
|
|
|
@ -12,15 +12,15 @@
|
||||||
#ifndef hifi_BlendshapeConstants_h
|
#ifndef hifi_BlendshapeConstants_h
|
||||||
#define hifi_BlendshapeConstants_h
|
#define hifi_BlendshapeConstants_h
|
||||||
|
|
||||||
#include <QMap>
|
#include <QHash>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
#include <glm/glm.hpp>
|
#include <glm/glm.hpp>
|
||||||
|
|
||||||
/// The names of the supported blendshapes, terminated with an empty string.
|
/// The names of the supported blendshapes, terminated with an empty string.
|
||||||
extern const char* BLENDSHAPE_NAMES[];
|
extern const char* BLENDSHAPE_NAMES[];
|
||||||
extern const QMap<QString, int> BLENDSHAPE_LOOKUP_MAP;
|
extern const QHash<QString, int> BLENDSHAPE_LOOKUP_MAP;
|
||||||
extern const QMap<QString, QPair<QString, float>> READYPLAYERME_BLENDSHAPES_MAP;
|
extern const QHash<QString, QPair<QString, float>> READYPLAYERME_BLENDSHAPES_MAP;
|
||||||
|
|
||||||
enum class Blendshapes : int {
|
enum class Blendshapes : int {
|
||||||
EyeBlink_L = 0,
|
EyeBlink_L = 0,
|
||||||
|
|
Loading…
Reference in a new issue