mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 01:13:32 +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;
|
||||
|
||||
// setup the JSON parameters so that OctreeQuery does not use a frustum and uses our JSON filter
|
||||
_entityViewer.setQueryUsesFrustum(false);
|
||||
_entityViewer.setQueryJSONParameters(queryJSONParameters);
|
||||
_entityViewer.getOctreeQuery().setUsesFrustum(false);
|
||||
_entityViewer.getOctreeQuery().setJSONParameters(queryJSONParameters);
|
||||
|
||||
entityScriptingInterface->setEntityTree(_entityViewer.getTree());
|
||||
|
||||
|
|
|
@ -36,6 +36,8 @@ public:
|
|||
virtual void render(RenderArgs* renderArgs) override { /* swallow these */ }
|
||||
|
||||
void setJurisdictionListener(JurisdictionListener* jurisdictionListener) { _jurisdictionListener = jurisdictionListener; }
|
||||
|
||||
OctreeQuery& getOctreeQuery() { return _octreeQuery; }
|
||||
|
||||
static int parseOctreeStats(QSharedPointer<ReceivedMessage> message, SharedNodePointer sourceNode);
|
||||
static void trackIncomingOctreePacket(const QByteArray& packet, const SharedNodePointer& sendingNode, bool wasStatsPacket);
|
||||
|
@ -64,10 +66,6 @@ public slots:
|
|||
int getMaxPacketsPerSecond() const { return _maxPacketsPerSecond; }
|
||||
|
||||
unsigned getOctreeElementsCount() const { return _tree->getOctreeElementsCount(); }
|
||||
|
||||
// octree query adjustments
|
||||
void setQueryUsesFrustum(bool queryUsesFrustum) { _octreeQuery.setUsesFrustum(queryUsesFrustum); }
|
||||
void setQueryJSONParameters(QJsonObject queryJSONParameters) { _octreeQuery.setJSONParameters(queryJSONParameters); }
|
||||
|
||||
private:
|
||||
JurisdictionListener* _jurisdictionListener = nullptr;
|
||||
|
|
Loading…
Reference in a new issue