Start of safe landing client work

This commit is contained in:
Simon Walton 2018-08-07 11:34:05 -07:00
parent 079b276c2b
commit 790fb43b42
4 changed files with 50 additions and 1 deletions

View file

@ -16,6 +16,7 @@
#include "Application.h"
#include "Menu.h"
#include "SceneScriptingInterface.h"
#include "SafeLanding.h"
OctreePacketProcessor::OctreePacketProcessor() {
setObjectName("Octree Packet Processor");
@ -26,6 +27,8 @@ OctreePacketProcessor::OctreePacketProcessor() {
packetReceiver.registerDirectListenerForTypes(octreePackets, this, "handleOctreePacket");
}
OctreePacketProcessor::~OctreePacketProcessor() { }
void OctreePacketProcessor::handleOctreePacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer senderNode) {
queueReceivedPacket(message, senderNode);
}

View file

@ -15,12 +15,15 @@
#include <ReceivedPacketProcessor.h>
#include <ReceivedMessage.h>
class SafeLanding;
/// Handles processing of incoming voxel packets for the interface application. As with other ReceivedPacketProcessor classes
/// the user is responsible for reading inbound packets and adding them to the processing queue by calling queueReceivedPacket()
class OctreePacketProcessor : public ReceivedPacketProcessor {
Q_OBJECT
public:
OctreePacketProcessor();
~OctreePacketProcessor();
bool octreeSequenceIsComplete(int sequenceNumber) const;
@ -39,6 +42,6 @@ private slots:
private:
static constexpr int INVALID_SEQUENCE = -1;
std::atomic<int> _completionSequenceNumber { INVALID_SEQUENCE };
std::unique_ptr<SafeLanding> _safeLanding;
};
#endif // hifi_OctreePacketProcessor_h

View file

@ -0,0 +1,17 @@
//
// SafeLanding.cpp
// interface/src/octree
//
// Created by Simon Walton.
// Copyright 2018 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "SafeLanding.h"
SafeLanding::SafeLanding() {
}
SafeLanding::~SafeLanding() { }

View file

@ -0,0 +1,26 @@
//
// SafeLanding.h
// interface/src/octree
//
// Created by Simon Walton.
// Copyright 2018 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
// Controller for logic to wait for local collision bodies before enabling physics.
#ifndef hifi_SafeLanding_h
#define hifi_SafeLanding_h
class SafeLanding {
public:
SafeLanding();
~SafeLanding();
private:
};
#endif // hifi_SafeLanding_h