mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01: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);
|
||||
|
||||
Visage::Visage() :
|
||||
#ifdef HAVE_VISAGE
|
||||
_leftInnerBrowIndex(0),
|
||||
_rightInnerBrowIndex(0),
|
||||
#endif
|
||||
_active(false),
|
||||
_headOrigin(DEFAULT_HEAD_ORIGIN),
|
||||
_estimatedEyePitch(0.0f),
|
||||
_estimatedEyeYaw(0.0f),
|
||||
_leftInnerBrowIndex(0),
|
||||
_rightInnerBrowIndex(0) {
|
||||
_estimatedEyeYaw(0.0f) {
|
||||
|
||||
#ifdef HAVE_VISAGE
|
||||
switchToResourcesParentIfRequired();
|
||||
|
@ -62,6 +64,7 @@ Visage::~Visage() {
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAVE_VISAGE
|
||||
static int leftEyeBlinkIndex = 0;
|
||||
static int rightEyeBlinkIndex = 1;
|
||||
static int centerBrowIndex = 16;
|
||||
|
@ -111,6 +114,7 @@ static const QHash<QByteArray, int>& getBlendshapeIndices() {
|
|||
static QHash<QByteArray, int> blendshapeIndices = createBlendshapeIndices();
|
||||
return blendshapeIndices;
|
||||
}
|
||||
#endif
|
||||
|
||||
const float TRANSLATION_SCALE = 20.0f;
|
||||
|
||||
|
|
|
@ -42,9 +42,14 @@ public:
|
|||
void reset();
|
||||
|
||||
private:
|
||||
|
||||
|
||||
#ifdef HAVE_VISAGE
|
||||
VisageSDK::VisageTracker2* _tracker;
|
||||
VisageSDK::FaceData* _data;
|
||||
int _leftInnerBrowIndex;
|
||||
int _rightInnerBrowIndex;
|
||||
QVector<int> _blendshapeIndices;
|
||||
#endif
|
||||
|
||||
bool _active;
|
||||
glm::quat _headRotation;
|
||||
|
@ -56,10 +61,6 @@ private:
|
|||
float _estimatedEyeYaw;
|
||||
|
||||
std::vector<float> _blendshapeCoefficients;
|
||||
|
||||
QVector<int> _blendshapeIndices;
|
||||
int _leftInnerBrowIndex;
|
||||
int _rightInnerBrowIndex;
|
||||
};
|
||||
|
||||
#endif /* defined(__interface__Visage__) */
|
||||
|
|
|
@ -421,6 +421,7 @@ void Model::setURL(const QUrl& url, const QUrl& fallback) {
|
|||
_dilatedTextures.clear();
|
||||
_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);
|
||||
}
|
||||
|
||||
|
|
|
@ -227,7 +227,7 @@ private:
|
|||
void deleteGeometry();
|
||||
void renderMeshes(float alpha, bool translucent);
|
||||
|
||||
QSharedPointer<NetworkGeometry> _baseGeometry;
|
||||
QSharedPointer<NetworkGeometry> _baseGeometry; ///< reference required to prevent collection of base
|
||||
float _lodHysteresis;
|
||||
|
||||
float _pupilDilation;
|
||||
|
|
Loading…
Reference in a new issue