SceneNodeComponent.ixx File
Component for linking GameObjects to the scene graph. More...
Included Headers
#include <cassert>
#include <memory>
#include <helios.engine.modules.rendering.renderable.components.RenderableComponent>
#include <helios.engine.ecs.GameObject>
#include <helios.core.units.Unit>
#include <helios.math.types>
#include <helios.scene.SceneNode>
Namespaces Index
| namespace | helios |
| namespace | engine |
|
Main engine module aggregating core infrastructure and game systems. More... | |
| namespace | modules |
|
Domain-specific components and systems. More... | |
| namespace | scene |
|
Scene graph integration for game entities. More... | |
| namespace | components |
|
Scene graph integration components. More... | |
Classes Index
| class | SceneNodeComponent |
|
Component that links a GameObject to a SceneNode in the scene graph. More... | |
Description
Component for linking GameObjects to the scene graph.
File Listing
The file content with the documentation metadata removed is:
23export namespace helios::engine::modules::scene::components {
35 class SceneNodeComponent {
47 bool isEnabled_ = true;
57 return isEnabled_;
64 isEnabled_ = true;
71 isEnabled_ = false;
79 void onActivate() noexcept {
80 sceneNode_->setActive(true);
88 void onDeactivate() noexcept {
89 sceneNode_->setActive(false);
99 explicit SceneNodeComponent(helios::scene::SceneNode* sceneNode) :
100 sceneNode_(sceneNode) {
102 assert(sceneNode_ != nullptr && "sceneNode must not be nullptr");
111 SceneNodeComponent(const SceneNodeComponent& other) = default;
116 SceneNodeComponent& operator=(const SceneNodeComponent&)= default;
121 SceneNodeComponent(SceneNodeComponent&&) noexcept = default;
126 SceneNodeComponent& operator=(SceneNodeComponent&&) noexcept = default;
137 void onClone(const SceneNodeComponent& other) {
144 auto sceneNode = std::make_unique<helios::scene::SceneNode>(other.sceneNode_->shareRenderable());
146 sceneNode_ = parent->addNode(std::move(sceneNode));
155 [[nodiscard]] helios::scene::SceneNode* sceneNode() const noexcept {
156 return sceneNode_;
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.