mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Merge pull request #2028 from ey6es/master
Fixes for Xcode warnings without Visage, explanatory comment for Model's base geometry, left/right fixes.
This commit is contained in:
commit
2f5a021029
5 changed files with 22 additions and 18 deletions
|
@ -161,7 +161,7 @@ if (VISAGE_FOUND AND NOT DISABLE_VISAGE)
|
|||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-comment -isystem ${VISAGE_INCLUDE_DIRS}")
|
||||
find_library(AVFoundation AVFoundation)
|
||||
find_library(CoreMedia CoreMedia)
|
||||
find_library(NEW_STD_LIBRARY libc++abi.dylib /usr/lib/)
|
||||
find_library(NEW_STD_LIBRARY libc++.dylib /usr/lib/)
|
||||
target_link_libraries(${TARGET_NAME} ${AVFoundation} ${CoreMedia} ${NEW_STD_LIBRARY})
|
||||
endif (APPLE)
|
||||
target_link_libraries(${TARGET_NAME} ${VISAGE_LIBRARIES})
|
||||
|
|
|
@ -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;
|
||||
|
@ -74,14 +77,12 @@ static QHash<QByteArray, int> createBlendshapeIndices() {
|
|||
blendshapeMap.insert("JawOpen", "au_jaw_drop");
|
||||
blendshapeMap.insert("LipsLowerDown", "au_lower_lip_drop");
|
||||
blendshapeMap.insert("LipsUpperUp", "au_upper_lip_raiser");
|
||||
blendshapeMap.insert("LipsStretch_L", "au_lip_stretcher_left");
|
||||
blendshapeMap.insert("BrowsU_L", "au_left_outer_brow_raiser");
|
||||
blendshapeMap.insert("BrowsU_C", "au_left_inner_brow_raiser");
|
||||
blendshapeMap.insert("BrowsD_L", "au_left_brow_lowerer");
|
||||
blendshapeMap.insert("LipsStretch_R", "au_lip_stretcher_right");
|
||||
blendshapeMap.insert("BrowsU_R", "au_right_outer_brow_raiser");
|
||||
blendshapeMap.insert("BrowsU_C", "au_right_inner_brow_raiser");
|
||||
blendshapeMap.insert("BrowsD_R", "au_right_brow_lowerer");
|
||||
blendshapeMap.insert("LipsStretch_R", "au_lip_stretcher_left");
|
||||
blendshapeMap.insert("BrowsU_R", "au_left_outer_brow_raiser");
|
||||
blendshapeMap.insert("BrowsD_R", "au_left_brow_lowerer");
|
||||
blendshapeMap.insert("LipsStretch_L", "au_lip_stretcher_right");
|
||||
blendshapeMap.insert("BrowsU_L", "au_right_outer_brow_raiser");
|
||||
blendshapeMap.insert("BrowsD_L", "au_right_brow_lowerer");
|
||||
|
||||
QHash<QByteArray, int> blendshapeIndices;
|
||||
for (int i = 0;; i++) {
|
||||
|
@ -111,6 +112,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