SceneNodeConfig Class
Fluent configuration for scene graph integration. More...
Declaration
Public Constructors Index
| SceneNodeConfig (const helios::engine::ecs::GameObject gameObject) | |
|
Constructs a SceneNodeConfig for the given GameObject. More... | |
Public Member Functions Index
| SceneNodeConfig & | parent (helios::scene::SceneNode *parent) |
|
Creates a SceneNode and parents it to the given node. More... | |
| SceneNodeConfig & | parent (helios::engine::ecs::GameObject parent) |
|
Creates a SceneNode and parents it to another GameObject's node. More... | |
| SceneNodeConfig & | inherit (helios::math::TransformType transformType) |
|
Sets the transform inheritance mode. More... | |
Private Member Functions Index
| void | ensureRenderableComponent () |
|
Validates that a RenderableComponent exists. More... | |
| void | ensureSceneNode (const bool shouldBeAvailable) |
|
Validates SceneNodeComponent presence. More... | |
Private Member Attributes Index
| helios::engine::ecs::GameObject | gameObject_ |
|
Non-owning pointer to the target GameObject. More... | |
Description
Fluent configuration for scene graph integration.
Allows attaching a GameObject's renderable to the scene graph by creating a SceneNode and setting its parent and inheritance mode. The config automatically manages HierarchyComponent relationships when parenting to another GameObject.
## Usage
```cpp sceneConfig.parent(rootNode) .inherit(TransformType::Translation | TransformType::Rotation); ```
- See Also
SceneNodeComponent
- See Also
HierarchyComponent
- See Also
TransformType
Definition at line 41 of file SceneNodeConfig.ixx.
Public Constructors
SceneNodeConfig()
| inline explicit |
Constructs a SceneNodeConfig for the given GameObject.
- Parameters
-
<a href="/docs/helios/namespaces/helios/engine/builder/gameobject">gameObject</a> Target GameObject to configure.
Definition at line 80 of file SceneNodeConfig.ixx.
Public Member Functions
inherit()
| inline |
Sets the transform inheritance mode.
- Parameters
-
transformType Which transforms to inherit from parent.
- Returns
Reference to this config for chaining.
Definition at line 149 of file SceneNodeConfig.ixx.
Reference SceneNodeConfig.
parent()
| inline |
Creates a SceneNode and parents it to the given node.
- Parameters
-
parent Parent SceneNode in the scene graph.
- Returns
Reference to this config for chaining.
Definition at line 89 of file SceneNodeConfig.ixx.
References parent, SceneNodeConfig and helios::engine::modules::rendering::renderable::components::RenderableComponent::shareRenderable.
Referenced by helios::engine::builder::gameObject::builders::configs::MeshRenderableConfig::attachTo, helios::engine::builder::gameObject::builders::configs::TextRenderableConfig::attachTo, helios::engine::builder::gameObject::builders::configs::TextRenderableConfig::attachTo, parent and parent.
parent()
| inline |
Creates a SceneNode and parents it to another GameObject's node.
Establishes both scene graph and ECS hierarchy relationships:
- Adds HierarchyComponent to both entities if not present
- Sets parent-child relationship in HierarchyComponent
- Parents the SceneNode to the parent GameObject's SceneNode
- Parameters
-
parent Parent GameObject whose SceneNode will be the parent.
- Returns
Reference to this config for chaining.
Definition at line 118 of file SceneNodeConfig.ixx.
References parent, SceneNodeConfig and helios::engine::modules::rendering::renderable::components::RenderableComponent::shareRenderable.
Private Member Functions
ensureRenderableComponent()
| inline |
Validates that a RenderableComponent exists.
Definition at line 52 of file SceneNodeConfig.ixx.
ensureSceneNode()
| inline |
Validates SceneNodeComponent presence.
- Parameters
-
shouldBeAvailable Whether the component should exist.
Definition at line 62 of file SceneNodeConfig.ixx.
Private Member Attributes
gameObject_
|
Non-owning pointer to the target GameObject.
Definition at line 46 of file SceneNodeConfig.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.