mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:24:00 +02:00
more work on voxelEctomy
This commit is contained in:
parent
141e231958
commit
49d8f2b2f5
13 changed files with 5 additions and 81 deletions
|
@ -11,7 +11,6 @@
|
|||
#include <glm/gtx/quaternion.hpp>
|
||||
|
||||
#include <SharedUtil.h>
|
||||
#include <VoxelConstants.h>
|
||||
#include <EventTypes.h>
|
||||
|
||||
#include "Application.h"
|
||||
|
|
|
@ -81,31 +81,15 @@ void DatagramProcessor::processDatagrams() {
|
|||
break;
|
||||
case PacketTypeEntityData:
|
||||
case PacketTypeEntityErase:
|
||||
case PacketTypeVoxelData:
|
||||
case PacketTypeVoxelErase:
|
||||
case PacketTypeOctreeStats:
|
||||
case PacketTypeEnvironmentData: {
|
||||
PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
|
||||
"Application::networkReceive()... _octreeProcessor.queueReceivedPacket()");
|
||||
bool wantExtraDebugging = application->getLogger()->extraDebugging();
|
||||
if (wantExtraDebugging && packetTypeForPacket(incomingPacket) == PacketTypeVoxelData) {
|
||||
int numBytesPacketHeader = numBytesForPacketHeader(incomingPacket);
|
||||
unsigned char* dataAt = reinterpret_cast<unsigned char*>(incomingPacket.data()) + numBytesPacketHeader;
|
||||
dataAt += sizeof(OCTREE_PACKET_FLAGS);
|
||||
OCTREE_PACKET_SEQUENCE sequence = (*(OCTREE_PACKET_SEQUENCE*)dataAt);
|
||||
dataAt += sizeof(OCTREE_PACKET_SEQUENCE);
|
||||
OCTREE_PACKET_SENT_TIME sentAt = (*(OCTREE_PACKET_SENT_TIME*)dataAt);
|
||||
dataAt += sizeof(OCTREE_PACKET_SENT_TIME);
|
||||
OCTREE_PACKET_SENT_TIME arrivedAt = usecTimestampNow();
|
||||
int flightTime = arrivedAt - sentAt;
|
||||
|
||||
qDebug("got an Octree data or erase message, sequence:%d flightTime:%d", sequence, flightTime);
|
||||
}
|
||||
|
||||
|
||||
SharedNodePointer matchedNode = NodeList::getInstance()->sendingNodeForPacket(incomingPacket);
|
||||
|
||||
if (matchedNode) {
|
||||
// add this packet to our list of voxel packets and process them on the voxel processing
|
||||
// add this packet to our list of octree packets and process them on the octree data processing
|
||||
application->_octreeProcessor.queueReceivedPacket(matchedNode, incomingPacket);
|
||||
}
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ Menu::Menu() :
|
|||
_avatarLODIncreaseFPS(ADJUST_LOD_UP_FPS),
|
||||
_avatarLODDistanceMultiplier(DEFAULT_AVATAR_LOD_DISTANCE_MULTIPLIER),
|
||||
_boundaryLevelAdjust(0),
|
||||
_maxOctreePacketsPerSecond(DEFAULT_MAX_VOXEL_PPS),
|
||||
_maxOctreePacketsPerSecond(DEFAULT_MAX_OCTREE_PPS),
|
||||
_lastAdjust(usecTimestampNow()),
|
||||
_lastAvatarDetailDrop(usecTimestampNow()),
|
||||
_fpsAverage(FIVE_SECONDS_OF_FRAMES),
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include <TextRenderer.h>
|
||||
|
||||
#include "InterfaceConfig.h"
|
||||
#include "VoxelConstants.h"
|
||||
#include "world.h"
|
||||
#include "Application.h"
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include <HeadData.h>
|
||||
|
||||
#include <VoxelConstants.h>
|
||||
#include <OctreeConstants.h> // for IDENTITY_*
|
||||
|
||||
#include "FaceModel.h"
|
||||
#include "InterfaceConfig.h"
|
||||
|
|
|
@ -508,7 +508,6 @@ void SixenseManager::emulateMouse(PalmData* palm, int index) {
|
|||
QMouseEvent mouseEvent(QEvent::MouseMove, pos, Qt::NoButton, Qt::NoButton, 0);
|
||||
|
||||
//Only send the mouse event if the opposite left button isnt held down.
|
||||
//This is specifically for edit voxels
|
||||
if (triggerButton == Qt::LeftButton) {
|
||||
if (!_triggerPressed[(int)(!index)]) {
|
||||
application->mouseMoveEvent(&mouseEvent, deviceID);
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
#include <QScreen>
|
||||
#include <QWindow>
|
||||
|
||||
#include <VoxelConstants.h>
|
||||
|
||||
#include "MainWindow.h"
|
||||
#include "Menu.h"
|
||||
#include "devices/OculusManager.h"
|
||||
|
|
|
@ -20,8 +20,6 @@
|
|||
#include <QPushButton>
|
||||
#include <QString>
|
||||
|
||||
#include <VoxelConstants.h>
|
||||
|
||||
#include "Menu.h"
|
||||
#include "ui/LodToolsDialog.h"
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
#include <GlowEffect.h>
|
||||
#include <GeometryCache.h>
|
||||
#include <VoxelConstants.h>
|
||||
#include <OctreeConstants.h>
|
||||
|
||||
#include "Application.h"
|
||||
#include "VoxelFade.h"
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include <GLMHelpers.h>
|
||||
#include <StreamUtils.h>
|
||||
#include <UUID.h>
|
||||
#include <VoxelConstants.h>
|
||||
|
||||
#include "AvatarData.h"
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include <NodeList.h>
|
||||
#include <PacketHeaders.h>
|
||||
#include <UUID.h>
|
||||
//#include <VoxelConstants.h>
|
||||
|
||||
#include "AnimationObject.h"
|
||||
#include "ArrayBufferViewClass.h"
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
//
|
||||
// VoxelConstants.h
|
||||
// libraries/voxels/src
|
||||
//
|
||||
// Created by Brad Hefta-Gaub on 4/29/13.
|
||||
// Copyright 2013 High Fidelity, Inc.
|
||||
//
|
||||
// Various important constants used throughout the system related to voxels
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
#ifndef hifi_VoxelConstants_h
|
||||
#define hifi_VoxelConstants_h
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdint.h>
|
||||
#include <OctalCode.h>
|
||||
#include <NodeList.h>
|
||||
#include <PacketHeaders.h>
|
||||
#include <glm/glm.hpp>
|
||||
#include <OctreeConstants.h>
|
||||
|
||||
// this is where the coordinate system is represented
|
||||
|
||||
const int DEFAULT_MAX_VOXELS_PER_SYSTEM = 500000;
|
||||
const int VERTICES_PER_VOXEL = 24; // 6 sides * 4 corners per side
|
||||
const int VERTEX_POINTS_PER_VOXEL = 3 * VERTICES_PER_VOXEL; // xyz for each VERTICE_PER_VOXEL
|
||||
const int INDICES_PER_VOXEL = 3 * 12; // 6 sides * 2 triangles per size * 3 vertices per triangle
|
||||
const int COLOR_VALUES_PER_VOXEL = NUMBER_OF_COLORS * VERTICES_PER_VOXEL;
|
||||
|
||||
const int VERTICES_PER_FACE = 4; // 6 sides * 4 corners per side
|
||||
const int INDICES_PER_FACE = 3 * 2; // 1 side * 2 triangles per size * 3 vertices per triangle
|
||||
const int GLOBAL_NORMALS_VERTICES_PER_VOXEL = 8; // no need for 3 copies because they don't include normal
|
||||
const int GLOBAL_NORMALS_VERTEX_POINTS_PER_VOXEL = 3 * GLOBAL_NORMALS_VERTICES_PER_VOXEL;
|
||||
const int GLOBAL_NORMALS_COLOR_VALUES_PER_VOXEL = NUMBER_OF_COLORS * GLOBAL_NORMALS_VERTICES_PER_VOXEL;
|
||||
|
||||
typedef unsigned long int glBufferIndex;
|
||||
const glBufferIndex GLBUFFER_INDEX_UNKNOWN = ULONG_MAX;
|
||||
|
||||
const float SIXTY_FPS_IN_MILLISECONDS = 1000.0f / 60.0f;
|
||||
const float VIEW_CULLING_RATE_IN_MILLISECONDS = 1000.0f; // once a second is fine
|
||||
|
||||
const quint64 CLIENT_TO_SERVER_VOXEL_SEND_INTERVAL_USECS = 1000 * 5; // 1 packet every 50 milliseconds
|
||||
|
||||
|
||||
const int DEFAULT_MAX_VOXEL_PPS = 600; // the default maximum PPS we think a voxel server should send to a client
|
||||
|
||||
#endif // hifi_VoxelConstants_h
|
|
@ -17,7 +17,6 @@
|
|||
#include <AACube.h>
|
||||
#include <OctreeConstants.h>
|
||||
#include <SharedUtil.h>
|
||||
#include "VoxelConstants.h"
|
||||
|
||||
struct VoxelDetail {
|
||||
float x;
|
||||
|
|
Loading…
Reference in a new issue