mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 12:14:00 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into editVoxels
This commit is contained in:
commit
ca0cd2d9d0
45 changed files with 625 additions and 428 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -39,7 +39,8 @@ interface/external/sixense/*
|
|||
# Ignore Visage
|
||||
interface/external/visage/*
|
||||
!interface/external/visage/readme.txt
|
||||
interface/resources/visage/
|
||||
interface/resources/visage/*
|
||||
!interface/resources/visage/tracker.cfg
|
||||
|
||||
# Ignore interfaceCache for Linux users
|
||||
interface/interfaceCache/
|
||||
interface/interfaceCache/
|
||||
|
|
28
BUILD.md
28
BUILD.md
|
@ -4,6 +4,7 @@ Dependencies
|
|||
* [Qt](http://qt-project.org/downloads) ~> 5.2.0
|
||||
* [zLib](http://www.zlib.net/) ~> 1.2.8
|
||||
* [glm](http://glm.g-truc.net/0.9.5/index.html) ~> 0.9.5.0
|
||||
* [qxmpp](https://code.google.com/p/qxmpp/) ~> 0.7.6
|
||||
|
||||
#####Linux only
|
||||
* [freeglut](http://freeglut.sourceforge.net/) ~> 2.8.0
|
||||
|
@ -53,9 +54,16 @@ Should you choose not to install Qt5 via a package manager that handles dependen
|
|||
#####Package Managers
|
||||
[Homebrew](http://brew.sh/) is an excellent package manager for OS X. It makes install of all hifi dependencies very simple.
|
||||
|
||||
brew install cmake qt5 glm zlib
|
||||
brew tap highfidelity/homebrew-formulas
|
||||
brew install cmake glm zlib
|
||||
brew install highfidelity/formulas/qt5
|
||||
brew link qt5 --force
|
||||
brew install highfidelity/formulas/qxmpp
|
||||
|
||||
We have a [homebrew formulas repository](https://github.com/highfidelity/homebrew-formulas) that you can use/tap to install some of the dependencies. In the code block above qt5 and qxmpp are installed from formulas in this repository.
|
||||
|
||||
*Our [qt5 homebrew formula](https://raw.github.com/highfidelity/homebrew-formulas/master/qt5.rb) is for a patched version of Qt 5.2.0 stable that removes wireless network scanning that can reduce real-time audio performance. We recommended you use this formula to install Qt.*
|
||||
|
||||
*High Fidelity has a [homebrew formula](https://raw.github.com/highfidelity/hifi/master/qt5.rb) for a patched version of Qt 5.2.0 stable that removes wireless network scanning that can reduce real-time audio performance. We recommended you use this formula to install Qt.*
|
||||
#####Xcode
|
||||
If Xcode is your editor of choice, you can ask CMake to generate Xcode project files instead of Unix Makefiles.
|
||||
|
||||
|
@ -94,7 +102,7 @@ NOTE: zLib should configure itself correctly on install. However, sometimes zLib
|
|||
####External Libraries
|
||||
We don't currently have a Windows installer, so before running Interface, you will need to ensure that all required resources are loadable.
|
||||
|
||||
CMake will need to know where the headers and libraries for required external dependencies are. If you installed ZLIB using the installer, the FindZLIB cmake module will be able to find it. This isn't the case for glm, freeglut, and GLEW.
|
||||
CMake will need to know where the headers and libraries for required external dependencies are. If you installed ZLIB using the installer, the FindZLIB cmake module will be able to find it. This isn't the case for the others.
|
||||
|
||||
You have the choice of setting a variable specific to each library, or having a folder using a defined structure that contains all of the libs.
|
||||
|
||||
|
@ -112,11 +120,14 @@ The recommended route is to place all of the dependencies in one place and set o
|
|||
-> bin
|
||||
-> include
|
||||
-> lib
|
||||
|
||||
For all three external libraries you should be able to simply copy the extracted folder that you get from the download links provided at the top of the guide. The `root_lib_dir` in the above example can be wherever you choose on your system - as long as the environment variable HIFI_LIB_DIR is set to it.
|
||||
-> qxmpp
|
||||
-> include
|
||||
-> lib
|
||||
|
||||
*NOTE: Be careful with glm. For the folder other libraries would normally call 'include', the folder containing the headers, glm opts to use 'glm'. You will have a glm folder nested inside the top-level glm folder.*
|
||||
|
||||
For many of the external libraries where precompiled binaries are readily available you should be able to simply copy the extracted folder that you get from the download links provided at the top of the guide. Otherwise you may need to build from source and install the built product to this directory. The `root_lib_dir` in the above example can be wherever you choose on your system - as long as the environment variable HIFI_LIB_DIR is set to it.
|
||||
|
||||
Should you want to define a location for each library, these are the associated variables you will want to set:
|
||||
|
||||
`GLM_ROOT_DIR, GLUT_ROOT_DIR, GLEW_ROOT_DIR`
|
||||
|
@ -125,8 +136,10 @@ They can be set in your ENV or by passing them to the cmake command on the comma
|
|||
|
||||
Each of those designates the root directory that contains the sub-folders for each library. For example, if the GLEW_ROOT_DIR is `C:\libs\glew`, then we would expect to find an `include` folder and a `lib` folder inside `C:\libs\glew`.
|
||||
|
||||
####Freeglut DLL
|
||||
As with the Qt libraries, you will need to make sure the directory containing `freeglut.dll` is in your path. The directory to add to your path in which the DLL is found is `FREEGLUT_DIR/bin`. If you are on 64-bit windows, the directory in your path should be the x64 subdirectory in `bin`.
|
||||
*NOTE: Qt does not support 64-bit builds on Windows 7, so you must use the 32-bit version of libraries for interface.exe to run. The 32-bit version of the static library is the one linked by our CMake find modules*
|
||||
|
||||
#### DLLs
|
||||
As with the Qt libraries, you will need to make sure the directory containing dynamically-linked libraries is in your path. For example, for a dynamically linked build of freeglut, the directory to add to your path in which the DLL is found is `FREEGLUT_DIR/bin`. Where possible, you can use static builds of the external dependencies to avoid this requirement.
|
||||
|
||||
####Building in Visual Studio
|
||||
Follow the same build steps from the CMake section, but pass a different generator to CMake.
|
||||
|
@ -136,7 +149,6 @@ Follow the same build steps from the CMake section, but pass a different generat
|
|||
####Running Interface
|
||||
If you need to debug Interface, you can run interface from within Visual Studio (see the section below). You can also run Interface by launching it from command line or File Explorer from $YOUR_HIFI_PATH\build\interface\Debug\interface.exe
|
||||
|
||||
|
||||
####Debugging Interface
|
||||
* In the Solution Explorer, right click interface and click Set as StartUp Project
|
||||
* Set the "Working Directory" for the Interface debugging sessions to the Debug output directory so that your application can load resources. Do this: right click interface and click Properties, choose Debugging from Configuration Properties, set Working Directory to .\Debug
|
||||
|
|
|
@ -364,7 +364,6 @@ float danceFloorGradientIncrement = 1.0f / FRAMES_PER_BEAT;
|
|||
const float DANCE_FLOOR_MAX_GRADIENT = 1.0f;
|
||||
const float DANCE_FLOOR_MIN_GRADIENT = 0.0f;
|
||||
const int DANCE_FLOOR_VOXELS_PER_PACKET = 100;
|
||||
const int PACKETS_PER_DANCE_FLOOR = DANCE_FLOOR_VOXELS_PER_PACKET / (DANCE_FLOOR_WIDTH * DANCE_FLOOR_LENGTH);
|
||||
int danceFloorColors[DANCE_FLOOR_WIDTH][DANCE_FLOOR_LENGTH];
|
||||
|
||||
void sendDanceFloor() {
|
||||
|
@ -467,8 +466,6 @@ const float BILLBOARD_MAX_GRADIENT = 1.0f;
|
|||
const float BILLBOARD_MIN_GRADIENT = 0.0f;
|
||||
const float BILLBOARD_LIGHT_SIZE = 0.125f / TREE_SCALE; // approximately 1/8 meter per light
|
||||
const int VOXELS_PER_PACKET = 81;
|
||||
const int PACKETS_PER_BILLBOARD = VOXELS_PER_PACKET / (BILLBOARD_HEIGHT * BILLBOARD_WIDTH);
|
||||
|
||||
|
||||
// top to bottom...
|
||||
bool billboardMessage[BILLBOARD_HEIGHT][BILLBOARD_WIDTH] = {
|
||||
|
@ -541,14 +538,12 @@ static void sendBillboard() {
|
|||
}
|
||||
|
||||
bool roadInitialized = false;
|
||||
const int ROAD_WIDTH_METERS = 3.0f;
|
||||
const int BRICKS_ACROSS_ROAD = 32;
|
||||
const float ROAD_BRICK_SIZE = 0.125f/TREE_SCALE; //(ROAD_WIDTH_METERS / TREE_SCALE) / BRICKS_ACROSS_ROAD; // in voxel units
|
||||
const int ROAD_LENGTH = 1.0f / ROAD_BRICK_SIZE; // in bricks
|
||||
const int ROAD_WIDTH = BRICKS_ACROSS_ROAD; // in bricks
|
||||
glm::vec3 roadPosition(0.5f - (ROAD_BRICK_SIZE * BRICKS_ACROSS_ROAD), 0.0f, 0.0f);
|
||||
const int BRICKS_PER_PACKET = 32; // guessing
|
||||
const int PACKETS_PER_ROAD = VOXELS_PER_PACKET / (ROAD_LENGTH * ROAD_WIDTH);
|
||||
|
||||
void doBuildStreet() {
|
||||
if (roadInitialized) {
|
||||
|
|
|
@ -15,7 +15,14 @@
|
|||
|
||||
OctreeQueryNode::OctreeQueryNode() :
|
||||
_viewSent(false),
|
||||
_octreePacket(new unsigned char[MAX_PACKET_SIZE]),
|
||||
_octreePacketAt(_octreePacket),
|
||||
_octreePacketAvailableBytes(MAX_PACKET_SIZE),
|
||||
_octreePacketWaiting(false),
|
||||
_lastOctreePacket(new unsigned char[MAX_PACKET_SIZE]),
|
||||
_lastOctreePacketLength(0),
|
||||
_duplicatePacketCount(0),
|
||||
_firstSuppressedPacket(usecTimestampNow()),
|
||||
_maxSearchLevel(1),
|
||||
_maxLevelReachedInLastSearch(1),
|
||||
_lastTimeBagEmpty(0),
|
||||
|
@ -27,14 +34,9 @@ OctreeQueryNode::OctreeQueryNode() :
|
|||
_lastClientBoundaryLevelAdjust(0),
|
||||
_lastClientOctreeSizeScale(DEFAULT_OCTREE_SIZE_SCALE),
|
||||
_lodChanged(false),
|
||||
_lodInitialized(false)
|
||||
_lodInitialized(false),
|
||||
_sequenceNumber(0)
|
||||
{
|
||||
_octreePacket = new unsigned char[MAX_PACKET_SIZE];
|
||||
_octreePacketAt = _octreePacket;
|
||||
_lastOctreePacket = new unsigned char[MAX_PACKET_SIZE];
|
||||
_lastOctreePacketLength = 0;
|
||||
_duplicatePacketCount = 0;
|
||||
_sequenceNumber = 0;
|
||||
}
|
||||
|
||||
OctreeQueryNode::~OctreeQueryNode() {
|
||||
|
|
|
@ -19,14 +19,8 @@ else ()
|
|||
set(WIN_GLEW_SEARCH_DIRS "${GLEW_ROOT_DIR}" "$ENV{GLEW_ROOT_DIR}" "$ENV{HIFI_LIB_DIR}/glew")
|
||||
|
||||
find_path(GLEW_INCLUDE_DIRS GL/glew.h PATH_SUFFIXES include HINTS ${WIN_GLEW_SEARCH_DIRS})
|
||||
|
||||
if (CMAKE_CL_64)
|
||||
set(WIN_ARCH_DIR "x64")
|
||||
else()
|
||||
set(WIN_ARCH_DIR "Win32")
|
||||
endif()
|
||||
|
||||
find_library(GLEW_LIBRARY glew32s PATH_SUFFIXES "lib/Release/${WIN_ARCH_DIR}" HINTS ${WIN_GLEW_SEARCH_DIRS})
|
||||
|
||||
find_library(GLEW_LIBRARY glew32s PATH_SUFFIXES "lib/Release/Win32" HINTS ${WIN_GLEW_SEARCH_DIRS})
|
||||
endif ()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
|
|
@ -17,12 +17,8 @@ else ()
|
|||
if (WIN32)
|
||||
set(WIN_GLUT_SEARCH_DIRS "${GLUT_ROOT_DIR}" "$ENV{GLUT_ROOT_DIR}" "$ENV{HIFI_LIB_DIR}/freeglut" "${OPENGL_INCLUDE_DIR}")
|
||||
find_path(GLUT_INCLUDE_DIR GL/glut.h PATH_SUFFIXES include HINTS ${WIN_GLUT_SEARCH_DIRS})
|
||||
|
||||
if (CMAKE_CL_64)
|
||||
set(WIN_ARCH_DIR "x64")
|
||||
endif()
|
||||
|
||||
find_library(GLUT_glut_LIBRARY freeglut PATH_SUFFIXES lib/${WIN_ARCH_DIR} HINTS ${WIN_GLUT_SEARCH_DIRS})
|
||||
|
||||
find_library(GLUT_glut_LIBRARY freeglut PATH_SUFFIXES lib HINTS ${WIN_GLUT_SEARCH_DIRS})
|
||||
else ()
|
||||
find_path(GLUT_INCLUDE_DIR GL/glut.h
|
||||
"${GLUT_LOCATION}/include"
|
||||
|
|
|
@ -36,26 +36,14 @@ else (LIBOVR_LIBRARIES AND LIBOVR_INCLUDE_DIRS)
|
|||
if (UDEV_LIBRARY AND XINERAMA_LIBRARY AND OVR_LIBRARY)
|
||||
set(LIBOVR_LIBRARIES "${OVR_LIBRARY};${UDEV_LIBRARY};${XINERAMA_LIBRARY}" CACHE INTERNAL "Oculus libraries")
|
||||
endif (UDEV_LIBRARY AND XINERAMA_LIBRARY AND OVR_LIBRARY)
|
||||
elseif (WIN32)
|
||||
if (CMAKE_CL_64)
|
||||
set(WINDOWS_ARCH_DIR "Win32")
|
||||
|
||||
if (CMAKE_BUILD_TYPE MATCHES DEBUG)
|
||||
set(WINDOWS_LIBOVR_NAME "libovrd.lib")
|
||||
else()
|
||||
set(WINDOWS_LIBOVR_NAME "libovr.lib")
|
||||
endif()
|
||||
elseif (WIN32)
|
||||
if (CMAKE_BUILD_TYPE MATCHES DEBUG)
|
||||
set(WINDOWS_LIBOVR_NAME "libovrd.lib")
|
||||
else()
|
||||
set(WINDOWS_ARCH_DIR "x64")
|
||||
|
||||
if (CMAKE_BUILD_TYPE MATCHES DEBUG)
|
||||
set(WINDOWS_LIBOVR_NAME "libovr64d.lib")
|
||||
else()
|
||||
set(WINDOWS_LIBOVR_NAME "libovr64.lib")
|
||||
endif()
|
||||
set(WINDOWS_LIBOVR_NAME "libovr.lib")
|
||||
endif()
|
||||
|
||||
find_library(LIBOVR_LIBRARIES "Lib/${WINDOWS_ARCH_DIR}/${LIBOVR_NAME}" HINTS ${LIBOVR_SEARCH_DIRS})
|
||||
find_library(LIBOVR_LIBRARIES "Lib/Win32/${LIBOVR_NAME}" HINTS ${LIBOVR_SEARCH_DIRS})
|
||||
endif ()
|
||||
|
||||
if (LIBOVR_INCLUDE_DIRS AND LIBOVR_LIBRARIES)
|
||||
|
|
|
@ -359,8 +359,6 @@ void DomainServer::addNodeToNodeListAndConfirmConnection(const QByteArray& packe
|
|||
sendDomainListToNode(newNode, senderSockAddr, nodeInterestListFromPacket(packet, numPreInterestBytes));
|
||||
}
|
||||
|
||||
const int NUM_BYTES_DATA_SERVER_REGISTRATION_TOKEN = 16;
|
||||
|
||||
int DomainServer::parseNodeDataFromByteArray(NodeType_t& nodeType, HifiSockAddr& publicSockAddr,
|
||||
HifiSockAddr& localSockAddr, const QByteArray& packet,
|
||||
const HifiSockAddr& senderSockAddr) {
|
||||
|
|
|
@ -993,13 +993,6 @@ function keyPressEvent(event) {
|
|||
}
|
||||
}
|
||||
|
||||
// do this even if not in edit tools
|
||||
if (event.text == " ") {
|
||||
// Reset my orientation!
|
||||
var orientation = { x:0, y:0, z:0, w:1 };
|
||||
Camera.setOrientation(orientation);
|
||||
MyAvatar.orientation = orientation;
|
||||
}
|
||||
trackKeyPressEvent(event); // used by preview support
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ elseif (WIN32)
|
|||
add_definitions( -D_USE_MATH_DEFINES ) # apparently needed to get M_PI and other defines from cmath/math.h
|
||||
add_definitions( -DWINDOWS_LEAN_AND_MEAN ) # needed to make sure windows doesn't go to crazy with its defines
|
||||
|
||||
set(GL_HEADERS "#define GLEW_STATIC\n#include <windowshacks.h>\n#include <GL/glew.h>\n#include <GL/glut.h>")
|
||||
set(GL_HEADERS "#include <windowshacks.h>\n#include <GL/glew.h>\n#include <GL/glut.h>")
|
||||
endif ()
|
||||
|
||||
# set up the external glm library
|
||||
|
|
4
interface/external/visage/readme.txt
vendored
4
interface/external/visage/readme.txt
vendored
|
@ -5,8 +5,8 @@ Andrzej Kapolka, February 11, 2014
|
|||
1. Copy the Visage sdk folders (lib, include, dependencies) into the interface/external/visage folder.
|
||||
This readme.txt should be there as well.
|
||||
|
||||
2. Copy the Visage configuration data folder (visageSDK-MacOS/Samples/MacOSX/data/) to interface/resources/visage
|
||||
(i.e., so that interface/resources/visage/candide3.wfm is accessible)
|
||||
2. Copy the contents of the Visage configuration data folder (visageSDK-MacOS/Samples/MacOSX/data/) to
|
||||
interface/resources/visage (i.e., so that interface/resources/visage/candide3.wfm is accessible)
|
||||
|
||||
3. Copy the Visage license file to interface/resources/visage/license.vlc.
|
||||
|
||||
|
|
334
interface/resources/visage/tracker.cfg
Normal file
334
interface/resources/visage/tracker.cfg
Normal file
|
@ -0,0 +1,334 @@
|
|||
display_width 800
|
||||
|
||||
max_init_image_width 800
|
||||
max_work_image_width 384
|
||||
fast_image_resize 1
|
||||
|
||||
camera_input 0
|
||||
camera_device 0
|
||||
camera_width 800
|
||||
camera_height 600
|
||||
camera_frame_rate 30
|
||||
camera_mirror 1
|
||||
camera_settings_dialog 0
|
||||
camera_auto_settings 0
|
||||
|
||||
video_file_sync 1
|
||||
|
||||
automatic_initialisation 1
|
||||
init_yaw_threshold 0.005
|
||||
init_roll_threshold 10
|
||||
init_velocity_threshold 0.015
|
||||
init_timeout 1000
|
||||
init_timeout_enable 6
|
||||
init_display_status 1
|
||||
recovery_timeout 800
|
||||
|
||||
display_video 1
|
||||
display_model_texture 0
|
||||
display_tri_mask 0
|
||||
display_model_wireframe 0
|
||||
display_results 1
|
||||
display_track_points 0
|
||||
|
||||
detect_strip_area_threshold 1000
|
||||
detect_strip_angle_threshold 0.15
|
||||
detect_strip_ratio_threshold 0.2
|
||||
detect_strip_perfect_ratio 6.848
|
||||
detect_strip_roi_y_offset 0
|
||||
detect_strip_roi_width 2
|
||||
detect_strip_roi_height 4
|
||||
|
||||
smoothing_factors
|
||||
150 15 -2 100 -1 50 50 0
|
||||
#translation rotation action_units eyebrows mouth gaze eye_closure other
|
||||
|
||||
process_eyes 1
|
||||
leye_closing_au 12
|
||||
reye_closing_au 12
|
||||
eye_h_rotation_au 15
|
||||
eye_v_rotation_au 16
|
||||
eye_points_coords
|
||||
162 1.0 0.0 0.0
|
||||
157 0.0 0.0 1.0
|
||||
|
||||
bdts_points_use
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
#3.5 3.6 3.7 3.8 3.11 3.12 8.1 8.2 8.3 8.4 9.1 9.2 9.3 4.1 4.2 4.3 4.4 4.5 4.6 2.1
|
||||
|
||||
bdts_points_angle
|
||||
0 0 20 -20 20 -20 0 0 20 -20 20 -20 0 25 -25 20 -20 20 -20 0 0
|
||||
|
||||
model_filename candide3-exp.wfm
|
||||
fdp_filename candide3.fdp
|
||||
bdts_data_path bdtsdata
|
||||
|
||||
au_use
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
#AU1 AU2 AU3 AU4 AU5 AU6 AU7 AU8 AU9 AU10 AU11 AU12 AU13 AU14 AU15 AU16 AU17 AU18 AU19 AU20 AU21 AU22 AU23
|
||||
|
||||
au_names
|
||||
au_nose_wrinkler
|
||||
au_jaw_z_push
|
||||
au_jaw_x_push
|
||||
au_jaw_drop
|
||||
au_lower_lip_drop
|
||||
au_upper_lip_raiser
|
||||
au_lip_stretcher_left
|
||||
au_lip_corner_depressor
|
||||
au_lip_presser
|
||||
au_left_outer_brow_raiser
|
||||
au_left_inner_brow_raiser
|
||||
au_left_brow_lowerer
|
||||
au_leye_closed
|
||||
au_lid_tightener
|
||||
au_upper_lid_raiser
|
||||
au_rotate_eyes_left
|
||||
au_rotate_eyes_down
|
||||
au_lower_lip_x_push
|
||||
au_lip_stretcher_right
|
||||
au_right_outer_brow_raiser
|
||||
au_right_inner_brow_raiser
|
||||
au_right_brow_lowerer
|
||||
au_reye_closed
|
||||
|
||||
|
||||
ekf_sensitivity
|
||||
100 100 100 100 100 100 100 100 100 100 100 200 200 100 100 400 400 100 100 100 100 300 300 100 100 400 400 100 100
|
||||
#x y z rx ry rz AU1 AU2 AU3 AU4 AU5 AU6 AU7 AU8 AU9 AU10 AU11 AU12 AU13 AU14 AU15 AU16 AU17 AU18 AU19 AU20 AU21 AU22 AU23
|
||||
|
||||
au_gravity
|
||||
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
#AU1 AU2 AU3 AU4 AU5 AU6 AU7 AU8 AU9 AU10 AU11 AU12 AU13 AU14 AU15 AU16 AU17 AU18 AU19 AU20 AU21 AU22 AU23
|
||||
|
||||
gravity_threshold 0.0
|
||||
|
||||
camera_focus 3
|
||||
|
||||
tex_size 512
|
||||
|
||||
ROI_num 14
|
||||
|
||||
#ROI 0 - nose region (setting default values)
|
||||
feature_points_num[0] 7
|
||||
feature_points_tri_use_num[0] 21
|
||||
feature_points_tri_use_list[0]
|
||||
48 154 54 55 152 45 46 47 103 109
|
||||
108 107 106 101 104 110 111 105 99 102
|
||||
100
|
||||
bound_rect_modifiers[0] -10 -10 -20 10
|
||||
feature_points_min_distance[0] 0.78125
|
||||
feature_point_block_size[0] 0.46875
|
||||
search_range[0] 4.0625 4.0625
|
||||
refine_range[0] 0.3125 0.3125
|
||||
patch_size[0] 4.6875
|
||||
match_method[0] 5
|
||||
bad_match_threshold[0] 0.35
|
||||
sensitivity_falloff[0] 10
|
||||
init_angle[0] 0
|
||||
feature_points_coords[0]
|
||||
97 0.18 0.54 0.28
|
||||
90 0.18 0.28 0.54
|
||||
51 0.76 0.09 0.15
|
||||
97 0.36 0.10 0.54
|
||||
90 0.36 0.54 0.10
|
||||
69 0.55 0.10 0.35
|
||||
67 0.55 0.35 0.10
|
||||
|
||||
#ROI 1 - left eyebrow region
|
||||
feature_points_num[1] 4
|
||||
feature_points_tri_use_num[1] 2
|
||||
feature_points_tri_use_list[1]
|
||||
25 26
|
||||
bound_rect_modifiers[1] 2 2 40 2
|
||||
feature_points_coords[1]
|
||||
25 0.0 0.0 1.0
|
||||
26 0.15 0.1 0.75
|
||||
25 1.0 0.0 0.0
|
||||
26 0.2 0.4 0.4
|
||||
|
||||
#ROI 2 - right eyebrow region
|
||||
feature_points_num[2] 4
|
||||
feature_points_tri_use_num[2] 2
|
||||
feature_points_tri_use_list[2]
|
||||
33 34
|
||||
bound_rect_modifiers[2] 2 2 40 2
|
||||
feature_points_coords[2]
|
||||
33 0.15 0.75 0.1
|
||||
34 1.0 0.0 0.0
|
||||
33 0.0 0.0 1.0
|
||||
33 0.2 0.4 0.4
|
||||
|
||||
#ROI 3 - left outer eye corner region
|
||||
feature_points_num[3] 3
|
||||
feature_points_tri_use_num[3] 4
|
||||
feature_points_tri_use_list[3]
|
||||
112 23 39 115
|
||||
bound_rect_modifiers[3] -5 -5 -25 -25
|
||||
feature_points_coords[3]
|
||||
23 0 0.2 0.8
|
||||
119 0.8351877 0.08414026 0.08067206
|
||||
116 0.3218788 0.4626164 0.2155048
|
||||
|
||||
#ROI 4 - right outer eye corner region
|
||||
feature_points_num[4] 3
|
||||
feature_points_tri_use_num[4] 4
|
||||
feature_points_tri_use_list[4]
|
||||
142 36 42 145
|
||||
bound_rect_modifiers[4] -5 -5 -25 -25
|
||||
feature_points_coords[4]
|
||||
36 0 0.8 0.2
|
||||
151 0.8566859 0.0405132 0.1028009
|
||||
146 0.2871178 0.3467231 0.366159
|
||||
|
||||
#ROI 5 - left inner eye corner region
|
||||
feature_points_num[5] 3
|
||||
feature_points_tri_use_num[5] 5
|
||||
feature_points_tri_use_list[5]
|
||||
122 28 99 100 125
|
||||
bound_rect_modifiers[5] -5 -5 -25 -40
|
||||
feature_points_coords[5]
|
||||
99 0.2 0.1 0.7
|
||||
122 0.2664618 0.3707059 0.3628323
|
||||
125 0.387767 0.4655813 0.1466517
|
||||
|
||||
#ROI 6 - right inner eye corner region
|
||||
feature_points_num[6] 3
|
||||
feature_points_tri_use_num[6] 5
|
||||
feature_points_tri_use_list[6]
|
||||
132 31 102 104 135
|
||||
bound_rect_modifiers[6] -5 -5 -25 -40
|
||||
feature_points_coords[6]
|
||||
102 0.2 0.7 0.1
|
||||
132 0.3673472 0.2426805 0.3899724
|
||||
135 0.2833096 0.1345753 0.5821151
|
||||
|
||||
#ROI 7 - lower lip region
|
||||
feature_points_num[7] 6
|
||||
feature_points_tri_use_num[7] 6
|
||||
feature_points_tri_use_list[7]
|
||||
79 80 82 84 52 53
|
||||
bound_rect_modifiers[7] 0 0 0 -80
|
||||
refine_range[7] 0.5 1
|
||||
patch_size[7] 7
|
||||
feature_points_coords[7]
|
||||
80 0.0 0.0 1.0
|
||||
80 1.0 0.0 0.0
|
||||
80 0.0 1.0 0.0
|
||||
79 0.0 0.0 1.0
|
||||
82 0.1 0.3 0.6
|
||||
84 0.1 0.6 0.3
|
||||
|
||||
#ROI 8 - upper lip region
|
||||
feature_points_num[8] 6
|
||||
feature_points_tri_use_num[8] 10
|
||||
feature_points_tri_use_list[8]
|
||||
69 49 155 51 50 153 44 67 57 60
|
||||
bound_rect_modifiers[8] 0 0 -70 0
|
||||
refine_range[8] 0.5 1
|
||||
patch_size[8] 7
|
||||
feature_points_coords[8]
|
||||
67 0.1 0.45 0.45
|
||||
69 0.1 0.45 0.45
|
||||
57 0.0 0.0 1.0
|
||||
60 0.0 1.0 0.0
|
||||
51 0.0 1.0 0.0
|
||||
51 0.3 0.7 0.0
|
||||
|
||||
#ROI 9 - left lip corner region
|
||||
feature_points_num[9] 4
|
||||
feature_points_tri_use_num[9] 4
|
||||
feature_points_tri_use_list[9]
|
||||
87 89 81 68
|
||||
bound_rect_modifiers[9] 0 0 -35 -35
|
||||
refine_range[9] 1 1
|
||||
patch_size[9] 7
|
||||
feature_points_coords[9]
|
||||
87 0.0 0.0 1.0
|
||||
87 0.2 0.0 0.8
|
||||
66 0.33 0.33 0.34
|
||||
72 0.33 0.33 0.34
|
||||
|
||||
#ROI 10 - right lip corner region
|
||||
feature_points_num[10] 4
|
||||
feature_points_tri_use_num[10] 4
|
||||
feature_points_tri_use_list[10]
|
||||
94 96 83 70
|
||||
bound_rect_modifiers[10] 0 0 -35 -35
|
||||
refine_range[10] 1 1
|
||||
patch_size[10] 7
|
||||
feature_points_coords[10]
|
||||
94 0.0 1.0 0.0
|
||||
94 0.2 0.8 0.0
|
||||
64 0.33 0.33 0.34
|
||||
78 0.33 0.33 0.34
|
||||
|
||||
#ROI 11 - jaw region
|
||||
feature_points_num[11] 4
|
||||
feature_points_tri_use_num[11] 2
|
||||
feature_points_tri_use_list[11]
|
||||
52 53
|
||||
bound_rect_modifiers[11] 0 0 -30 0
|
||||
refine_range[11] 0.5 1
|
||||
patch_size[11] 7
|
||||
bad_match_threshold[11] 0.6
|
||||
feature_points_coords[11]
|
||||
52 0.4 0.3 0.3
|
||||
53 0.4 0.3 0.3
|
||||
87 0.0 0.5 0.5
|
||||
94 0.0 0.5 0.5
|
||||
|
||||
feature_points_num[12] 6
|
||||
feature_points_tri_use_num[12] 3
|
||||
feature_points_tri_use_list[12]
|
||||
188 189 190 191
|
||||
bound_rect_modifiers[12] -30 0 0 -30
|
||||
init_angle[12] -20
|
||||
|
||||
feature_points_num[13] 6
|
||||
feature_points_tri_use_num[13] 3
|
||||
feature_points_tri_use_list[13]
|
||||
192 193 194 195
|
||||
bound_rect_modifiers[13] 0 -30 0 -30
|
||||
init_angle[13] 20
|
||||
|
||||
recovery_frames 4
|
||||
global_bad_match_threshold 0.5
|
||||
visibility_check 1
|
||||
|
||||
rotation_limit
|
||||
-1.570796 1.570796
|
||||
1.570796 4.712389
|
||||
-3.2 3.2
|
||||
|
||||
translation_limit
|
||||
-4 4
|
||||
-3 3
|
||||
0 11
|
||||
|
||||
action_unit_limit
|
||||
-0.5 0.5
|
||||
-0.5 0.5
|
||||
-1.0 1.0
|
||||
-0.05 1.2
|
||||
-0.05 1.5
|
||||
-0.05 1.5
|
||||
-1.0 1.0
|
||||
-1.5 1.5
|
||||
-1.5 1.5
|
||||
-1.5 2
|
||||
-1.5 2
|
||||
-1 1.5
|
||||
-2.8 2.8
|
||||
-1.5 1.5
|
||||
-1.5 1.5
|
||||
-100 100
|
||||
-100 100
|
||||
-1.5 1.5
|
||||
-1.5 1.5
|
||||
-1.5 1.5
|
||||
-1.5 1.5
|
||||
-1.5 1.5
|
||||
-2.8 2.8
|
||||
|
||||
|
|
@ -60,7 +60,7 @@
|
|||
#include <PerfStat.h>
|
||||
#include <ResourceCache.h>
|
||||
#include <UUID.h>
|
||||
#include <VoxelSceneStats.h>
|
||||
#include <OctreeSceneStats.h>
|
||||
#include <LocalVoxelsList.h>
|
||||
|
||||
#include "Application.h"
|
||||
|
@ -1138,7 +1138,6 @@ void Application::touchEndEvent(QTouchEvent* event) {
|
|||
|
||||
}
|
||||
|
||||
const bool USE_MOUSEWHEEL = false;
|
||||
void Application::wheelEvent(QWheelEvent* event) {
|
||||
|
||||
_controllerScriptingInterface.emitWheelEvent(event); // send events to any registered scripts
|
||||
|
@ -1327,7 +1326,6 @@ glm::vec3 Application::getMouseVoxelWorldCoordinates(const VoxelDetail& mouseVox
|
|||
(mouseVoxel.z + mouseVoxel.s / 2.f) * TREE_SCALE);
|
||||
}
|
||||
|
||||
const int MAXIMUM_EDIT_VOXEL_MESSAGE_SIZE = 1500;
|
||||
struct SendVoxelsOperationArgs {
|
||||
const unsigned char* newBaseOctCode;
|
||||
};
|
||||
|
@ -1607,8 +1605,6 @@ void Application::shrinkMirrorView() {
|
|||
}
|
||||
}
|
||||
|
||||
const float MAX_AVATAR_EDIT_VELOCITY = 1.0f;
|
||||
const float MAX_VOXEL_EDIT_DISTANCE = 50.0f;
|
||||
const float HEAD_SPHERE_RADIUS = 0.07f;
|
||||
|
||||
bool Application::isLookingAtMyAvatar(Avatar* avatar) {
|
||||
|
@ -1825,9 +1821,9 @@ void Application::updateDialogs(float deltaTime) {
|
|||
bandwidthDialog->update();
|
||||
}
|
||||
|
||||
VoxelStatsDialog* voxelStatsDialog = Menu::getInstance()->getVoxelStatsDialog();
|
||||
if (voxelStatsDialog) {
|
||||
voxelStatsDialog->update();
|
||||
OctreeStatsDialog* octreeStatsDialog = Menu::getInstance()->getOctreeStatsDialog();
|
||||
if (octreeStatsDialog) {
|
||||
octreeStatsDialog->update();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2733,9 +2729,9 @@ void Application::displayStats() {
|
|||
unsigned long totalNodes = 0;
|
||||
unsigned long totalInternal = 0;
|
||||
unsigned long totalLeaves = 0;
|
||||
for(NodeToVoxelSceneStatsIterator i = _octreeServerSceneStats.begin(); i != _octreeServerSceneStats.end(); i++) {
|
||||
for(NodeToOctreeSceneStatsIterator i = _octreeServerSceneStats.begin(); i != _octreeServerSceneStats.end(); i++) {
|
||||
//const QUuid& uuid = i->first;
|
||||
VoxelSceneStats& stats = i->second;
|
||||
OctreeSceneStats& stats = i->second;
|
||||
serverCount++;
|
||||
if (_statsExpanded) {
|
||||
if (serverCount > 1) {
|
||||
|
@ -3288,11 +3284,11 @@ void Application::nodeKilled(SharedNodePointer node) {
|
|||
}
|
||||
|
||||
// also clean up scene stats for that server
|
||||
_voxelSceneStatsLock.lockForWrite();
|
||||
_octreeSceneStatsLock.lockForWrite();
|
||||
if (_octreeServerSceneStats.find(nodeUUID) != _octreeServerSceneStats.end()) {
|
||||
_octreeServerSceneStats.erase(nodeUUID);
|
||||
}
|
||||
_voxelSceneStatsLock.unlock();
|
||||
_octreeSceneStatsLock.unlock();
|
||||
|
||||
} else if (node->getType() == NodeType::ParticleServer) {
|
||||
QUuid nodeUUID = node->getUUID();
|
||||
|
@ -3319,11 +3315,11 @@ void Application::nodeKilled(SharedNodePointer node) {
|
|||
}
|
||||
|
||||
// also clean up scene stats for that server
|
||||
_voxelSceneStatsLock.lockForWrite();
|
||||
_octreeSceneStatsLock.lockForWrite();
|
||||
if (_octreeServerSceneStats.find(nodeUUID) != _octreeServerSceneStats.end()) {
|
||||
_octreeServerSceneStats.erase(nodeUUID);
|
||||
}
|
||||
_voxelSceneStatsLock.unlock();
|
||||
_octreeSceneStatsLock.unlock();
|
||||
|
||||
} else if (node->getType() == NodeType::AvatarMixer) {
|
||||
// our avatar mixer has gone away - clear the hash of avatars
|
||||
|
@ -3338,12 +3334,12 @@ void Application::trackIncomingVoxelPacket(const QByteArray& packet, const Share
|
|||
QUuid nodeUUID = sendingNode->getUUID();
|
||||
|
||||
// now that we know the node ID, let's add these stats to the stats for that node...
|
||||
_voxelSceneStatsLock.lockForWrite();
|
||||
_octreeSceneStatsLock.lockForWrite();
|
||||
if (_octreeServerSceneStats.find(nodeUUID) != _octreeServerSceneStats.end()) {
|
||||
VoxelSceneStats& stats = _octreeServerSceneStats[nodeUUID];
|
||||
OctreeSceneStats& stats = _octreeServerSceneStats[nodeUUID];
|
||||
stats.trackIncomingOctreePacket(packet, wasStatsPacket, sendingNode->getClockSkewUsec());
|
||||
}
|
||||
_voxelSceneStatsLock.unlock();
|
||||
_octreeSceneStatsLock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3353,7 +3349,7 @@ int Application::parseOctreeStats(const QByteArray& packet, const SharedNodePoin
|
|||
|
||||
// parse the incoming stats datas stick it in a temporary object for now, while we
|
||||
// determine which server it belongs to
|
||||
VoxelSceneStats temp;
|
||||
OctreeSceneStats temp;
|
||||
int statsMessageLength = temp.unpackFromMessage(reinterpret_cast<const unsigned char*>(packet.data()), packet.size());
|
||||
|
||||
// quick fix for crash... why would voxelServer be NULL?
|
||||
|
@ -3361,14 +3357,14 @@ int Application::parseOctreeStats(const QByteArray& packet, const SharedNodePoin
|
|||
QUuid nodeUUID = sendingNode->getUUID();
|
||||
|
||||
// now that we know the node ID, let's add these stats to the stats for that node...
|
||||
_voxelSceneStatsLock.lockForWrite();
|
||||
_octreeSceneStatsLock.lockForWrite();
|
||||
if (_octreeServerSceneStats.find(nodeUUID) != _octreeServerSceneStats.end()) {
|
||||
_octreeServerSceneStats[nodeUUID].unpackFromMessage(reinterpret_cast<const unsigned char*>(packet.data()),
|
||||
packet.size());
|
||||
} else {
|
||||
_octreeServerSceneStats[nodeUUID] = temp;
|
||||
}
|
||||
_voxelSceneStatsLock.unlock();
|
||||
_octreeSceneStatsLock.unlock();
|
||||
|
||||
VoxelPositionSize rootDetails;
|
||||
voxelDetailsForCode(temp.getJurisdictionRoot(), rootDetails);
|
||||
|
@ -3397,8 +3393,8 @@ int Application::parseOctreeStats(const QByteArray& packet, const SharedNodePoin
|
|||
}
|
||||
// store jurisdiction details for later use
|
||||
// This is bit of fiddling is because JurisdictionMap assumes it is the owner of the values used to construct it
|
||||
// but VoxelSceneStats thinks it's just returning a reference to it's contents. So we need to make a copy of the
|
||||
// details from the VoxelSceneStats to construct the JurisdictionMap
|
||||
// but OctreeSceneStats thinks it's just returning a reference to it's contents. So we need to make a copy of the
|
||||
// details from the OctreeSceneStats to construct the JurisdictionMap
|
||||
JurisdictionMap jurisdictionMap;
|
||||
jurisdictionMap.copyContents(temp.getJurisdictionRoot(), temp.getJurisdictionEndNodes());
|
||||
(*jurisdiction)[nodeUUID] = jurisdictionMap;
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
#include "renderer/VoxelShader.h"
|
||||
#include "ui/BandwidthDialog.h"
|
||||
#include "ui/ChatEntry.h"
|
||||
#include "ui/VoxelStatsDialog.h"
|
||||
#include "ui/OctreeStatsDialog.h"
|
||||
#include "ui/RearMirrorTools.h"
|
||||
#include "ui/LodToolsDialog.h"
|
||||
#include "ui/LogDialog.h"
|
||||
|
@ -170,9 +170,9 @@ public:
|
|||
BandwidthMeter* getBandwidthMeter() { return &_bandwidthMeter; }
|
||||
QSettings* getSettings() { return _settings; }
|
||||
QMainWindow* getWindow() { return _window; }
|
||||
NodeToVoxelSceneStats* getOcteeSceneStats() { return &_octreeServerSceneStats; }
|
||||
void lockVoxelSceneStats() { _voxelSceneStatsLock.lockForRead(); }
|
||||
void unlockVoxelSceneStats() { _voxelSceneStatsLock.unlock(); }
|
||||
NodeToOctreeSceneStats* getOcteeSceneStats() { return &_octreeServerSceneStats; }
|
||||
void lockOctreeSceneStats() { _octreeSceneStatsLock.lockForRead(); }
|
||||
void unlockOctreeSceneStats() { _octreeSceneStatsLock.unlock(); }
|
||||
|
||||
QNetworkAccessManager* getNetworkAccessManager() { return _networkAccessManager; }
|
||||
GeometryCache* getGeometryCache() { return &_geometryCache; }
|
||||
|
@ -459,8 +459,8 @@ private:
|
|||
|
||||
NodeToJurisdictionMap _voxelServerJurisdictions;
|
||||
NodeToJurisdictionMap _particleServerJurisdictions;
|
||||
NodeToVoxelSceneStats _octreeServerSceneStats;
|
||||
QReadWriteLock _voxelSceneStatsLock;
|
||||
NodeToOctreeSceneStats _octreeServerSceneStats;
|
||||
QReadWriteLock _octreeSceneStatsLock;
|
||||
|
||||
std::vector<VoxelFade> _voxelFades;
|
||||
ControllerScriptingInterface _controllerScriptingInterface;
|
||||
|
|
|
@ -32,9 +32,6 @@
|
|||
#include "Menu.h"
|
||||
#include "Util.h"
|
||||
|
||||
static const float JITTER_BUFFER_LENGTH_MSECS = 12;
|
||||
static const short JITTER_BUFFER_SAMPLES = JITTER_BUFFER_LENGTH_MSECS * NUM_AUDIO_CHANNELS * (SAMPLE_RATE / 1000.0);
|
||||
|
||||
static const float AUDIO_CALLBACK_MSECS = (float) NETWORK_BUFFER_LENGTH_SAMPLES_PER_CHANNEL / (float)SAMPLE_RATE * 1000.0;
|
||||
|
||||
static const int NUMBER_OF_NOISE_SAMPLE_FRAMES = 300;
|
||||
|
|
|
@ -66,7 +66,7 @@ Menu::Menu() :
|
|||
_faceshiftEyeDeflection(DEFAULT_FACESHIFT_EYE_DEFLECTION),
|
||||
_frustumDrawMode(FRUSTUM_DRAW_MODE_ALL),
|
||||
_viewFrustumOffset(DEFAULT_FRUSTUM_OFFSET),
|
||||
_voxelStatsDialog(NULL),
|
||||
_octreeStatsDialog(NULL),
|
||||
_lodToolsDialog(NULL),
|
||||
_maxVoxels(DEFAULT_MAX_VOXELS_PER_SYSTEM),
|
||||
_voxelSizeScale(DEFAULT_OCTREE_SIZE_SCALE),
|
||||
|
@ -213,7 +213,7 @@ Menu::Menu() :
|
|||
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::Oscilloscope, 0, true);
|
||||
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::Bandwidth, 0, true);
|
||||
addActionToQMenuAndActionHash(viewMenu, MenuOption::BandwidthDetails, 0, this, SLOT(bandwidthDetails()));
|
||||
addActionToQMenuAndActionHash(viewMenu, MenuOption::VoxelStats, 0, this, SLOT(voxelStatsDetails()));
|
||||
addActionToQMenuAndActionHash(viewMenu, MenuOption::OctreeStats, 0, this, SLOT(octreeStatsDetails()));
|
||||
|
||||
QMenu* developerMenu = addMenu("Developer");
|
||||
|
||||
|
@ -341,7 +341,7 @@ Menu::Menu() :
|
|||
|
||||
Menu::~Menu() {
|
||||
bandwidthDetailsClosed();
|
||||
voxelStatsDetailsClosed();
|
||||
octreeStatsDetailsClosed();
|
||||
}
|
||||
|
||||
void Menu::loadSettings(QSettings* settings) {
|
||||
|
@ -1033,20 +1033,20 @@ void Menu::bandwidthDetailsClosed() {
|
|||
}
|
||||
}
|
||||
|
||||
void Menu::voxelStatsDetails() {
|
||||
if (!_voxelStatsDialog) {
|
||||
_voxelStatsDialog = new VoxelStatsDialog(Application::getInstance()->getGLWidget(),
|
||||
void Menu::octreeStatsDetails() {
|
||||
if (!_octreeStatsDialog) {
|
||||
_octreeStatsDialog = new OctreeStatsDialog(Application::getInstance()->getGLWidget(),
|
||||
Application::getInstance()->getOcteeSceneStats());
|
||||
connect(_voxelStatsDialog, SIGNAL(closed()), SLOT(voxelStatsDetailsClosed()));
|
||||
_voxelStatsDialog->show();
|
||||
connect(_octreeStatsDialog, SIGNAL(closed()), SLOT(octreeStatsDetailsClosed()));
|
||||
_octreeStatsDialog->show();
|
||||
}
|
||||
_voxelStatsDialog->raise();
|
||||
_octreeStatsDialog->raise();
|
||||
}
|
||||
|
||||
void Menu::voxelStatsDetailsClosed() {
|
||||
if (_voxelStatsDialog) {
|
||||
delete _voxelStatsDialog;
|
||||
_voxelStatsDialog = NULL;
|
||||
void Menu::octreeStatsDetailsClosed() {
|
||||
if (_octreeStatsDialog) {
|
||||
delete _octreeStatsDialog;
|
||||
_octreeStatsDialog = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ class QSettings;
|
|||
class BandwidthDialog;
|
||||
class LodToolsDialog;
|
||||
class MetavoxelEditor;
|
||||
class VoxelStatsDialog;
|
||||
class OctreeStatsDialog;
|
||||
class MenuItemProperties;
|
||||
|
||||
class Menu : public QMenuBar {
|
||||
|
@ -73,7 +73,7 @@ public:
|
|||
BandwidthDialog* getBandwidthDialog() const { return _bandwidthDialog; }
|
||||
FrustumDrawMode getFrustumDrawMode() const { return _frustumDrawMode; }
|
||||
ViewFrustumOffset getViewFrustumOffset() const { return _viewFrustumOffset; }
|
||||
VoxelStatsDialog* getVoxelStatsDialog() const { return _voxelStatsDialog; }
|
||||
OctreeStatsDialog* getOctreeStatsDialog() const { return _octreeStatsDialog; }
|
||||
LodToolsDialog* getLodToolsDialog() const { return _lodToolsDialog; }
|
||||
int getMaxVoxels() const { return _maxVoxels; }
|
||||
QAction* getUseVoxelShader() const { return _useVoxelShader; }
|
||||
|
@ -111,7 +111,7 @@ public slots:
|
|||
|
||||
void loginForCurrentDomain();
|
||||
void bandwidthDetails();
|
||||
void voxelStatsDetails();
|
||||
void octreeStatsDetails();
|
||||
void lodTools();
|
||||
void loadSettings(QSettings* settings = NULL);
|
||||
void saveSettings(QSettings* settings = NULL);
|
||||
|
@ -135,7 +135,7 @@ private slots:
|
|||
void goToDomainDialog();
|
||||
void goToLocation();
|
||||
void bandwidthDetailsClosed();
|
||||
void voxelStatsDetailsClosed();
|
||||
void octreeStatsDetailsClosed();
|
||||
void lodToolsClosed();
|
||||
void cycleFrustumRenderMode();
|
||||
void runTests();
|
||||
|
@ -187,7 +187,7 @@ private:
|
|||
FrustumDrawMode _frustumDrawMode;
|
||||
ViewFrustumOffset _viewFrustumOffset;
|
||||
QPointer<MetavoxelEditor> _MetavoxelEditor;
|
||||
VoxelStatsDialog* _voxelStatsDialog;
|
||||
OctreeStatsDialog* _octreeStatsDialog;
|
||||
LodToolsDialog* _lodToolsDialog;
|
||||
int _maxVoxels;
|
||||
float _voxelSizeScale;
|
||||
|
@ -286,7 +286,7 @@ namespace MenuOption {
|
|||
const QString Quit = "Quit";
|
||||
const QString Voxels = "Voxels";
|
||||
const QString VoxelMode = "Cycle Voxel Mode";
|
||||
const QString VoxelStats = "Voxel Stats";
|
||||
const QString OctreeStats = "Voxel and Particle Statistics";
|
||||
const QString VoxelTextures = "Voxel Textures";
|
||||
}
|
||||
|
||||
|
|
|
@ -31,28 +31,6 @@
|
|||
using namespace std;
|
||||
|
||||
const glm::vec3 DEFAULT_UP_DIRECTION(0.0f, 1.0f, 0.0f);
|
||||
const float YAW_MAG = 500.0f;
|
||||
const float MY_HAND_HOLDING_PULL = 0.2f;
|
||||
const float YOUR_HAND_HOLDING_PULL = 1.0f;
|
||||
const float BODY_SPRING_DEFAULT_TIGHTNESS = 1000.0f;
|
||||
const float BODY_SPRING_FORCE = 300.0f;
|
||||
const float BODY_SPRING_DECAY = 16.0f;
|
||||
const float COLLISION_RADIUS_SCALAR = 1.2f; // pertains to avatar-to-avatar collisions
|
||||
const float COLLISION_BODY_FORCE = 30.0f; // pertains to avatar-to-avatar collisions
|
||||
const float HEAD_ROTATION_SCALE = 0.70f;
|
||||
const float HEAD_ROLL_SCALE = 0.40f;
|
||||
const float HEAD_MAX_PITCH = 45;
|
||||
const float HEAD_MIN_PITCH = -45;
|
||||
const float HEAD_MAX_YAW = 85;
|
||||
const float HEAD_MIN_YAW = -85;
|
||||
const float AVATAR_BRAKING_STRENGTH = 40.0f;
|
||||
const float MOUSE_RAY_TOUCH_RANGE = 0.01f;
|
||||
const float FLOATING_HEIGHT = 0.13f;
|
||||
const bool USING_HEAD_LEAN = false;
|
||||
const float LEAN_SENSITIVITY = 0.15f;
|
||||
const float LEAN_MAX = 0.45f;
|
||||
const float LEAN_AVERAGING = 10.0f;
|
||||
const float HEAD_RATE_MAX = 50.f;
|
||||
const int NUM_BODY_CONE_SIDES = 9;
|
||||
const float CHAT_MESSAGE_SCALE = 0.0015f;
|
||||
const float CHAT_MESSAGE_HEIGHT = 0.1f;
|
||||
|
|
|
@ -37,12 +37,7 @@ const glm::vec3 DEFAULT_UP_DIRECTION(0.0f, 1.0f, 0.0f);
|
|||
const float YAW_MAG = 500.0f;
|
||||
const float PITCH_MAG = 100.0f;
|
||||
const float COLLISION_RADIUS_SCALAR = 1.2f; // pertains to avatar-to-avatar collisions
|
||||
const float COLLISION_BODY_FORCE = 30.0f; // pertains to avatar-to-avatar collisions
|
||||
const float COLLISION_RADIUS_SCALE = 0.125f;
|
||||
const float MOUSE_RAY_TOUCH_RANGE = 0.01f;
|
||||
const bool USING_HEAD_LEAN = false;
|
||||
const float SKIN_COLOR[] = {1.0f, 0.84f, 0.66f};
|
||||
const float DARK_SKIN_COLOR[] = {0.9f, 0.78f, 0.63f};
|
||||
|
||||
const float DATA_SERVER_LOCATION_CHANGE_UPDATE_MSECS = 5 * 1000;
|
||||
|
||||
|
@ -329,8 +324,6 @@ void MyAvatar::simulate(float deltaTime) {
|
|||
maybeUpdateBillboard();
|
||||
}
|
||||
|
||||
const float MAX_PITCH = 90.0f;
|
||||
|
||||
// Update avatar head rotation with sensor data
|
||||
void MyAvatar::updateFromGyros(float deltaTime) {
|
||||
Faceshift* faceshift = Application::getInstance()->getFaceshift();
|
||||
|
|
|
@ -38,7 +38,7 @@ Visage::Visage() :
|
|||
#ifdef HAVE_VISAGE
|
||||
QByteArray licensePath = Application::resourcesPath() + "visage/license.vlc";
|
||||
initializeLicenseManager(licensePath.data());
|
||||
_tracker = new VisageTracker2(Application::resourcesPath() + "visage/Facial Features Tracker - Asymmetric.cfg");
|
||||
_tracker = new VisageTracker2(Application::resourcesPath() + "visage/tracker.cfg");
|
||||
if (_tracker->trackFromCam()) {
|
||||
_data = new FaceData();
|
||||
|
||||
|
@ -65,29 +65,25 @@ static int rightEyeBlinkIndex = 1;
|
|||
|
||||
static QMultiHash<QByteArray, QPair<int, float> > createActionUnitNameMap() {
|
||||
QMultiHash<QByteArray, QPair<QByteArray, float> > blendshapeMap;
|
||||
blendshapeMap.insert("Sneer", QPair<QByteArray, float>("au_nose_wrinkler", 1.0f));
|
||||
blendshapeMap.insert("JawFwd", QPair<QByteArray, float>("au_jaw_z_push", 1.0f));
|
||||
blendshapeMap.insert("JawLeft", QPair<QByteArray, float>("au_jaw_x_push", 1.0f));
|
||||
blendshapeMap.insert("JawOpen", QPair<QByteArray, float>("au_jaw_drop", 1.0f));
|
||||
blendshapeMap.insert("LipsLowerDown", QPair<QByteArray, float>("au_lower_lip_drop", 1.0f));
|
||||
blendshapeMap.insert("LipsUpperUp", QPair<QByteArray, float>("au_upper_lip_raiser", 1.0f));
|
||||
blendshapeMap.insert("LipsStretch_R", QPair<QByteArray, float>("au_lip_stretcher_left", 1.0f));
|
||||
blendshapeMap.insert("LipsUpperOpen", QPair<QByteArray, float>("au_upper_lip_raiser", 1.0f));
|
||||
blendshapeMap.insert("LipsStretch_R", QPair<QByteArray, float>("au_lip_stretcher_left", 0.5f));
|
||||
blendshapeMap.insert("MouthSmile_L", QPair<QByteArray, float>("au_lip_corner_depressor", -1.0f));
|
||||
blendshapeMap.insert("MouthSmile_R", QPair<QByteArray, float>("au_lip_corner_depressor", -1.0f));
|
||||
blendshapeMap.insert("LipsPucker", QPair<QByteArray, float>("au_lip_presser", 0.0f));
|
||||
blendshapeMap.insert("BrowsU_R", QPair<QByteArray, float>("au_left_outer_brow_raiser", 1.0f));
|
||||
blendshapeMap.insert("BrowsU_C", QPair<QByteArray, float>("au_left_inner_brow_raiser", 0.5f));
|
||||
blendshapeMap.insert("BrowsU_C", QPair<QByteArray, float>("au_left_inner_brow_raiser", 1.0f));
|
||||
blendshapeMap.insert("BrowsD_R", QPair<QByteArray, float>("au_left_brow_lowerer", 1.0f));
|
||||
blendshapeMap.insert("EyeBlink_L", QPair<QByteArray, float>("au_leye_closed", 1.0f));
|
||||
blendshapeMap.insert("EyeBlink_R", QPair<QByteArray, float>("au_leye_closed", 1.0f));
|
||||
blendshapeMap.insert("EyeSquint_L", QPair<QByteArray, float>("au_lid_tightener", 1.0f));
|
||||
blendshapeMap.insert("EyeSquint_R", QPair<QByteArray, float>("au_lid_tightener", 1.0f));
|
||||
blendshapeMap.insert("EyeBlink_R", QPair<QByteArray, float>("au_reye_closed", 1.0f));
|
||||
blendshapeMap.insert("EyeOpen_L", QPair<QByteArray, float>("au_upper_lid_raiser", 1.0f));
|
||||
blendshapeMap.insert("EyeOpen_R", QPair<QByteArray, float>("au_upper_lid_raiser", 1.0f));
|
||||
blendshapeMap.insert("MouthLeft", QPair<QByteArray, float>("au_lower_lip_x_push", 0.0f));
|
||||
blendshapeMap.insert("LipsStretch_L", QPair<QByteArray, float>("au_lip_stretcher_right", 1.0f));
|
||||
blendshapeMap.insert("LipLowerOpen", QPair<QByteArray, float>("au_lower_lip_x_push", 1.0f));
|
||||
blendshapeMap.insert("LipsStretch_L", QPair<QByteArray, float>("au_lip_stretcher_right", 0.5f));
|
||||
blendshapeMap.insert("BrowsU_L", QPair<QByteArray, float>("au_right_outer_brow_raiser", 1.0f));
|
||||
blendshapeMap.insert("BrowsU_C", QPair<QByteArray, float>("au_right_inner_brow_raiser", 0.5f));
|
||||
blendshapeMap.insert("BrowsU_C", QPair<QByteArray, float>("au_right_inner_brow_raiser", 1.0f));
|
||||
blendshapeMap.insert("BrowsD_L", QPair<QByteArray, float>("au_right_brow_lowerer", 1.0f));
|
||||
|
||||
QMultiHash<QByteArray, QPair<int, float> > actionUnitNameMap;
|
||||
|
|
|
@ -294,7 +294,8 @@ QSharedPointer<NetworkGeometry> GeometryCache::getGeometry(const QUrl& url, cons
|
|||
QSharedPointer<Resource> GeometryCache::createResource(const QUrl& url,
|
||||
const QSharedPointer<Resource>& fallback, bool delayLoad, const void* extra) {
|
||||
|
||||
QSharedPointer<NetworkGeometry> geometry(new NetworkGeometry(url, fallback.staticCast<NetworkGeometry>(), delayLoad));
|
||||
QSharedPointer<NetworkGeometry> geometry(new NetworkGeometry(url, fallback.staticCast<NetworkGeometry>(), delayLoad),
|
||||
&Resource::allReferencesCleared);
|
||||
geometry->setLODParent(geometry);
|
||||
return geometry.staticCast<Resource>();
|
||||
}
|
||||
|
@ -536,6 +537,15 @@ void NetworkGeometry::downloadFinished(QNetworkReply* reply) {
|
|||
QThreadPool::globalInstance()->start(new GeometryReader(_self, url, reply, _mapping));
|
||||
}
|
||||
|
||||
void NetworkGeometry::reinsert() {
|
||||
Resource::reinsert();
|
||||
|
||||
_lodParent = qWeakPointerCast<NetworkGeometry, Resource>(_self);
|
||||
foreach (const QSharedPointer<NetworkGeometry>& lod, _lods) {
|
||||
lod->setLODParent(_lodParent);
|
||||
}
|
||||
}
|
||||
|
||||
void NetworkGeometry::setGeometry(const FBXGeometry& geometry) {
|
||||
_geometry = geometry;
|
||||
|
||||
|
|
|
@ -89,6 +89,7 @@ public:
|
|||
protected:
|
||||
|
||||
virtual void downloadFinished(QNetworkReply* reply);
|
||||
virtual void reinsert();
|
||||
|
||||
Q_INVOKABLE void setGeometry(const FBXGeometry& geometry);
|
||||
|
||||
|
|
|
@ -128,9 +128,12 @@ QSharedPointer<NetworkTexture> TextureCache::getTexture(const QUrl& url, bool no
|
|||
}
|
||||
QSharedPointer<NetworkTexture> texture = _dilatableNetworkTextures.value(url);
|
||||
if (texture.isNull()) {
|
||||
texture = QSharedPointer<NetworkTexture>(new DilatableNetworkTexture(url));
|
||||
texture = QSharedPointer<NetworkTexture>(new DilatableNetworkTexture(url), &Resource::allReferencesCleared);
|
||||
texture->setSelf(texture);
|
||||
texture->setCache(this);
|
||||
_dilatableNetworkTextures.insert(url, texture);
|
||||
} else {
|
||||
_unusedResources.remove(texture->getLRUKey());
|
||||
}
|
||||
return texture;
|
||||
}
|
||||
|
@ -229,7 +232,7 @@ bool TextureCache::eventFilter(QObject* watched, QEvent* event) {
|
|||
|
||||
QSharedPointer<Resource> TextureCache::createResource(const QUrl& url,
|
||||
const QSharedPointer<Resource>& fallback, bool delayLoad, const void* extra) {
|
||||
return QSharedPointer<Resource>(new NetworkTexture(url, *(const bool*)extra));
|
||||
return QSharedPointer<Resource>(new NetworkTexture(url, *(const bool*)extra), &Resource::allReferencesCleared);
|
||||
}
|
||||
|
||||
QOpenGLFramebufferObject* TextureCache::createFramebufferObject() {
|
||||
|
@ -352,26 +355,6 @@ DilatableNetworkTexture::DilatableNetworkTexture(const QUrl& url) :
|
|||
{
|
||||
}
|
||||
|
||||
void DilatableNetworkTexture::imageLoaded(const QImage& image) {
|
||||
_image = image;
|
||||
|
||||
// scan out from the center to find inner and outer radii
|
||||
int halfWidth = image.width() / 2;
|
||||
int halfHeight = image.height() / 2;
|
||||
const int BLACK_THRESHOLD = 32;
|
||||
while (_innerRadius < halfWidth && qGray(image.pixel(halfWidth + _innerRadius, halfHeight)) < BLACK_THRESHOLD) {
|
||||
_innerRadius++;
|
||||
}
|
||||
_outerRadius = _innerRadius;
|
||||
const int TRANSPARENT_THRESHOLD = 32;
|
||||
while (_outerRadius < halfWidth && qAlpha(image.pixel(halfWidth + _outerRadius, halfHeight)) > TRANSPARENT_THRESHOLD) {
|
||||
_outerRadius++;
|
||||
}
|
||||
|
||||
// clear out any textures we generated before loading
|
||||
_dilatedTextures.clear();
|
||||
}
|
||||
|
||||
QSharedPointer<Texture> DilatableNetworkTexture::getDilatedTexture(float dilation) {
|
||||
QSharedPointer<Texture> texture = _dilatedTextures.value(dilation);
|
||||
if (texture.isNull()) {
|
||||
|
@ -400,3 +383,28 @@ QSharedPointer<Texture> DilatableNetworkTexture::getDilatedTexture(float dilatio
|
|||
return texture;
|
||||
}
|
||||
|
||||
void DilatableNetworkTexture::imageLoaded(const QImage& image) {
|
||||
_image = image;
|
||||
|
||||
// scan out from the center to find inner and outer radii
|
||||
int halfWidth = image.width() / 2;
|
||||
int halfHeight = image.height() / 2;
|
||||
const int BLACK_THRESHOLD = 32;
|
||||
while (_innerRadius < halfWidth && qGray(image.pixel(halfWidth + _innerRadius, halfHeight)) < BLACK_THRESHOLD) {
|
||||
_innerRadius++;
|
||||
}
|
||||
_outerRadius = _innerRadius;
|
||||
const int TRANSPARENT_THRESHOLD = 32;
|
||||
while (_outerRadius < halfWidth && qAlpha(image.pixel(halfWidth + _outerRadius, halfHeight)) > TRANSPARENT_THRESHOLD) {
|
||||
_outerRadius++;
|
||||
}
|
||||
|
||||
// clear out any textures we generated before loading
|
||||
_dilatedTextures.clear();
|
||||
}
|
||||
|
||||
void DilatableNetworkTexture::reinsert() {
|
||||
static_cast<TextureCache*>(_cache.data())->_dilatableNetworkTextures.insert(_url,
|
||||
qWeakPointerCast<NetworkTexture, Resource>(_self));
|
||||
}
|
||||
|
||||
|
|
|
@ -76,6 +76,8 @@ protected:
|
|||
|
||||
private:
|
||||
|
||||
friend class DilatableNetworkTexture;
|
||||
|
||||
QOpenGLFramebufferObject* createFramebufferObject();
|
||||
|
||||
GLuint _permutationNormalTextureID;
|
||||
|
@ -151,6 +153,7 @@ public:
|
|||
protected:
|
||||
|
||||
virtual void imageLoaded(const QImage& image);
|
||||
virtual void reinsert();
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// VoxelStatsDialog.cpp
|
||||
// OctreeStatsDialog.cpp
|
||||
// interface
|
||||
//
|
||||
// Created by Brad Hefta-Gaub on 7/19/13.
|
||||
|
@ -14,13 +14,13 @@
|
|||
#include <QPalette>
|
||||
#include <QColor>
|
||||
|
||||
#include <VoxelSceneStats.h>
|
||||
#include <OctreeSceneStats.h>
|
||||
|
||||
#include "Application.h"
|
||||
|
||||
#include "ui/VoxelStatsDialog.h"
|
||||
#include "ui/OctreeStatsDialog.h"
|
||||
|
||||
VoxelStatsDialog::VoxelStatsDialog(QWidget* parent, NodeToVoxelSceneStats* model) :
|
||||
OctreeStatsDialog::OctreeStatsDialog(QWidget* parent, NodeToOctreeSceneStats* model) :
|
||||
QDialog(parent, Qt::Window | Qt::WindowCloseButtonHint | Qt::WindowStaysOnTopHint),
|
||||
_model(model) {
|
||||
|
||||
|
@ -52,7 +52,7 @@ VoxelStatsDialog::VoxelStatsDialog(QWidget* parent, NodeToVoxelSceneStats* model
|
|||
layout()->setSizeConstraint(QLayout::SetFixedSize);
|
||||
}
|
||||
|
||||
void VoxelStatsDialog::RemoveStatItem(int item) {
|
||||
void OctreeStatsDialog::RemoveStatItem(int item) {
|
||||
QLabel* myLabel = _labels[item];
|
||||
QWidget* automaticLabel = _form->labelForField(myLabel);
|
||||
_form->removeWidget(myLabel);
|
||||
|
@ -62,7 +62,7 @@ void VoxelStatsDialog::RemoveStatItem(int item) {
|
|||
_labels[item] = NULL;
|
||||
}
|
||||
|
||||
void VoxelStatsDialog::moreless(const QString& link) {
|
||||
void OctreeStatsDialog::moreless(const QString& link) {
|
||||
QStringList linkDetails = link.split("-");
|
||||
const int COMMAND_ITEM = 0;
|
||||
const int SERVER_NUMBER_ITEM = 1;
|
||||
|
@ -80,7 +80,7 @@ void VoxelStatsDialog::moreless(const QString& link) {
|
|||
}
|
||||
|
||||
|
||||
int VoxelStatsDialog::AddStatItem(const char* caption, unsigned colorRGBA) {
|
||||
int OctreeStatsDialog::AddStatItem(const char* caption, unsigned colorRGBA) {
|
||||
char strBuf[64];
|
||||
const int STATS_LABEL_WIDTH = 600;
|
||||
|
||||
|
@ -109,13 +109,13 @@ int VoxelStatsDialog::AddStatItem(const char* caption, unsigned colorRGBA) {
|
|||
return _statCount;
|
||||
}
|
||||
|
||||
VoxelStatsDialog::~VoxelStatsDialog() {
|
||||
OctreeStatsDialog::~OctreeStatsDialog() {
|
||||
for (int i = 0; i < _statCount; i++) {
|
||||
delete _labels[i];
|
||||
}
|
||||
}
|
||||
|
||||
void VoxelStatsDialog::paintEvent(QPaintEvent* event) {
|
||||
void OctreeStatsDialog::paintEvent(QPaintEvent* event) {
|
||||
|
||||
// Update labels
|
||||
|
||||
|
@ -171,11 +171,11 @@ void VoxelStatsDialog::paintEvent(QPaintEvent* event) {
|
|||
unsigned long totalInternal = 0;
|
||||
unsigned long totalLeaves = 0;
|
||||
|
||||
Application::getInstance()->lockVoxelSceneStats();
|
||||
NodeToVoxelSceneStats* sceneStats = Application::getInstance()->getOcteeSceneStats();
|
||||
for(NodeToVoxelSceneStatsIterator i = sceneStats->begin(); i != sceneStats->end(); i++) {
|
||||
Application::getInstance()->lockOctreeSceneStats();
|
||||
NodeToOctreeSceneStats* sceneStats = Application::getInstance()->getOcteeSceneStats();
|
||||
for(NodeToOctreeSceneStatsIterator i = sceneStats->begin(); i != sceneStats->end(); i++) {
|
||||
//const QUuid& uuid = i->first;
|
||||
VoxelSceneStats& stats = i->second;
|
||||
OctreeSceneStats& stats = i->second;
|
||||
serverCount++;
|
||||
|
||||
// calculate server node totals
|
||||
|
@ -194,7 +194,7 @@ void VoxelStatsDialog::paintEvent(QPaintEvent* event) {
|
|||
sendingMode << "S";
|
||||
}
|
||||
}
|
||||
Application::getInstance()->unlockVoxelSceneStats();
|
||||
Application::getInstance()->unlockOctreeSceneStats();
|
||||
sendingMode << " - " << serverCount << " servers";
|
||||
if (movingServerCount > 0) {
|
||||
sendingMode << " <SCENE NOT STABLE>";
|
||||
|
@ -221,7 +221,7 @@ void VoxelStatsDialog::paintEvent(QPaintEvent* event) {
|
|||
|
||||
this->QDialog::paintEvent(event);
|
||||
}
|
||||
void VoxelStatsDialog::showAllOctreeServers() {
|
||||
void OctreeStatsDialog::showAllOctreeServers() {
|
||||
int serverCount = 0;
|
||||
|
||||
showOctreeServersOfType(serverCount, NodeType::VoxelServer, "Voxel",
|
||||
|
@ -239,7 +239,7 @@ void VoxelStatsDialog::showAllOctreeServers() {
|
|||
}
|
||||
}
|
||||
|
||||
void VoxelStatsDialog::showOctreeServersOfType(int& serverCount, NodeType_t serverType, const char* serverTypeName,
|
||||
void OctreeStatsDialog::showOctreeServersOfType(int& serverCount, NodeType_t serverType, const char* serverTypeName,
|
||||
NodeToJurisdictionMap& serverJurisdictions) {
|
||||
|
||||
QLocale locale(QLocale::English);
|
||||
|
@ -303,10 +303,10 @@ void VoxelStatsDialog::showOctreeServersOfType(int& serverCount, NodeType_t serv
|
|||
|
||||
// now lookup stats details for this server...
|
||||
if (_extraServerDetails[serverCount-1] != LESS) {
|
||||
Application::getInstance()->lockVoxelSceneStats();
|
||||
NodeToVoxelSceneStats* sceneStats = Application::getInstance()->getOcteeSceneStats();
|
||||
Application::getInstance()->lockOctreeSceneStats();
|
||||
NodeToOctreeSceneStats* sceneStats = Application::getInstance()->getOcteeSceneStats();
|
||||
if (sceneStats->find(nodeUUID) != sceneStats->end()) {
|
||||
VoxelSceneStats& stats = sceneStats->at(nodeUUID);
|
||||
OctreeSceneStats& stats = sceneStats->at(nodeUUID);
|
||||
|
||||
switch (_extraServerDetails[serverCount-1]) {
|
||||
case MOST: {
|
||||
|
@ -323,9 +323,9 @@ void VoxelStatsDialog::showOctreeServersOfType(int& serverCount, NodeType_t serv
|
|||
"Encode Time: " << lastFullEncodeString.toLocal8Bit().constData() << " ms " <<
|
||||
"Send Time: " << lastFullSendString.toLocal8Bit().constData() << " ms ";
|
||||
|
||||
for (int i = 0; i < VoxelSceneStats::ITEM_COUNT; i++) {
|
||||
VoxelSceneStats::Item item = (VoxelSceneStats::Item)(i);
|
||||
VoxelSceneStats::ItemInfo& itemInfo = stats.getItemInfo(item);
|
||||
for (int i = 0; i < OctreeSceneStats::ITEM_COUNT; i++) {
|
||||
OctreeSceneStats::Item item = (OctreeSceneStats::Item)(i);
|
||||
OctreeSceneStats::ItemInfo& itemInfo = stats.getItemInfo(item);
|
||||
extraDetails << "<br/>" << itemInfo.caption << " " << stats.getItemValue(item);
|
||||
}
|
||||
} // fall through... since MOST has all of MORE
|
||||
|
@ -386,7 +386,7 @@ void VoxelStatsDialog::showOctreeServersOfType(int& serverCount, NodeType_t serv
|
|||
} break;
|
||||
}
|
||||
}
|
||||
Application::getInstance()->unlockVoxelSceneStats();
|
||||
Application::getInstance()->unlockOctreeSceneStats();
|
||||
} else {
|
||||
linkDetails << " " << " [<a href='more-" << serverCount << "'>more...</a>]";
|
||||
linkDetails << " " << " [<a href='most-" << serverCount << "'>most...</a>]";
|
||||
|
@ -397,12 +397,12 @@ void VoxelStatsDialog::showOctreeServersOfType(int& serverCount, NodeType_t serv
|
|||
}
|
||||
}
|
||||
|
||||
void VoxelStatsDialog::reject() {
|
||||
void OctreeStatsDialog::reject() {
|
||||
// Just regularly close upon ESC
|
||||
this->QDialog::close();
|
||||
}
|
||||
|
||||
void VoxelStatsDialog::closeEvent(QCloseEvent* event) {
|
||||
void OctreeStatsDialog::closeEvent(QCloseEvent* event) {
|
||||
this->QDialog::closeEvent(event);
|
||||
emit closed();
|
||||
}
|
|
@ -1,30 +1,30 @@
|
|||
//
|
||||
// VoxelStatsDialog.h
|
||||
// OctreeStatsDialog.h
|
||||
// interface
|
||||
//
|
||||
// Created by Brad Hefta-Gaub on 7/19/13.
|
||||
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef __hifi__VoxelStatsDialog__
|
||||
#define __hifi__VoxelStatsDialog__
|
||||
#ifndef __hifi__OctreeStatsDialog__
|
||||
#define __hifi__OctreeStatsDialog__
|
||||
|
||||
#include <QDialog>
|
||||
#include <QFormLayout>
|
||||
#include <QLabel>
|
||||
|
||||
#include <VoxelSceneStats.h>
|
||||
#include <OctreeSceneStats.h>
|
||||
|
||||
#define MAX_STATS 100
|
||||
#define MAX_VOXEL_SERVERS 50
|
||||
#define DEFAULT_COLOR 0
|
||||
|
||||
class VoxelStatsDialog : public QDialog {
|
||||
class OctreeStatsDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
// Sets up the UI
|
||||
VoxelStatsDialog(QWidget* parent, NodeToVoxelSceneStats* model);
|
||||
~VoxelStatsDialog();
|
||||
OctreeStatsDialog(QWidget* parent, NodeToOctreeSceneStats* model);
|
||||
~OctreeStatsDialog();
|
||||
|
||||
signals:
|
||||
void closed();
|
||||
|
@ -53,7 +53,7 @@ private:
|
|||
|
||||
QFormLayout* _form;
|
||||
QLabel* _labels[MAX_STATS];
|
||||
NodeToVoxelSceneStats* _model;
|
||||
NodeToOctreeSceneStats* _model;
|
||||
int _statCount;
|
||||
|
||||
int _sendingMode;
|
||||
|
@ -66,5 +66,5 @@ private:
|
|||
details _extraServerDetails[MAX_VOXEL_SERVERS];
|
||||
};
|
||||
|
||||
#endif /* defined(__interface__VoxelStatsDialog__) */
|
||||
#endif /* defined(__interface__OctreeStatsDialog__) */
|
||||
|
|
@ -26,8 +26,6 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
static const float fingerVectorRadix = 4; // bits of precision when converting from float<->fixed
|
||||
|
||||
QNetworkAccessManager* AvatarData::networkAccessManager = NULL;
|
||||
|
||||
AvatarData::AvatarData() :
|
||||
|
|
|
@ -51,7 +51,7 @@ QSharedPointer<NetworkValue> ScriptCache::getValue(const ParameterizedURL& url)
|
|||
|
||||
QSharedPointer<Resource> ScriptCache::createResource(const QUrl& url,
|
||||
const QSharedPointer<Resource>& fallback, bool delayLoad, const void* extra) {
|
||||
return QSharedPointer<Resource>(new NetworkProgram(this, url));
|
||||
return QSharedPointer<Resource>(new NetworkProgram(this, url), &Resource::allReferencesCleared);
|
||||
}
|
||||
|
||||
NetworkProgram::NetworkProgram(ScriptCache* cache, const QUrl& url) :
|
||||
|
|
|
@ -16,13 +16,12 @@
|
|||
#include "JurisdictionListener.h"
|
||||
|
||||
JurisdictionListener::JurisdictionListener(NodeType_t type) :
|
||||
_nodeType(type),
|
||||
_packetSender(JurisdictionListener::DEFAULT_PACKETS_PER_SECOND)
|
||||
{
|
||||
_nodeType = type;
|
||||
ReceivedPacketProcessor::_dontSleep = true; // we handle sleeping so this class doesn't need to
|
||||
|
||||
connect(NodeList::getInstance(), &NodeList::nodeKilled, this, &JurisdictionListener::nodeKilled);
|
||||
//qDebug("JurisdictionListener::JurisdictionListener(NodeType_t type=%c)", type);
|
||||
|
||||
// tell our NodeList we want to hear about nodes with our node type
|
||||
NodeList::getInstance()->addNodeTypeToInterestSet(type);
|
||||
|
@ -35,8 +34,6 @@ void JurisdictionListener::nodeKilled(SharedNodePointer node) {
|
|||
}
|
||||
|
||||
bool JurisdictionListener::queueJurisdictionRequest() {
|
||||
//qDebug() << "JurisdictionListener::queueJurisdictionRequest()";
|
||||
|
||||
static unsigned char buffer[MAX_PACKET_SIZE];
|
||||
unsigned char* bufferOut = &buffer[0];
|
||||
ssize_t sizeOut = populatePacketHeader(reinterpret_cast<char*>(bufferOut), PacketTypeJurisdictionRequest);
|
||||
|
@ -71,7 +68,6 @@ void JurisdictionListener::processPacket(const SharedNodePointer& sendingNode, c
|
|||
}
|
||||
|
||||
bool JurisdictionListener::process() {
|
||||
//qDebug() << "JurisdictionListener::process()";
|
||||
bool continueProcessing = isStillRunning();
|
||||
|
||||
// If we're still running, and we don't have any requests waiting to be sent, then queue our jurisdiction requests
|
||||
|
@ -80,7 +76,6 @@ bool JurisdictionListener::process() {
|
|||
}
|
||||
|
||||
if (continueProcessing) {
|
||||
//qDebug() << "JurisdictionListener::process() calling _packetSender.process()";
|
||||
continueProcessing = _packetSender.process();
|
||||
}
|
||||
if (continueProcessing) {
|
||||
|
|
|
@ -19,9 +19,9 @@
|
|||
JurisdictionSender::JurisdictionSender(JurisdictionMap* map, NodeType_t type) :
|
||||
ReceivedPacketProcessor(),
|
||||
_jurisdictionMap(map),
|
||||
_nodeType(type),
|
||||
_packetSender(JurisdictionSender::DEFAULT_PACKETS_PER_SECOND)
|
||||
{
|
||||
_nodeType = type;
|
||||
}
|
||||
|
||||
JurisdictionSender::~JurisdictionSender() {
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
#include "OctreeEditPacketSender.h"
|
||||
|
||||
|
||||
EditPacketBuffer::EditPacketBuffer(PacketType type, unsigned char* buffer, ssize_t length, QUuid nodeUUID) {
|
||||
_nodeUUID = nodeUUID;
|
||||
_currentType = type;
|
||||
_currentSize = length;
|
||||
EditPacketBuffer::EditPacketBuffer(PacketType type, unsigned char* buffer, ssize_t length, QUuid nodeUUID) :
|
||||
_nodeUUID(nodeUUID),
|
||||
_currentType(type),
|
||||
_currentSize(length)
|
||||
{
|
||||
memcpy(_currentBuffer, buffer, length);
|
||||
};
|
||||
|
||||
|
|
|
@ -19,7 +19,8 @@ OctreePersistThread::OctreePersistThread(Octree* tree, const QString& filename,
|
|||
_filename(filename),
|
||||
_persistInterval(persistInterval),
|
||||
_initialLoadComplete(false),
|
||||
_loadTimeUSecs(0) {
|
||||
_loadTimeUSecs(0)
|
||||
{
|
||||
}
|
||||
|
||||
bool OctreePersistThread::process() {
|
||||
|
|
|
@ -20,23 +20,22 @@
|
|||
|
||||
const int samples = 100;
|
||||
OctreeSceneStats::OctreeSceneStats() :
|
||||
_elapsedAverage(samples),
|
||||
_isReadyToSend(false),
|
||||
_isStarted(false),
|
||||
_lastFullElapsed(0),
|
||||
_elapsedAverage(samples),
|
||||
_bitsPerOctreeAverage(samples),
|
||||
_lastFullTotalEncodeTime(0),
|
||||
_incomingPacket(0),
|
||||
_incomingBytes(0),
|
||||
_incomingWastedBytes(0),
|
||||
_incomingLastSequence(0),
|
||||
_incomingOutOfOrder(0),
|
||||
_incomingLikelyLost(0),
|
||||
_incomingFlightTimeAverage(samples),
|
||||
_jurisdictionRoot(NULL)
|
||||
{
|
||||
reset();
|
||||
_isReadyToSend = false;
|
||||
_isStarted = false;
|
||||
_lastFullTotalEncodeTime = 0;
|
||||
_lastFullElapsed = 0;
|
||||
_incomingPacket = 0;
|
||||
_incomingBytes = 0;
|
||||
_incomingWastedBytes = 0;
|
||||
_incomingLastSequence = 0;
|
||||
_incomingOutOfOrder = 0;
|
||||
_incomingLikelyLost = 0;
|
||||
|
||||
}
|
||||
|
||||
// copy constructor
|
||||
|
|
|
@ -12,14 +12,12 @@
|
|||
|
||||
OctreeScriptingInterface::OctreeScriptingInterface(OctreeEditPacketSender* packetSender,
|
||||
JurisdictionListener* jurisdictionListener) :
|
||||
_packetSender(NULL),
|
||||
_jurisdictionListener(NULL),
|
||||
_packetSender(packetSender),
|
||||
_jurisdictionListener(jurisdictionListener),
|
||||
_managedPacketSender(false),
|
||||
_managedJurisdictionListener(false),
|
||||
_initialized(false)
|
||||
{
|
||||
setPacketSender(packetSender);
|
||||
setJurisdictionListener(jurisdictionListener);
|
||||
}
|
||||
|
||||
OctreeScriptingInterface::~OctreeScriptingInterface() {
|
||||
|
|
|
@ -12,11 +12,6 @@
|
|||
|
||||
#include <stdio.h>
|
||||
|
||||
// These are some useful utilities that vec3 is missing
|
||||
void printVec3(const char* name, const glm::vec3& v) {
|
||||
printf("%s x=%f y=%f z=%f\n", name, v.x, v.y, v.z);
|
||||
}
|
||||
|
||||
void Plane::set3Points(const glm::vec3 &v1, const glm::vec3 &v2, const glm::vec3 &v3) {
|
||||
glm::vec3 linev1v2, linev1v3;
|
||||
|
||||
|
|
|
@ -815,11 +815,6 @@ void Particle::applyHardCollision(const CollisionInfo& collisionInfo) {
|
|||
setVelocity(velocity);
|
||||
}
|
||||
|
||||
// MIN_VALID_SPEED is obtained by computing speed gained at one gravity during the shortest expected frame period
|
||||
// This is a HACK for particles that bounce in a 1.0 gravitational field and should eventually be made more universal.
|
||||
const float MIN_EXPECTED_FRAME_PERIOD = 0.005f; // 1/200th of a second
|
||||
const float MIN_VALID_SPEED = 9.8 * MIN_EXPECTED_FRAME_PERIOD / (float)(TREE_SCALE);
|
||||
|
||||
void Particle::update(const quint64& now) {
|
||||
float timeElapsed = (float)(now - _lastUpdated) / (float)(USECS_PER_SECOND);
|
||||
_lastUpdated = now;
|
||||
|
|
|
@ -9,8 +9,7 @@
|
|||
#include "ParticleTree.h"
|
||||
|
||||
ParticleTree::ParticleTree(bool shouldReaverage) : Octree(shouldReaverage) {
|
||||
ParticleTreeElement* rootNode = createNewElement();
|
||||
_rootNode = rootNode;
|
||||
_rootNode = createNewElement();
|
||||
}
|
||||
|
||||
ParticleTreeElement* ParticleTree::createNewElement(unsigned char * octalCode) {
|
||||
|
|
|
@ -44,22 +44,28 @@ static QScriptValue soundConstructor(QScriptContext* context, QScriptEngine* eng
|
|||
|
||||
ScriptEngine::ScriptEngine(const QString& scriptContents, bool wantMenuItems, const QString& fileNameString,
|
||||
AbstractControllerScriptingInterface* controllerScriptingInterface) :
|
||||
|
||||
_scriptContents(scriptContents),
|
||||
_isFinished(false),
|
||||
_isRunning(false),
|
||||
_isInitialized(false),
|
||||
_engine(),
|
||||
_isAvatar(false),
|
||||
_avatarIdentityTimer(NULL),
|
||||
_avatarBillboardTimer(NULL),
|
||||
_avatarData(NULL)
|
||||
_timerFunctionMap(),
|
||||
_controllerScriptingInterface(controllerScriptingInterface),
|
||||
_avatarData(NULL),
|
||||
_wantMenuItems(wantMenuItems),
|
||||
_scriptMenuName(),
|
||||
_fileNameString(fileNameString),
|
||||
_quatLibrary(),
|
||||
_vec3Library()
|
||||
{
|
||||
_scriptContents = scriptContents;
|
||||
_isFinished = false;
|
||||
_isRunning = false;
|
||||
_isInitialized = false;
|
||||
_fileNameString = fileNameString;
|
||||
|
||||
QByteArray fileNameAscii = fileNameString.toLocal8Bit();
|
||||
const char* scriptMenuName = fileNameAscii.data();
|
||||
|
||||
// some clients will use these menu features
|
||||
_wantMenuItems = wantMenuItems;
|
||||
if (!fileNameString.isEmpty()) {
|
||||
_scriptMenuName = "Stop ";
|
||||
_scriptMenuName.append(scriptMenuName);
|
||||
|
@ -69,11 +75,9 @@ ScriptEngine::ScriptEngine(const QString& scriptContents, bool wantMenuItems, co
|
|||
_scriptMenuName.append(_scriptNumber);
|
||||
}
|
||||
_scriptNumber++;
|
||||
_controllerScriptingInterface = controllerScriptingInterface;
|
||||
}
|
||||
|
||||
ScriptEngine::~ScriptEngine() {
|
||||
//printf("ScriptEngine::~ScriptEngine()...\n");
|
||||
}
|
||||
|
||||
void ScriptEngine::setIsAvatar(bool isAvatar) {
|
||||
|
|
|
@ -96,13 +96,14 @@ private:
|
|||
|
||||
static VoxelsScriptingInterface _voxelsScriptingInterface;
|
||||
static ParticlesScriptingInterface _particlesScriptingInterface;
|
||||
static int _scriptNumber;
|
||||
|
||||
AbstractControllerScriptingInterface* _controllerScriptingInterface;
|
||||
AudioScriptingInterface _audioScriptingInterface;
|
||||
AvatarData* _avatarData;
|
||||
bool _wantMenuItems;
|
||||
QString _scriptMenuName;
|
||||
QString _fileNameString;
|
||||
static int _scriptNumber;
|
||||
Quat _quatLibrary;
|
||||
Vec3 _vec3Library;
|
||||
};
|
||||
|
|
|
@ -15,7 +15,15 @@
|
|||
#include "ResourceCache.h"
|
||||
|
||||
ResourceCache::ResourceCache(QObject* parent) :
|
||||
QObject(parent) {
|
||||
QObject(parent),
|
||||
_lastLRUKey(0) {
|
||||
}
|
||||
|
||||
ResourceCache::~ResourceCache() {
|
||||
// make sure our unused resources know we're out of commission
|
||||
foreach (const QSharedPointer<Resource>& resource, _unusedResources) {
|
||||
resource->setCache(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
QSharedPointer<Resource> ResourceCache::getResource(const QUrl& url, const QUrl& fallback, bool delayLoad, void* extra) {
|
||||
|
@ -27,11 +35,27 @@ QSharedPointer<Resource> ResourceCache::getResource(const QUrl& url, const QUrl&
|
|||
resource = createResource(url, fallback.isValid() ?
|
||||
getResource(fallback, QUrl(), true) : QSharedPointer<Resource>(), delayLoad, extra);
|
||||
resource->setSelf(resource);
|
||||
resource->setCache(this);
|
||||
_resources.insert(url, resource);
|
||||
|
||||
} else {
|
||||
_unusedResources.remove(resource->getLRUKey());
|
||||
}
|
||||
return resource;
|
||||
}
|
||||
|
||||
void ResourceCache::addUnusedResource(const QSharedPointer<Resource>& resource) {
|
||||
const int RETAINED_RESOURCE_COUNT = 50;
|
||||
if (_unusedResources.size() > RETAINED_RESOURCE_COUNT) {
|
||||
// unload the oldest resource
|
||||
QMap<int, QSharedPointer<Resource> >::iterator it = _unusedResources.begin();
|
||||
it.value()->setCache(NULL);
|
||||
_unusedResources.erase(it);
|
||||
}
|
||||
resource->setLRUKey(++_lastLRUKey);
|
||||
_unusedResources.insert(resource->getLRUKey(), resource);
|
||||
}
|
||||
|
||||
void ResourceCache::attemptRequest(Resource* resource) {
|
||||
if (_requestLimit <= 0) {
|
||||
// wait until a slot becomes available
|
||||
|
@ -74,10 +98,12 @@ int ResourceCache::_requestLimit = DEFAULT_REQUEST_LIMIT;
|
|||
QList<QPointer<Resource> > ResourceCache::_pendingRequests;
|
||||
|
||||
Resource::Resource(const QUrl& url, bool delayLoad) :
|
||||
_url(url),
|
||||
_request(url),
|
||||
_startedLoading(false),
|
||||
_failedToLoad(false),
|
||||
_loaded(false),
|
||||
_lruKey(0),
|
||||
_reply(NULL),
|
||||
_attempts(0) {
|
||||
|
||||
|
@ -141,6 +167,21 @@ float Resource::getLoadPriority() {
|
|||
return highestPriority;
|
||||
}
|
||||
|
||||
void Resource::allReferencesCleared() {
|
||||
if (_cache) {
|
||||
// create and reinsert new shared pointer
|
||||
QSharedPointer<Resource> self(this, &Resource::allReferencesCleared);
|
||||
setSelf(self);
|
||||
reinsert();
|
||||
|
||||
// add to the unused list
|
||||
_cache->addUnusedResource(self);
|
||||
|
||||
} else {
|
||||
delete this;
|
||||
}
|
||||
}
|
||||
|
||||
void Resource::attemptRequest() {
|
||||
_startedLoading = true;
|
||||
ResourceCache::attemptRequest(this);
|
||||
|
@ -155,6 +196,10 @@ void Resource::finishedLoading(bool success) {
|
|||
_loadPriorities.clear();
|
||||
}
|
||||
|
||||
void Resource::reinsert() {
|
||||
_cache->_resources.insert(_url, _self);
|
||||
}
|
||||
|
||||
const int REPLY_TIMEOUT_MS = 5000;
|
||||
|
||||
void Resource::handleDownloadProgress(qint64 bytesReceived, qint64 bytesTotal) {
|
||||
|
@ -189,6 +234,7 @@ void Resource::makeRequest() {
|
|||
|
||||
connect(_reply, SIGNAL(downloadProgress(qint64,qint64)), SLOT(handleDownloadProgress(qint64,qint64)));
|
||||
connect(_reply, SIGNAL(error(QNetworkReply::NetworkError)), SLOT(handleReplyError()));
|
||||
connect(_reply, SIGNAL(finished()), SLOT(handleReplyFinished()));
|
||||
|
||||
_replyTimer = new QTimer(this);
|
||||
connect(_replyTimer, SIGNAL(timeout()), SLOT(handleReplyTimeout()));
|
||||
|
@ -233,6 +279,11 @@ void Resource::handleReplyError(QNetworkReply::NetworkError error, QDebug debug)
|
|||
}
|
||||
}
|
||||
|
||||
void Resource::handleReplyFinished() {
|
||||
qDebug() << "Got finished without download progress/error?" << _url;
|
||||
handleDownloadProgress(0, 0);
|
||||
}
|
||||
|
||||
uint qHash(const QPointer<QObject>& value, uint seed) {
|
||||
return qHash(value.data(), seed);
|
||||
}
|
||||
|
|
|
@ -38,9 +38,12 @@ public:
|
|||
static int getRequestLimit() { return _requestLimit; }
|
||||
|
||||
ResourceCache(QObject* parent = NULL);
|
||||
virtual ~ResourceCache();
|
||||
|
||||
protected:
|
||||
|
||||
QMap<int, QSharedPointer<Resource> > _unusedResources;
|
||||
|
||||
/// Loads a resource from the specified URL.
|
||||
/// \param fallback a fallback URL to load if the desired one is unavailable
|
||||
/// \param delayLoad if true, don't load the resource immediately; wait until load is first requested
|
||||
|
@ -52,14 +55,17 @@ protected:
|
|||
virtual QSharedPointer<Resource> createResource(const QUrl& url,
|
||||
const QSharedPointer<Resource>& fallback, bool delayLoad, const void* extra) = 0;
|
||||
|
||||
void addUnusedResource(const QSharedPointer<Resource>& resource);
|
||||
|
||||
static void attemptRequest(Resource* resource);
|
||||
static void requestCompleted();
|
||||
|
||||
private:
|
||||
|
||||
friend class Resource;
|
||||
|
||||
|
||||
QHash<QUrl, QWeakPointer<Resource> > _resources;
|
||||
int _lastLRUKey;
|
||||
|
||||
static QNetworkAccessManager* _networkAccessManager;
|
||||
static int _requestLimit;
|
||||
|
@ -75,6 +81,9 @@ public:
|
|||
Resource(const QUrl& url, bool delayLoad = false);
|
||||
~Resource();
|
||||
|
||||
/// Returns the key last used to identify this resource in the unused map.
|
||||
int getLRUKey() const { return _lruKey; }
|
||||
|
||||
/// Makes sure that the resource has started loading.
|
||||
void ensureLoading();
|
||||
|
||||
|
@ -95,6 +104,10 @@ public:
|
|||
|
||||
void setSelf(const QWeakPointer<Resource>& self) { _self = self; }
|
||||
|
||||
void setCache(ResourceCache* cache) { _cache = cache; }
|
||||
|
||||
void allReferencesCleared();
|
||||
|
||||
protected slots:
|
||||
|
||||
void attemptRequest();
|
||||
|
@ -107,27 +120,36 @@ protected:
|
|||
/// Should be called by subclasses when all the loading that will be done has been done.
|
||||
Q_INVOKABLE void finishedLoading(bool success);
|
||||
|
||||
/// Reinserts this resource into the cache.
|
||||
virtual void reinsert();
|
||||
|
||||
QUrl _url;
|
||||
QNetworkRequest _request;
|
||||
bool _startedLoading;
|
||||
bool _failedToLoad;
|
||||
bool _loaded;
|
||||
QHash<QPointer<QObject>, float> _loadPriorities;
|
||||
QWeakPointer<Resource> _self;
|
||||
QPointer<ResourceCache> _cache;
|
||||
|
||||
private slots:
|
||||
|
||||
void handleDownloadProgress(qint64 bytesReceived, qint64 bytesTotal);
|
||||
void handleReplyError();
|
||||
void handleReplyFinished();
|
||||
void handleReplyTimeout();
|
||||
|
||||
private:
|
||||
|
||||
void setLRUKey(int lruKey) { _lruKey = lruKey; }
|
||||
|
||||
void makeRequest();
|
||||
|
||||
void handleReplyError(QNetworkReply::NetworkError error, QDebug debug);
|
||||
|
||||
friend class ResourceCache;
|
||||
|
||||
int _lruKey;
|
||||
QNetworkReply* _reply;
|
||||
QTimer* _replyTimer;
|
||||
qint64 _bytesReceived;
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
//
|
||||
// VoxelSceneStats.cpp
|
||||
// hifi
|
||||
//
|
||||
// Created by Brad Hefta-Gaub on 7/18/13.
|
||||
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
|
||||
//
|
||||
//
|
||||
|
||||
#include "VoxelSceneStats.h"
|
||||
|
||||
|
||||
// currently an alias for OctreeSceneStats
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
//
|
||||
// VoxelSceneStats.h
|
||||
// hifi
|
||||
//
|
||||
// Created by Brad Hefta-Gaub on 7/18/13.
|
||||
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef __hifi__VoxelSceneStats__
|
||||
#define __hifi__VoxelSceneStats__
|
||||
|
||||
#include <NodeList.h>
|
||||
#include <OctreeSceneStats.h>
|
||||
|
||||
/// Collects statistics for calculating and sending a scene from a voxel server to an interface client
|
||||
class VoxelSceneStats : public OctreeSceneStats {
|
||||
|
||||
// currently an alias for OctreeSceneStats
|
||||
|
||||
};
|
||||
|
||||
/// Map between node IDs and their reported VoxelSceneStats. Typically used by classes that need to know which nodes sent
|
||||
/// which voxel stats
|
||||
typedef std::map<QUuid, VoxelSceneStats> NodeToVoxelSceneStats;
|
||||
typedef std::map<QUuid, VoxelSceneStats>::iterator NodeToVoxelSceneStatsIterator;
|
||||
|
||||
#endif /* defined(__hifi__VoxelSceneStats__) */
|
|
@ -20,7 +20,8 @@
|
|||
|
||||
// Voxel Specific operations....
|
||||
|
||||
VoxelTree::VoxelTree(bool shouldReaverage) : Octree(shouldReaverage) {
|
||||
VoxelTree::VoxelTree(bool shouldReaverage) : Octree(shouldReaverage)
|
||||
{
|
||||
_rootNode = createNewElement();
|
||||
}
|
||||
|
||||
|
|
116
qt5.rb
116
qt5.rb
|
@ -1,116 +0,0 @@
|
|||
# this is a Qt5 formula patched to remove support for the CoreWLAN module on OS X
|
||||
# which was causing us problems with constant WLAN scans
|
||||
|
||||
# the change is a removal of the following line in bearer.pro
|
||||
# mac:contains(QT_CONFIG, corewlan):SUBDIRS += corewlan
|
||||
|
||||
require 'formula'
|
||||
|
||||
class Qt5HeadDownloadStrategy < GitDownloadStrategy
|
||||
include FileUtils
|
||||
|
||||
def support_depth?
|
||||
# We need to make a local clone so we can't use "--depth 1"
|
||||
false
|
||||
end
|
||||
|
||||
def stage
|
||||
@clone.cd { reset }
|
||||
safe_system 'git', 'clone', @clone, '.'
|
||||
ln_s @clone, 'qt'
|
||||
safe_system './init-repository', '--mirror', "#{Dir.pwd}/"
|
||||
rm 'qt'
|
||||
end
|
||||
end
|
||||
|
||||
class Qt5 < Formula
|
||||
homepage 'http://qt-project.org/'
|
||||
url 'https://highfidelity-public.s3.amazonaws.com/packages/qt-everywhere-opensource-nocorewlan-src-5.2.0.tar.gz'
|
||||
sha1 '07ef1ca133db4a5168d8a716e99d145432832a24'
|
||||
head 'git://gitorious.org/qt/qt5.git', :branch => 'stable',
|
||||
:using => Qt5HeadDownloadStrategy
|
||||
|
||||
keg_only "Qt 5 conflicts Qt 4 (which is currently much more widely used)."
|
||||
|
||||
option :universal
|
||||
option 'with-docs', 'Build documentation'
|
||||
option 'developer', 'Build and link with developer options'
|
||||
|
||||
depends_on "d-bus" => :optional
|
||||
depends_on "mysql" => :optional
|
||||
|
||||
odie 'qt5: --with-qtdbus has been renamed to --with-d-bus' if build.include? 'with-qtdbus'
|
||||
odie 'qt5: --with-demos-examples is no longer supported' if build.include? 'with-demos-examples'
|
||||
odie 'qt5: --with-debug-and-release is no longer supported' if build.include? 'with-debug-and-release'
|
||||
|
||||
def install
|
||||
ENV.universal_binary if build.universal?
|
||||
args = ["-prefix", prefix,
|
||||
"-system-zlib",
|
||||
"-confirm-license", "-opensource",
|
||||
"-nomake", "examples",
|
||||
"-release"]
|
||||
|
||||
unless MacOS::CLT.installed?
|
||||
# ... too stupid to find CFNumber.h, so we give a hint:
|
||||
ENV.append 'CXXFLAGS', "-I#{MacOS.sdk_path}/System/Library/Frameworks/CoreFoundation.framework/Headers"
|
||||
end
|
||||
|
||||
# https://bugreports.qt-project.org/browse/QTBUG-34382
|
||||
args << "-no-xcb"
|
||||
|
||||
args << "-L#{MacOS::X11.lib}" << "-I#{MacOS::X11.include}" if MacOS::X11.installed?
|
||||
|
||||
args << "-plugin-sql-mysql" if build.with? 'mysql'
|
||||
|
||||
if build.with? 'd-bus'
|
||||
dbus_opt = Formula.factory('d-bus').opt_prefix
|
||||
args << "-I#{dbus_opt}/lib/dbus-1.0/include"
|
||||
args << "-I#{dbus_opt}/include/dbus-1.0"
|
||||
args << "-L#{dbus_opt}/lib"
|
||||
args << "-ldbus-1"
|
||||
end
|
||||
|
||||
if MacOS.prefer_64_bit? or build.universal?
|
||||
args << '-arch' << 'x86_64'
|
||||
end
|
||||
|
||||
if !MacOS.prefer_64_bit? or build.universal?
|
||||
args << '-arch' << 'x86'
|
||||
end
|
||||
|
||||
args << '-developer-build' if build.include? 'developer'
|
||||
|
||||
system "./configure", *args
|
||||
system "make"
|
||||
ENV.j1
|
||||
system "make install"
|
||||
|
||||
# Some config scripts will only find Qt in a "Frameworks" folder
|
||||
cd prefix do
|
||||
ln_s lib, frameworks
|
||||
end
|
||||
|
||||
# The pkg-config files installed suggest that headers can be found in the
|
||||
# `include` directory. Make this so by creating symlinks from `include` to
|
||||
# the Frameworks' Headers folders.
|
||||
Pathname.glob(lib + '*.framework/Headers').each do |path|
|
||||
framework_name = File.basename(File.dirname(path), '.framework')
|
||||
ln_s path.realpath, include+framework_name
|
||||
end
|
||||
|
||||
Pathname.glob(bin + '*.app').each do |path|
|
||||
mv path, prefix
|
||||
end
|
||||
end
|
||||
|
||||
test do
|
||||
system "#{bin}/qmake", "-project"
|
||||
end
|
||||
|
||||
def caveats; <<-EOS.undent
|
||||
We agreed to the Qt opensource license for you.
|
||||
If this is unacceptable you should uninstall.
|
||||
EOS
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue