mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-10 06:15:46 +02:00
Start of safe landing client work
This commit is contained in:
parent
079b276c2b
commit
790fb43b42
4 changed files with 50 additions and 1 deletions
|
@ -16,6 +16,7 @@
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
#include "Menu.h"
|
#include "Menu.h"
|
||||||
#include "SceneScriptingInterface.h"
|
#include "SceneScriptingInterface.h"
|
||||||
|
#include "SafeLanding.h"
|
||||||
|
|
||||||
OctreePacketProcessor::OctreePacketProcessor() {
|
OctreePacketProcessor::OctreePacketProcessor() {
|
||||||
setObjectName("Octree Packet Processor");
|
setObjectName("Octree Packet Processor");
|
||||||
|
@ -26,6 +27,8 @@ OctreePacketProcessor::OctreePacketProcessor() {
|
||||||
packetReceiver.registerDirectListenerForTypes(octreePackets, this, "handleOctreePacket");
|
packetReceiver.registerDirectListenerForTypes(octreePackets, this, "handleOctreePacket");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OctreePacketProcessor::~OctreePacketProcessor() { }
|
||||||
|
|
||||||
void OctreePacketProcessor::handleOctreePacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer senderNode) {
|
void OctreePacketProcessor::handleOctreePacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer senderNode) {
|
||||||
queueReceivedPacket(message, senderNode);
|
queueReceivedPacket(message, senderNode);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,12 +15,15 @@
|
||||||
#include <ReceivedPacketProcessor.h>
|
#include <ReceivedPacketProcessor.h>
|
||||||
#include <ReceivedMessage.h>
|
#include <ReceivedMessage.h>
|
||||||
|
|
||||||
|
class SafeLanding;
|
||||||
|
|
||||||
/// Handles processing of incoming voxel packets for the interface application. As with other ReceivedPacketProcessor classes
|
/// 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()
|
/// the user is responsible for reading inbound packets and adding them to the processing queue by calling queueReceivedPacket()
|
||||||
class OctreePacketProcessor : public ReceivedPacketProcessor {
|
class OctreePacketProcessor : public ReceivedPacketProcessor {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
OctreePacketProcessor();
|
OctreePacketProcessor();
|
||||||
|
~OctreePacketProcessor();
|
||||||
|
|
||||||
bool octreeSequenceIsComplete(int sequenceNumber) const;
|
bool octreeSequenceIsComplete(int sequenceNumber) const;
|
||||||
|
|
||||||
|
@ -39,6 +42,6 @@ private slots:
|
||||||
private:
|
private:
|
||||||
static constexpr int INVALID_SEQUENCE = -1;
|
static constexpr int INVALID_SEQUENCE = -1;
|
||||||
std::atomic<int> _completionSequenceNumber { INVALID_SEQUENCE };
|
std::atomic<int> _completionSequenceNumber { INVALID_SEQUENCE };
|
||||||
|
std::unique_ptr<SafeLanding> _safeLanding;
|
||||||
};
|
};
|
||||||
#endif // hifi_OctreePacketProcessor_h
|
#endif // hifi_OctreePacketProcessor_h
|
||||||
|
|
17
interface/src/octree/SafeLanding.cpp
Normal file
17
interface/src/octree/SafeLanding.cpp
Normal 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() { }
|
26
interface/src/octree/SafeLanding.h
Normal file
26
interface/src/octree/SafeLanding.h
Normal 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
|
Loading…
Reference in a new issue