32 void Update(
float deltaTime);
37 Node3D* GetAudioReceiver();
39 void SetActiveCamera(
Camera3D* activeCamera);
41 void SetAudioReceiver(
Node3D* newReceiver);
43 Node* SpawnNode(
TypeId actorType, glm::vec3 position = {});
44 Node* SpawnNode(
const char* typeName, glm::vec3 position = {});
45 Node* SpawnScene(
const char* sceneName, glm::vec3 position = {});
46 Node* SpawnScene(
Scene* scene, glm::vec3 position = {});
47 void DespawnScene(
Node* sceneRoot);
51 template<
class NodeClass>
54 return (NodeClass*)SpawnNode(NodeClass::GetStaticType(), position);
58 void SetRootNode(
Node* node);
60 void DestroyRootNode();
61 Node* FindNode(
const std::string& name);
63 std::vector<Node*> FindNodesWithTag(
const char* tag);
64 std::vector<Node*> FindNodesWithName(
const char* name);
65 std::vector<Node*> GatherNodes();
66 void GatherNodes(std::vector<Node*>& outNodes);
70 Node* FindNodeByUuid(uint64_t uuid);
71 void RegisterNodeUuid(
Node* node);
72 void UnregisterNodeUuid(
Node* node);
74 bool FindNavPath(glm::vec3 start, glm::vec3 end, std::vector<glm::vec3>& outPath);
75 bool FindRandomNavPoint(glm::vec3& outPoint);
76 bool FindClosestNavPoint(glm::vec3 inPoint, glm::vec3& outPoint);
77 void BuildNavigationData();
78 void EnableAutoNavRebuild(
bool enable);
79 bool IsAutoNavRebuildEnabled()
const;
80 void InvalidateNavMesh();
83 int32_t GetIndex()
const;
85 void AddLine(
const Line& line);
86 void RemoveLine(
const Line& line);
87 void RemoveAllLines();
88 const std::vector<Line>& GetLines()
const;
90 const std::vector<class Light3D*>& GetLights();
91 std::vector<FadingLight>& GetFadingLights();
93 void SetAmbientLightColor(glm::vec4 color);
94 glm::vec4 GetAmbientLightColor()
const;
96 void SetShadowColor(glm::vec4 shadowColor);
97 glm::vec4 GetShadowColor()
const;
102 void SetGravity(glm::vec3 gravity);
103 glm::vec3 GetGravity()
const;
105 btDynamicsWorld* GetDynamicsWorld();
106 btDbvtBroadphase* GetBroadphase();
112 uint8_t collisionMask,
114 uint32_t numIgnoredObjects = 0,
115 btCollisionObject** ignoreObjects =
nullptr,
116 bool ignorePureOverlap =
true);
121 uint8_t collisionMask,
122 bool ignorePureOverlap,
129 uint8_t collisionMask,
133 btConvexShape* convexShape,
137 uint8_t collisionMask,
139 uint32_t numIgnoreObjects = 0,
140 btCollisionObject** ignoreObjects =
nullptr);
142 void RegisterNode(
Node* node,
bool subRoot);
143 void UnregisterNode(
Node* node,
bool subRoot);
144 const std::vector<Audio3D*>& GetAudios()
const;
146 void LoadScene(
const char* name,
bool instant);
147 void QueueRootScene(
const char* name);
148 void QueueRootNode(
Node* node);
150 void EnableInternalEdgeSmoothing(
bool enable);
151 bool IsInternalEdgeSmoothingEnabled()
const;
153 void DirtyAllWidgets();
155 void UpdateRenderSettings();
156 void AddNewlyRegisteredNode(
Node* node);
159 Node* SpawnDefaultRoot();
160 void PlaceNewlySpawnedNode(
NodePtr node, glm::vec3 position);
162 void OverrideDynamicsWorld(btDiscreteDynamicsWorld* world);
163 void RestoreDynamicsWorld();
170 auto typedNodeFind = [&](
Node* node) ->
bool
172 if (node->Is(T::ClassRuntimeId()))
174 ret =
static_cast<T*
>(node);
181 if (mRootNode !=
nullptr)
183 mRootNode->ForEach(typedNodeFind);
192 auto typedNodeGather = [&](
Node* node) ->
bool
194 if (node->Is(T::ClassRuntimeId()))
196 outNodes.push_back(
static_cast<T*
>(node));
202 if (mRootNode !=
nullptr)
204 mRootNode->Traverse(typedNodeGather);
210 void UpdateLines(
float deltaTime);
211 void ExtractPersistingNodes();
215 static std::unordered_set<NodePtrWeak> sNewlyRegisteredNodes;
218 std::vector<NodePtr> mPersistingNodes;
219 std::vector<Line> mLines;
220 std::vector<class Light3D*> mLights;
221 std::vector<class Audio3D*> mAudios;
222 std::vector<FadingLight> mFadingLights;
224 glm::vec4 mAmbientLightColor;
225 glm::vec4 mShadowColor;
228 Camera3D* mCameraOverride =
nullptr;
230 bool mPendingClear =
false;
231 bool mAutoNavRebuild =
false;
234 btDefaultCollisionConfiguration* mCollisionConfig =
nullptr;
235 btCollisionDispatcher* mCollisionDispatcher =
nullptr;
236 btDbvtBroadphase* mBroadphase =
nullptr;
237 btSequentialImpulseConstraintSolver* mSolver =
nullptr;
238 btDiscreteDynamicsWorld* mDynamicsWorld =
nullptr;
239 btDiscreteDynamicsWorld* mDefaultDynamicsWorld =
nullptr;;
240 std::vector<PrimitivePair> mCurrentOverlaps;
241 std::vector<PrimitivePair> mPreviousOverlaps;
244 std::unordered_map<uint64_t, Node*> mUuidMap;
Definition Particle3d.h:34
Definition ParticleSystem.h:66