mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 07:37:20 +02:00
provide direct access to OctreeQuery from OHV
This commit is contained in:
parent
6e6f2c50b8
commit
f9f958aef1
2 changed files with 4 additions and 6 deletions
|
@ -94,8 +94,8 @@ void EntityScriptServer::run() {
|
||||||
queryJSONParameters["serverScripts"] = OctreeQuery::NON_DEFAULT_FILTER;
|
queryJSONParameters["serverScripts"] = OctreeQuery::NON_DEFAULT_FILTER;
|
||||||
|
|
||||||
// setup the JSON parameters so that OctreeQuery does not use a frustum and uses our JSON filter
|
// setup the JSON parameters so that OctreeQuery does not use a frustum and uses our JSON filter
|
||||||
_entityViewer.setQueryUsesFrustum(false);
|
_entityViewer.getOctreeQuery().setUsesFrustum(false);
|
||||||
_entityViewer.setQueryJSONParameters(queryJSONParameters);
|
_entityViewer.getOctreeQuery().setJSONParameters(queryJSONParameters);
|
||||||
|
|
||||||
entityScriptingInterface->setEntityTree(_entityViewer.getTree());
|
entityScriptingInterface->setEntityTree(_entityViewer.getTree());
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,8 @@ public:
|
||||||
virtual void render(RenderArgs* renderArgs) override { /* swallow these */ }
|
virtual void render(RenderArgs* renderArgs) override { /* swallow these */ }
|
||||||
|
|
||||||
void setJurisdictionListener(JurisdictionListener* jurisdictionListener) { _jurisdictionListener = jurisdictionListener; }
|
void setJurisdictionListener(JurisdictionListener* jurisdictionListener) { _jurisdictionListener = jurisdictionListener; }
|
||||||
|
|
||||||
|
OctreeQuery& getOctreeQuery() { return _octreeQuery; }
|
||||||
|
|
||||||
static int parseOctreeStats(QSharedPointer<ReceivedMessage> message, SharedNodePointer sourceNode);
|
static int parseOctreeStats(QSharedPointer<ReceivedMessage> message, SharedNodePointer sourceNode);
|
||||||
static void trackIncomingOctreePacket(const QByteArray& packet, const SharedNodePointer& sendingNode, bool wasStatsPacket);
|
static void trackIncomingOctreePacket(const QByteArray& packet, const SharedNodePointer& sendingNode, bool wasStatsPacket);
|
||||||
|
@ -64,10 +66,6 @@ public slots:
|
||||||
int getMaxPacketsPerSecond() const { return _maxPacketsPerSecond; }
|
int getMaxPacketsPerSecond() const { return _maxPacketsPerSecond; }
|
||||||
|
|
||||||
unsigned getOctreeElementsCount() const { return _tree->getOctreeElementsCount(); }
|
unsigned getOctreeElementsCount() const { return _tree->getOctreeElementsCount(); }
|
||||||
|
|
||||||
// octree query adjustments
|
|
||||||
void setQueryUsesFrustum(bool queryUsesFrustum) { _octreeQuery.setUsesFrustum(queryUsesFrustum); }
|
|
||||||
void setQueryJSONParameters(QJsonObject queryJSONParameters) { _octreeQuery.setJSONParameters(queryJSONParameters); }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
JurisdictionListener* _jurisdictionListener = nullptr;
|
JurisdictionListener* _jurisdictionListener = nullptr;
|
||||||
|
|
Loading…
Reference in a new issue