mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 11:41:17 +02:00
Fixes for Xcode warnings with no Visage, explanatory comments for Model's
base geometry pointer.
This commit is contained in:
parent
4c33296dc0
commit
f7fcbc234e
4 changed files with 15 additions and 9 deletions
|
@ -30,12 +30,14 @@ using namespace VisageSDK;
|
||||||
const glm::vec3 DEFAULT_HEAD_ORIGIN(0.0f, 0.0f, 0.7f);
|
const glm::vec3 DEFAULT_HEAD_ORIGIN(0.0f, 0.0f, 0.7f);
|
||||||
|
|
||||||
Visage::Visage() :
|
Visage::Visage() :
|
||||||
|
#ifdef HAVE_VISAGE
|
||||||
|
_leftInnerBrowIndex(0),
|
||||||
|
_rightInnerBrowIndex(0),
|
||||||
|
#endif
|
||||||
_active(false),
|
_active(false),
|
||||||
_headOrigin(DEFAULT_HEAD_ORIGIN),
|
_headOrigin(DEFAULT_HEAD_ORIGIN),
|
||||||
_estimatedEyePitch(0.0f),
|
_estimatedEyePitch(0.0f),
|
||||||
_estimatedEyeYaw(0.0f),
|
_estimatedEyeYaw(0.0f) {
|
||||||
_leftInnerBrowIndex(0),
|
|
||||||
_rightInnerBrowIndex(0) {
|
|
||||||
|
|
||||||
#ifdef HAVE_VISAGE
|
#ifdef HAVE_VISAGE
|
||||||
switchToResourcesParentIfRequired();
|
switchToResourcesParentIfRequired();
|
||||||
|
@ -62,6 +64,7 @@ Visage::~Visage() {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_VISAGE
|
||||||
static int leftEyeBlinkIndex = 0;
|
static int leftEyeBlinkIndex = 0;
|
||||||
static int rightEyeBlinkIndex = 1;
|
static int rightEyeBlinkIndex = 1;
|
||||||
static int centerBrowIndex = 16;
|
static int centerBrowIndex = 16;
|
||||||
|
@ -111,6 +114,7 @@ static const QHash<QByteArray, int>& getBlendshapeIndices() {
|
||||||
static QHash<QByteArray, int> blendshapeIndices = createBlendshapeIndices();
|
static QHash<QByteArray, int> blendshapeIndices = createBlendshapeIndices();
|
||||||
return blendshapeIndices;
|
return blendshapeIndices;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
const float TRANSLATION_SCALE = 20.0f;
|
const float TRANSLATION_SCALE = 20.0f;
|
||||||
|
|
||||||
|
|
|
@ -42,9 +42,14 @@ public:
|
||||||
void reset();
|
void reset();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
#ifdef HAVE_VISAGE
|
||||||
VisageSDK::VisageTracker2* _tracker;
|
VisageSDK::VisageTracker2* _tracker;
|
||||||
VisageSDK::FaceData* _data;
|
VisageSDK::FaceData* _data;
|
||||||
|
int _leftInnerBrowIndex;
|
||||||
|
int _rightInnerBrowIndex;
|
||||||
|
QVector<int> _blendshapeIndices;
|
||||||
|
#endif
|
||||||
|
|
||||||
bool _active;
|
bool _active;
|
||||||
glm::quat _headRotation;
|
glm::quat _headRotation;
|
||||||
|
@ -56,10 +61,6 @@ private:
|
||||||
float _estimatedEyeYaw;
|
float _estimatedEyeYaw;
|
||||||
|
|
||||||
std::vector<float> _blendshapeCoefficients;
|
std::vector<float> _blendshapeCoefficients;
|
||||||
|
|
||||||
QVector<int> _blendshapeIndices;
|
|
||||||
int _leftInnerBrowIndex;
|
|
||||||
int _rightInnerBrowIndex;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* defined(__interface__Visage__) */
|
#endif /* defined(__interface__Visage__) */
|
||||||
|
|
|
@ -421,6 +421,7 @@ void Model::setURL(const QUrl& url, const QUrl& fallback) {
|
||||||
_dilatedTextures.clear();
|
_dilatedTextures.clear();
|
||||||
_lodHysteresis = NetworkGeometry::NO_HYSTERESIS;
|
_lodHysteresis = NetworkGeometry::NO_HYSTERESIS;
|
||||||
|
|
||||||
|
// we retain a reference to the base geometry so that its reference count doesn't fall to zero
|
||||||
_baseGeometry = _geometry = Application::getInstance()->getGeometryCache()->getGeometry(url, fallback);
|
_baseGeometry = _geometry = Application::getInstance()->getGeometryCache()->getGeometry(url, fallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -227,7 +227,7 @@ private:
|
||||||
void deleteGeometry();
|
void deleteGeometry();
|
||||||
void renderMeshes(float alpha, bool translucent);
|
void renderMeshes(float alpha, bool translucent);
|
||||||
|
|
||||||
QSharedPointer<NetworkGeometry> _baseGeometry;
|
QSharedPointer<NetworkGeometry> _baseGeometry; ///< reference required to prevent collection of base
|
||||||
float _lodHysteresis;
|
float _lodHysteresis;
|
||||||
|
|
||||||
float _pupilDilation;
|
float _pupilDilation;
|
||||||
|
|
Loading…
Reference in a new issue