Overte C++ Documentation
RecurseOctreeToMapOperator.h
1 //
2 // RecurseOctreeToMapOperator.h
3 // libraries/entities/src
4 //
5 // Created by Seth Alves on 3/16/15.
6 // Copyright 2013 High Fidelity, Inc.
7 // Copyright 2023 Overte e.V.
8 //
9 // Distributed under the Apache License, Version 2.0.
10 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
11 // SPDX-License-Identifier: Apache-2.0
12 //
13 
14 #include "EntityTree.h"
15 
16 class ScriptEngine;
17 
18 class RecurseOctreeToMapOperator : public RecurseOctreeOperator {
19 public:
20  RecurseOctreeToMapOperator(QVariantMap& map, const OctreeElementPointer& top, ScriptEngine* engine, bool skipDefaultValues,
21  bool skipThoseWithBadParents, std::shared_ptr<AvatarData> myAvatar);
22  bool preRecursion(const OctreeElementPointer& element) override;
23  bool postRecursion(const OctreeElementPointer& element) override;
24  private:
25  QVariantMap& _map;
26  OctreeElementPointer _top;
27  ScriptEngine* _engine;
28  bool _withinTop;
29  bool _skipDefaultValues;
30  bool _skipThoseWithBadParents;
31  std::shared_ptr<AvatarData> _myAvatar;
32 };
derive from this class to use the Octree::recurseTreeWithOperator() method
Definition: Octree.h:43
Provides an engine-independent interface for a scripting engine.
Definition: ScriptEngine.h:93