ofxFaceTracker and OF_USE_LEGACY_VECTOR_MATH

Hello,
I’m trying to build some of @kylemcdonald’s the ofxFaceTracker examples with of_v0.11.0; since the examples depend on various addons (e.g. ofxDelaunay) and they have not been updated to use new GLM syntax, I have set OF_USE_LEGACY_VECTOR_MATH=1 in ofConstants.h and re-build OF. However, I still get GLM related errors when I try to build, for instance, ‘example-cutout’:

/home/ali/Downloads/of_v0.11.0_linux64gcc6_release/apps/myApps/faceTracker_test01/src/ofApp.cpp:48:69: error: conversion from ‘ofVec3f’ to non-scalar type ‘glm::vec2 {aka glm::vec<2, float, (glm::qualifier)0>}’ requested
             glm::vec2 point = (outline[i] - position) * scaleFactor + position;
                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
/home/ali/Downloads/of_v0.11.0_linux64gcc6_release/apps/myApps/faceTracker_test01/src/ofApp.cpp:71:96: error: cannot convert ‘ofVec3f’ to ‘float’ in initialization
                 float distance = glm::distance(triangulated.getVertex(j), faceMesh.getVertex(i));
                                                                                                ^
/home/ali/Downloads/of_v0.11.0_linux64gcc6_release/apps/myApps/faceTracker_test01/src/ofApp.cpp:93:56: error: ‘class ofVec3f’ has no member named ‘xy’; did you mean ‘x’?
    finalMesh.addTexCoord(triangulated.getVertex(index).xy());
                                                        ^~

Has anyone faced issues like these?
Is the problem that I now have a mix of old and new syntax?

-Ali

Hey there, I don’t know if you got it solved but checking out the problem must be linked with the OF version, it says that from 0.10.1 and ahead it crashes… there is also the ofxFaceTracker2 but I havent managed to get this working either.

there is something about not recognicing the libs I had reinstalled all of them 1 by 1, I dont really know where is the problem with #include ofApp.h, #include ofMain.h or #include ofxFaceTracker2.h soomething is missing, im really a begginer but if anybody can help this would be great. this is for some media work

OfxFacetracker used an older version of OpenCV , this is no longer compatible with the version that comes with the current release of OF. if you want to use this addon you will need to use an older version of OF so you can compile against the older version of OpenCV. Other than that, the GLM compatibility is a simple fix, however the OpenCV version is much more complex and easiest solved by using an old version of OF.