|
NoJobEngine 2.0.7
|
#include <Scene.h>
Classes | |
| struct | PerceptionTargetInfo |
| struct | LastSeenTargetInfo |
| struct | AIDebugStateInfo |
| struct | BTDebugInfo |
| struct | RuntimeParticle |
Public Member Functions | |
| std::optional< LastSeenTargetInfo > | GetLastSeenTarget (std::uint32_t observerHandle) const |
| std::optional< AIDebugStateInfo > | GetAIDebugState (std::uint32_t entityHandle) const |
| std::optional< BTDebugInfo > | GetBehaviorTreeDebug (std::uint32_t entityHandle) const |
| ScriptableEntity * | FindRuntimeScript (std::uint32_t entityHandle, const std::string &scriptName) const |
| void | RegisterEntityBehaviorTreeBindings (std::uint32_t entityHandle, BTNativeRegistry ®istry) const |
| Scene () | |
| Scene (const Scene &other) | |
| Scene & | operator= (const Scene &)=delete |
| ~Scene () | |
| std::unique_ptr< Scene > | Copy () const |
| void | RestoreFrom (const Scene &other) |
| Entity | CreateEntity (const std::string &name="Entity") |
| void | DestroyEntity (Entity entity) |
| bool | IsValid (std::uint32_t handle) const |
| std::vector< Entity > | GetEntities () |
| std::vector< NativeScriptComponent > & | GetAdditionalNativeScripts (std::uint32_t handle) |
| const std::vector< NativeScriptComponent > & | GetAdditionalNativeScripts (std::uint32_t handle) const |
| void | OnRuntimeStart () |
| void | OnRuntimeStop () |
| void | OnUpdate (float deltaTime) |
| std::vector< PerceptionTargetInfo > | GetPerceivedTargets (std::uint32_t observerHandle) const |
| float | GetDeltaTime () const |
| void | SetNavigationSystem (NavigationSystem *navigationSystem) |
| NavigationSystem * | GetNavigationSystem () |
| const NavigationSystem * | GetNavigationSystem () const |
| void | SetSpatialQuery (const ISpatialQuery *spatialQuery) |
| const ISpatialQuery * | GetSpatialQuery () const |
| const std::vector< RuntimeParticle > & | GetParticles (std::uint32_t handle) const |
| Entity | GetParent (Entity entity) |
| std::vector< Entity > | GetChildren (Entity entity) |
| bool | IsDescendant (Entity possibleDescendant, Entity ancestor) const |
| bool | SetParent (Entity child, Entity parent, bool keepWorldTransform=true) |
| void | Unparent (Entity child, bool keepWorldTransform=true) |
| glm::mat4 | GetWorldTransform (Entity entity) const |
| void | SetWorldTransform (Entity entity, const glm::mat4 &worldTransform) |
Friends | |
| class | Entity |
|
default |
References Scene().
Referenced by GetWorldTransform(), operator=(), RestoreFrom(), Scene(), and Scene().
| NoJob::Scene::Scene | ( | const Scene & | other | ) |
| NoJob::Scene::~Scene | ( | ) |
Definition at line 92 of file Scene.cpp.
References OnRuntimeStop().
| std::unique_ptr< Scene > NoJob::Scene::Copy | ( | ) | const |
Definition at line 98 of file Scene.cpp.
Referenced by main(), and operator=().
| Entity NoJob::Scene::CreateEntity | ( | const std::string & | name = "Entity" | ) |
Definition at line 133 of file Scene.cpp.
References NoJob::Entity::Entity(), Entity, NoJob::IDComponent::ID, and NoJob::TagComponent::Tag.
Referenced by NoJob::PrefabSerializer::Instantiate(), NoJob::SceneSerializer::Load(), main(), and operator=().
| void NoJob::Scene::DestroyEntity | ( | Entity | entity | ) |
Definition at line 161 of file Scene.cpp.
References NoJob::RelationshipComponent::Children, NoJob::Entity::Entity(), Entity, NoJob::Entity::GetComponent(), IsValid(), and Unparent().
Referenced by NoJob::SceneSerializer::Load(), main(), operator=(), and NoJob::PrefabSerializer::Revert().
| ScriptableEntity * NoJob::Scene::FindRuntimeScript | ( | std::uint32_t | entityHandle, |
| const std::string & | scriptName ) const |
|
inline |
Definition at line 95 of file Scene.h.
Referenced by NoJob::SceneSerializer::Load(), and NoJob::SceneSerializer::Save().
|
inline |
| std::optional< Scene::AIDebugStateInfo > NoJob::Scene::GetAIDebugState | ( | std::uint32_t | entityHandle | ) | const |
| std::optional< Scene::BTDebugInfo > NoJob::Scene::GetBehaviorTreeDebug | ( | std::uint32_t | entityHandle | ) | const |
Definition at line 355 of file Scene.cpp.
References NoJob::Scene::BTDebugInfo::BlackboardEntries, NoJob::Scene::BTDebugInfo::BlackboardRevision, NoJob::Scene::BTDebugInfo::Events, NoJob::Scene::BTDebugInfo::LastResult, NoJob::Scene::BTDebugInfo::Nodes, NoJob::Scene::BTDebugInfo::TargetHandle, and NoJob::Scene::BTDebugInfo::TargetPosition.
Definition at line 1545 of file Scene.cpp.
References NoJob::RelationshipComponent::Children, Entity, NoJob::Entity::GetComponent(), and IsValid().
Referenced by NoJob::PrefabSerializer::Revert().
| std::vector< Entity > NoJob::Scene::GetEntities | ( | ) |
Definition at line 231 of file Scene.cpp.
Referenced by NoJob::NavMeshGeometryExtractor::Extract(), NoJob::SceneSerializer::Load(), main(), NoJob::NeuralTrainingAgent::OnUpdate(), operator=(), NoJob::NavMeshVoxelizer::Rasterize(), and NoJob::SceneRenderer::Render().
| std::optional< Scene::LastSeenTargetInfo > NoJob::Scene::GetLastSeenTarget | ( | std::uint32_t | observerHandle | ) | const |
|
inline |
|
inline |
Definition at line 1522 of file Scene.cpp.
References NoJob::Entity::Entity(), Entity, NoJob::Entity::GetComponent(), and IsValid().
Referenced by NoJob::PrefabSerializer::Revert().
| const std::vector< Scene::RuntimeParticle > & NoJob::Scene::GetParticles | ( | std::uint32_t | handle | ) | const |
| std::vector< Scene::PerceptionTargetInfo > NoJob::Scene::GetPerceivedTargets | ( | std::uint32_t | observerHandle | ) | const |
Definition at line 506 of file Scene.cpp.
References NoJob::Scene::PerceptionTargetInfo::EntityHandle, IsValid(), NoJob::Scene::PerceptionTargetInfo::IsVisible, NoJob::Scene::PerceptionTargetInfo::LastKnownPosition, NoJob::Scene::PerceptionTargetInfo::TimeSinceLastSeen, NoJob::Scene::PerceptionTargetInfo::TrackedDuration, and NoJob::Scene::PerceptionTargetInfo::VisibleDuration.
|
inline |
| glm::mat4 NoJob::Scene::GetWorldTransform | ( | Entity | entity | ) | const |
Definition at line 1736 of file Scene.cpp.
References NoJob::Entity::Entity(), Entity, GetWorldTransform(), IsValid(), and Scene().
Referenced by NoJob::NavMeshGeometryExtractor::Extract(), GetWorldTransform(), OnRuntimeStart(), OnUpdate(), NoJob::NavMeshVoxelizer::Rasterize(), NoJob::SceneRenderer::Render(), SetParent(), SetWorldTransform(), and Unparent().
Definition at line 1572 of file Scene.cpp.
References Entity, and IsValid().
Referenced by SetParent().
| bool NoJob::Scene::IsValid | ( | std::uint32_t | handle | ) | const |
Definition at line 221 of file Scene.cpp.
Referenced by DestroyEntity(), NoJob::ProjectPanel::Draw(), GetChildren(), GetLastSeenTarget(), GetParent(), GetPerceivedTargets(), GetWorldTransform(), IsDescendant(), OnRuntimeStart(), OnUpdate(), operator=(), SetParent(), SetWorldTransform(), and Unparent().
| void NoJob::Scene::OnRuntimeStart | ( | ) |
Definition at line 409 of file Scene.cpp.
References NoJob::Entity::Entity(), GetWorldTransform(), NoJob::AudioEngine::Init(), IsValid(), NoJob::AudioEngine::Play(), NoJob::NavAgent::Speed(), and NoJob::NavAgent::StoppingDistance().
| void NoJob::Scene::OnRuntimeStop | ( | ) |
Definition at line 483 of file Scene.cpp.
References NoJob::AudioEngine::StopAll().
Referenced by RestoreFrom(), and ~Scene().
| void NoJob::Scene::OnUpdate | ( | float | deltaTime | ) |
Definition at line 744 of file Scene.cpp.
References NoJob::ScriptRegistry::ApplyFieldsToInstance(), NoJob::Scene::RuntimeParticle::Color, NoJob::Cone, NoJob::Scene::RuntimeParticle::EndColor, NoJob::Entity::Entity(), Entity, GetWorldTransform(), IsValid(), NoJob::Scene::RuntimeParticle::Lifetime, NoJob::Scene::RuntimeParticle::Position, NoJob::ScriptRegistry::ReadFieldsFromInstance(), NoJob::AudioEngine::SetListener(), SetWorldTransform(), NoJob::Scene::RuntimeParticle::Size, NoJob::Sphere, NoJob::Scene::RuntimeParticle::StartColor, NoJob::Scene::RuntimeParticle::StartSize, NoJob::AudioEngine::Update(), and NoJob::Scene::RuntimeParticle::Velocity.
References Copy(), CreateEntity(), DestroyEntity(), Entity, GetEntities(), IsValid(), RestoreFrom(), and Scene().
| void NoJob::Scene::RegisterEntityBehaviorTreeBindings | ( | std::uint32_t | entityHandle, |
| BTNativeRegistry & | registry ) const |
Definition at line 327 of file Scene.cpp.
References NoJob::BTNativeRegistry::HasAction(), and NoJob::BTNativeRegistry::HasCondition().
| void NoJob::Scene::RestoreFrom | ( | const Scene & | other | ) |
Definition at line 105 of file Scene.cpp.
References OnRuntimeStop(), and Scene().
Referenced by operator=().
|
inline |
Definition at line 1610 of file Scene.cpp.
References Entity, NoJob::Entity::GetComponent(), GetWorldTransform(), IsDescendant(), IsValid(), NoJob::RelationshipComponent::Parent, and SetWorldTransform().
Referenced by NoJob::PrefabSerializer::Instantiate(), NoJob::SceneSerializer::Load(), and NoJob::PrefabSerializer::Revert().
|
inline |
| void NoJob::Scene::SetWorldTransform | ( | Entity | entity, |
| const glm::mat4 & | worldTransform ) |
Definition at line 1772 of file Scene.cpp.
References NoJob::Entity::Entity(), Entity, NoJob::Entity::GetComponent(), GetWorldTransform(), and IsValid().
Referenced by OnUpdate(), and SetParent().
| void NoJob::Scene::Unparent | ( | Entity | child, |
| bool | keepWorldTransform = true ) |
Definition at line 1685 of file Scene.cpp.
References Entity, NoJob::Entity::GetComponent(), GetWorldTransform(), and IsValid().
Referenced by DestroyEntity().
|
friend |
Definition at line 824 of file Scene.h.
References Entity.
Referenced by CreateEntity(), DestroyEntity(), Entity, GetChildren(), GetParent(), GetWorldTransform(), IsDescendant(), OnUpdate(), operator=(), SetParent(), SetWorldTransform(), and Unparent().