mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 05:17:02 +02:00
Working on Faceshift integration.
This commit is contained in:
parent
7c3bb4ecc4
commit
213a8fcd63
5 changed files with 57 additions and 1 deletions
44
cmake/modules/FindFaceshift.cmake
Normal file
44
cmake/modules/FindFaceshift.cmake
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
# Try to find the Faceshift networking library
|
||||||
|
#
|
||||||
|
# You must provide a FACESHIFT_ROOT_DIR which contains lib and include directories
|
||||||
|
#
|
||||||
|
# Once done this will define
|
||||||
|
#
|
||||||
|
# FACESHIFT_FOUND - system found Faceshift
|
||||||
|
# FACESHIFT_INCLUDE_DIRS - the Faceshift include directory
|
||||||
|
# FACESHIFT_LIBRARIES - Link this to use Faceshift
|
||||||
|
#
|
||||||
|
# Created on 8/30/2013 by Andrzej Kapolka
|
||||||
|
# Copyright (c) 2013 High Fidelity
|
||||||
|
#
|
||||||
|
|
||||||
|
if (FACESHIFT_LIBRARIES AND FACESHIFT_INCLUDE_DIRS)
|
||||||
|
# in cache already
|
||||||
|
set(FACESHIFT_FOUND TRUE)
|
||||||
|
else (FACESHIFT_LIBRARIES AND FACESHIFT_INCLUDE_DIRS)
|
||||||
|
find_path(FACESHIFT_INCLUDE_DIRS fsbinarystream.h ${FACESHIFT_ROOT_DIR}/include)
|
||||||
|
|
||||||
|
if (APPLE)
|
||||||
|
find_library(FACESHIFT_LIBRARIES libfaceshift.a ${FACESHIFT_ROOT_DIR}/lib/MacOS/)
|
||||||
|
elseif (UNIX)
|
||||||
|
find_library(FACESHIFT_LIBRARIES libfaceshift.a ${FACESHIFT_ROOT_DIR}/lib/UNIX/)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if (FACESHIFT_INCLUDE_DIRS AND FACESHIFT_LIBRARIES)
|
||||||
|
set(FACESHIFT_FOUND TRUE)
|
||||||
|
endif (FACESHIFT_INCLUDE_DIRS AND FACESHIFT_LIBRARIES)
|
||||||
|
|
||||||
|
if (FACESHIFT_FOUND)
|
||||||
|
if (NOT FACESHIFT_FIND_QUIETLY)
|
||||||
|
message(STATUS "Found Faceshift: ${FACESHIFT_LIBRARIES}")
|
||||||
|
endif (NOT FACESHIFT_FIND_QUIETLY)
|
||||||
|
else (FACESHIFT_FOUND)
|
||||||
|
if (FACESHIFT_FIND_REQUIRED)
|
||||||
|
message(FATAL_ERROR "Could not find Faceshift")
|
||||||
|
endif (FACESHIFT_FIND_REQUIRED)
|
||||||
|
endif (FACESHIFT_FOUND)
|
||||||
|
|
||||||
|
# show the FACESHIFT_INCLUDE_DIRS and FACESHIFT_LIBRARIES variables only in the advanced view
|
||||||
|
mark_as_advanced(FACESHIFT_INCLUDE_DIRS FACESHIFT_LIBRARIES)
|
||||||
|
|
||||||
|
endif (FACESHIFT_LIBRARIES AND FACESHIFT_INCLUDE_DIRS)
|
|
@ -38,7 +38,7 @@ configure_file(InterfaceConfig.h.in ${PROJECT_BINARY_DIR}/includes/InterfaceConf
|
||||||
|
|
||||||
# grab the implementation and header files from src dirs
|
# grab the implementation and header files from src dirs
|
||||||
file(GLOB INTERFACE_SRCS src/*.cpp src/*.h)
|
file(GLOB INTERFACE_SRCS src/*.cpp src/*.h)
|
||||||
foreach(SUBDIR avatar ui renderer)
|
foreach(SUBDIR avatar devices renderer ui)
|
||||||
file(GLOB SUBDIR_SRCS src/${SUBDIR}/*.cpp src/${SUBDIR}/*.h)
|
file(GLOB SUBDIR_SRCS src/${SUBDIR}/*.cpp src/${SUBDIR}/*.h)
|
||||||
set(INTERFACE_SRCS ${INTERFACE_SRCS} ${SUBDIR_SRCS})
|
set(INTERFACE_SRCS ${INTERFACE_SRCS} ${SUBDIR_SRCS})
|
||||||
endforeach(SUBDIR)
|
endforeach(SUBDIR)
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
#include "avatar/Avatar.h"
|
#include "avatar/Avatar.h"
|
||||||
#include "avatar/MyAvatar.h"
|
#include "avatar/MyAvatar.h"
|
||||||
#include "avatar/HandControl.h"
|
#include "avatar/HandControl.h"
|
||||||
|
#include "devices/Faceshift.h"
|
||||||
#include "renderer/AmbientOcclusionEffect.h"
|
#include "renderer/AmbientOcclusionEffect.h"
|
||||||
#include "renderer/GeometryCache.h"
|
#include "renderer/GeometryCache.h"
|
||||||
#include "renderer/GlowEffect.h"
|
#include "renderer/GlowEffect.h"
|
||||||
|
@ -117,6 +118,7 @@ public:
|
||||||
Environment* getEnvironment() { return &_environment; }
|
Environment* getEnvironment() { return &_environment; }
|
||||||
SerialInterface* getSerialHeadSensor() { return &_serialHeadSensor; }
|
SerialInterface* getSerialHeadSensor() { return &_serialHeadSensor; }
|
||||||
Webcam* getWebcam() { return &_webcam; }
|
Webcam* getWebcam() { return &_webcam; }
|
||||||
|
Faceshift* getFaceshift() { return &_faceshift; }
|
||||||
BandwidthMeter* getBandwidthMeter() { return &_bandwidthMeter; }
|
BandwidthMeter* getBandwidthMeter() { return &_bandwidthMeter; }
|
||||||
QSettings* getSettings() { return _settings; }
|
QSettings* getSettings() { return _settings; }
|
||||||
Swatch* getSwatch() { return &_swatch; }
|
Swatch* getSwatch() { return &_swatch; }
|
||||||
|
@ -259,6 +261,8 @@ private:
|
||||||
|
|
||||||
Webcam _webcam; // The webcam interface
|
Webcam _webcam; // The webcam interface
|
||||||
|
|
||||||
|
Faceshift _faceshift;
|
||||||
|
|
||||||
Camera _myCamera; // My view onto the world
|
Camera _myCamera; // My view onto the world
|
||||||
Camera _viewFrustumOffsetCamera; // The camera we use to sometimes show the view frustum from an offset mode
|
Camera _viewFrustumOffsetCamera; // The camera we use to sometimes show the view frustum from an offset mode
|
||||||
|
|
||||||
|
|
|
@ -360,6 +360,13 @@ Menu::Menu() :
|
||||||
appInstance->getWebcam()->getGrabber(),
|
appInstance->getWebcam()->getGrabber(),
|
||||||
SLOT(setDepthOnly(bool)));
|
SLOT(setDepthOnly(bool)));
|
||||||
|
|
||||||
|
addCheckableActionToQMenuAndActionHash(developerMenu,
|
||||||
|
MenuOption::Faceshift,
|
||||||
|
0,
|
||||||
|
false,
|
||||||
|
appInstance->getFaceshift(),
|
||||||
|
SLOT(setEnabled(bool)));
|
||||||
|
|
||||||
QMenu* audioDebugMenu = developerMenu->addMenu("Audio Debugging Tools");
|
QMenu* audioDebugMenu = developerMenu->addMenu("Audio Debugging Tools");
|
||||||
addCheckableActionToQMenuAndActionHash(audioDebugMenu, MenuOption::EchoAudio);
|
addCheckableActionToQMenuAndActionHash(audioDebugMenu, MenuOption::EchoAudio);
|
||||||
addActionToQMenuAndActionHash(audioDebugMenu,
|
addActionToQMenuAndActionHash(audioDebugMenu,
|
||||||
|
|
|
@ -133,6 +133,7 @@ namespace MenuOption {
|
||||||
const QString ExportVoxels = "Export Voxels";
|
const QString ExportVoxels = "Export Voxels";
|
||||||
const QString HeadMouse = "Head Mouse";
|
const QString HeadMouse = "Head Mouse";
|
||||||
const QString FaceMode = "Cycle Face Mode";
|
const QString FaceMode = "Cycle Face Mode";
|
||||||
|
const QString Faceshift = "Faceshift";
|
||||||
const QString FalseColorByDistance = "FALSE Color By Distance";
|
const QString FalseColorByDistance = "FALSE Color By Distance";
|
||||||
const QString FalseColorBySource = "FALSE Color By Source";
|
const QString FalseColorBySource = "FALSE Color By Source";
|
||||||
const QString FalseColorEveryOtherVoxel = "FALSE Color Every Other Randomly";
|
const QString FalseColorEveryOtherVoxel = "FALSE Color Every Other Randomly";
|
||||||
|
|
Loading…
Reference in a new issue