mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-08 06:22:14 +02:00
remove standalone voxel server
This commit is contained in:
parent
c087632d53
commit
b682d3612b
7 changed files with 1 additions and 195 deletions
|
@ -21,4 +21,3 @@ add_subdirectory(injector)
|
|||
add_subdirectory(pairing-server)
|
||||
add_subdirectory(space-server)
|
||||
add_subdirectory(voxel-edit)
|
||||
add_subdirectory(voxel-server)
|
|
@ -52,7 +52,6 @@ VoxelServer::VoxelServer(Assignment::Command command, Assignment::Location locat
|
|||
_serverTree(true) {
|
||||
_argc = 0;
|
||||
_argv = NULL;
|
||||
_dontKillOnMissingDomain = false;
|
||||
|
||||
_packetsPerClientPerInterval = 10;
|
||||
_wantVoxelPersist = true;
|
||||
|
@ -75,7 +74,6 @@ VoxelServer::VoxelServer(const unsigned char* dataBuffer, int numBytes) : Assign
|
|||
_serverTree(true) {
|
||||
_argc = 0;
|
||||
_argv = NULL;
|
||||
_dontKillOnMissingDomain = false;
|
||||
|
||||
_packetsPerClientPerInterval = 10;
|
||||
_wantVoxelPersist = true;
|
||||
|
@ -167,25 +165,6 @@ void VoxelServer::parsePayload() {
|
|||
}
|
||||
}
|
||||
|
||||
void VoxelServer::setupStandAlone(const char* domain, int port) {
|
||||
NodeList::createInstance(NODE_TYPE_VOXEL_SERVER, port);
|
||||
|
||||
// Handle Local Domain testing with the --local command line
|
||||
const char* local = "--local";
|
||||
_wantLocalDomain = strcmp(domain, local) == 0;
|
||||
if (_wantLocalDomain) {
|
||||
qDebug("Local Domain MODE!\n");
|
||||
NodeList::getInstance()->setDomainIPToLocalhost();
|
||||
} else {
|
||||
if (domain) {
|
||||
NodeList::getInstance()->setDomainHostname(domain);
|
||||
}
|
||||
}
|
||||
|
||||
// If we're running in standalone mode, we don't want to kill ourselves when we haven't heard from a domain
|
||||
_dontKillOnMissingDomain = true;
|
||||
}
|
||||
|
||||
//int main(int argc, const char * argv[]) {
|
||||
void VoxelServer::run() {
|
||||
|
||||
|
@ -372,8 +351,7 @@ void VoxelServer::run() {
|
|||
// loop to send to nodes requesting data
|
||||
while (true) {
|
||||
|
||||
if (!_dontKillOnMissingDomain &&
|
||||
NodeList::getInstance()->getNumNoReplyDomainCheckIns() == MAX_SILENT_DOMAIN_SERVER_CHECK_INS) {
|
||||
if (NodeList::getInstance()->getNumNoReplyDomainCheckIns() == MAX_SILENT_DOMAIN_SERVER_CHECK_INS) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,13 +35,6 @@ public:
|
|||
/// allows setting of run arguments
|
||||
void setArguments(int argc, char** argv);
|
||||
|
||||
/// when VoxelServer class is used by voxel-server stand alone executable it calls this to specify the domain
|
||||
/// and port it is handling. When called by assignment-client, this is not needed because assignment-client
|
||||
/// handles ports and domains automatically.
|
||||
/// \param const char* domain domain name, IP address, or local to specify the domain the voxel server is serving
|
||||
/// \param int port port the voxel server will listen on
|
||||
void setupStandAlone(const char* domain, int port);
|
||||
|
||||
bool wantsDebugVoxelSending() const { return _debugVoxelSending; }
|
||||
bool wantsDebugVoxelReceiving() const { return _debugVoxelReceiving; }
|
||||
bool wantShowAnimationDebug() const { return _shouldShowAnimationDebug; }
|
||||
|
@ -64,7 +57,6 @@ private:
|
|||
int _argc;
|
||||
const char** _argv;
|
||||
char** _parsedArgV;
|
||||
bool _dontKillOnMissingDomain;
|
||||
|
||||
char _voxelPersistFilename[MAX_FILENAME_LENGTH];
|
||||
int _packetsPerClientPerInterval;
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
set(TARGET_NAME voxel-server)
|
||||
|
||||
set(ROOT_DIR ..)
|
||||
set(MACRO_DIR ${ROOT_DIR}/cmake/macros)
|
||||
|
||||
# setup for find modules
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/modules/")
|
||||
|
||||
# set up the external glm library
|
||||
include(${MACRO_DIR}/IncludeGLM.cmake)
|
||||
include_glm(${TARGET_NAME} ${ROOT_DIR})
|
||||
|
||||
include(${MACRO_DIR}/SetupHifiProject.cmake)
|
||||
|
||||
setup_hifi_project(${TARGET_NAME} TRUE)
|
||||
|
||||
# link in the shared library
|
||||
include(${MACRO_DIR}/LinkHifiLibrary.cmake)
|
||||
link_hifi_library(shared ${TARGET_NAME} ${ROOT_DIR})
|
||||
|
||||
# link in the hifi voxels library
|
||||
link_hifi_library(voxels ${TARGET_NAME} ${ROOT_DIR})
|
||||
|
||||
# link in the hifi avatars library
|
||||
link_hifi_library(avatars ${TARGET_NAME} ${ROOT_DIR})
|
||||
|
||||
# link in the hifi voxel-server-library
|
||||
link_hifi_library(voxel-server-library ${TARGET_NAME} ${ROOT_DIR})
|
Binary file not shown.
|
@ -1,86 +0,0 @@
|
|||
NAME
|
||||
voxel-server - the High Fidelity Voxel Server
|
||||
|
||||
SYNOPSIS
|
||||
voxel-server [--local] [--jurisdictionFile <filename>] [--port <port>] [--voxelsPersistFilename <filename>]
|
||||
[--displayVoxelStats] [--debugVoxelSending] [--debugVoxelReceiving] [--shouldShowAnimationDebug]
|
||||
[--wantColorRandomizer] [--NoVoxelPersist] [--packetsPerSecond <value>]
|
||||
[--AddRandomVoxels] [--AddScene] [--NoAddScene]
|
||||
|
||||
DESCRIPTION
|
||||
voxel-server is a compact, portable, scalable, distributed sparse voxel octree server
|
||||
|
||||
OPTIONS
|
||||
|
||||
--local
|
||||
This will run the voxel server in "local domain mode" and will look for a domain-server running on the same IP
|
||||
address as the voxel server
|
||||
|
||||
--jurisdictionRoot [hex string of root octcode]
|
||||
Tells the server to honor jurisdiction from the specified root node and below
|
||||
|
||||
--jurisdictionEndNodes [<octcode>(<,octcode>...)]
|
||||
Tells the server to honor jurisdiction from the root down to the octcodes included in the comma separated list
|
||||
|
||||
--jurisdictionFile [filename]
|
||||
Tells the server to load it's jurisdiction from the specified file. When a voxel server is running with a limited
|
||||
"jurisdiction" it will only server voxels from that portion of the voxel tree. The jurisdiction file is a ".ini" style
|
||||
file with the following options: [General/root] specifies the octal code for the node in the tree that this server will
|
||||
use as it's "root". It will only server voxels under this root. [endNodes/...] a list or group of additional octalcodes
|
||||
under the root, which will not be served.
|
||||
|
||||
The following example jurisdiction file will server all voxels from the root and below, and exclude voxels from the
|
||||
voxel of scale 0.25 and 0,0,0.
|
||||
|
||||
****** example jurisdiction.ini **********************************************************************
|
||||
[General]
|
||||
root=00
|
||||
|
||||
[endNodes]
|
||||
endnode0=0200
|
||||
|
||||
******************************************************************************************************
|
||||
|
||||
|
||||
--port [port]
|
||||
Specify the port the voxel-server will listen on. You must specify different ports to enable multiple voxel servers
|
||||
running on a single machine.
|
||||
|
||||
--voxelsPersistFilename [filename]
|
||||
Specify and alternate file that the voxel server will read and write persistant voxels to. By default the voxel server
|
||||
will use one of the following files:
|
||||
|
||||
default: /etc/highfidelity/voxel-server/resources/voxels.svo
|
||||
in local mode: ./resources/voxels.svo
|
||||
|
||||
--displayVoxelStats
|
||||
Displays additional voxel stats debugging
|
||||
|
||||
--debugVoxelSending
|
||||
Displays additional voxel sending debugging
|
||||
|
||||
--debugVoxelReceiving
|
||||
Displays additional voxel receiving debugging
|
||||
|
||||
--shouldShowAnimationDebug
|
||||
Displays additional verbose animation debugging
|
||||
|
||||
--wantColorRandomizer
|
||||
Adds color randomization to inserts into the local voxel tree
|
||||
|
||||
--NoVoxelPersist
|
||||
Disables voxel persisting
|
||||
|
||||
--packetsPerSecond [value]
|
||||
Specifies the packets per second that this voxel server will send to attached clients
|
||||
|
||||
--AddRandomVoxels
|
||||
Add random voxels to the surface on startup
|
||||
|
||||
--AddScene
|
||||
OBSOLETE: Adds an arbitrary scene with several "planet" spheres
|
||||
|
||||
--NoAddScene
|
||||
OBSOLETE: disables adding of scene
|
||||
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
//
|
||||
// main.cpp
|
||||
// Voxel Server
|
||||
//
|
||||
// Created by Stephen Birarda on 03/06/13.
|
||||
// Copyright (c) 2012 High Fidelity, Inc. All rights reserved.
|
||||
//
|
||||
|
||||
#include <SharedUtil.h>
|
||||
#include <VoxelServer.h>
|
||||
const int VOXEL_LISTEN_PORT = 40106;
|
||||
|
||||
|
||||
int main(int argc, const char * argv[]) {
|
||||
|
||||
// Handle Local Domain testing with the --local command line
|
||||
const char* local = "--local";
|
||||
bool wantLocalDomain = cmdOptionExists(argc, argv, local);
|
||||
const char* domainIP = getCmdOption(argc, argv, "--domain");
|
||||
|
||||
int listenPort = VOXEL_LISTEN_PORT;
|
||||
// Check to see if the user passed in a command line option for setting listen port
|
||||
const char* PORT_PARAMETER = "--port";
|
||||
const char* portParameter = getCmdOption(argc, argv, PORT_PARAMETER);
|
||||
if (portParameter) {
|
||||
listenPort = atoi(portParameter);
|
||||
if (listenPort < 1) {
|
||||
listenPort = VOXEL_LISTEN_PORT;
|
||||
}
|
||||
printf("portParameter=%s listenPort=%d\n", portParameter, listenPort);
|
||||
}
|
||||
|
||||
VoxelServer ourVoxelServer(Assignment::CreateCommand);
|
||||
|
||||
if (wantLocalDomain) {
|
||||
ourVoxelServer.setupStandAlone(local, listenPort);
|
||||
} else {
|
||||
if (domainIP) {
|
||||
ourVoxelServer.setupStandAlone(domainIP, listenPort);
|
||||
}
|
||||
}
|
||||
|
||||
ourVoxelServer.setArguments(argc, const_cast<char**>(argv));
|
||||
ourVoxelServer.run();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in a new issue