Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
EngineCore::RootNode Class Reference

A subclass of EngineCore::SceneNode which is the root node of a scene graph. More...

#include <SceneGraph.h>

Inheritance diagram for EngineCore::RootNode:
Collaboration diagram for EngineCore::RootNode:

Public Member Functions

 RootNode (entt::registry &registry)
Public Member Functions inherited from EngineCore::SceneNode
 ~SceneNode ()
Ecs::LocalTransformgetLocalTransform ()
 Gets the local transform of the scene node. The local transform is relative to the parent node.
const Ecs::LocalTransformgetLocalTransform () const
void registerWithEcs ()
entt::entity getEntity () const
 Gets the entity associated with this scene node.
void setWorldPosition (const glm::vec3 &newLocation)
 Sets the world position of the scene node. This will calculate the corresponding local position based on the parent's world transform.
void setWorldRotation (const glm::vec3 &newRotation)
 Sets the world rotation of this node with euler angles.
void setWorldRotation (const glm::quat &newRotation)
 Sets a new world rotation with a quaternion on this node.
void rotateWorld (const glm::vec3 &deltaRotation)
 Applies an incremental rotation to the current world rotation using quaternion multiplication. This avoids euler angle instability that occurs with get/set rotation round-trips.
void rotateWorld (const glm::quat &deltaRotation)
 Applies an incremental rotation to the current world rotation using quaternion multiplication.
void setWorldScale (const glm::vec3 &newScale)
 sets the scale for this node
void setLocalModelMatrix (const glm::mat4 &newModelMatrix)
 Overwrites all components of the transform.
void setWorldModelMatrix (const glm::mat4 &newModelMatrix)
 Overwrites all components of this transform.
void addChild (const std::shared_ptr< SceneNode > &newChild)
 Adds a child node to this node.
void addChildren (std::vector< std::shared_ptr< SceneNode > > newChildren)
 adds new children to this node
void clearChildren ()
 Removes all children from this node.
void removeChild (const std::shared_ptr< SceneNode > &child)
 Removes a single child from this node.
const glm::mat4 & getWorldMatrix () const
 get the world matrix as a raw glm matrix
bool isWorldMatrixDirty () const
 Checks if the world matrix has to be recalculated.
bool isRoot () const
 Checks if this node is the root node.
std::vector< std::weak_ptr< SceneNode > > getChildren () const
 Get a list of all children of this node.
void markDirtyRecursive ()
 Marks this node and its children as dirty.

Additional Inherited Members

Protected Member Functions inherited from EngineCore::SceneNode
 SceneNode (entt::registry &registry, bool disableCaching=false)
 Constructs a new Scene Node object.

Detailed Description

A subclass of EngineCore::SceneNode which is the root node of a scene graph.

Date
2025-12-02
Author
Konstantin Passig

Definition at line 253 of file SceneGraph.h.

Constructor & Destructor Documentation

◆ RootNode()

EngineCore::RootNode::RootNode ( entt::registry & registry)
explicit

Definition at line 238 of file SceneGraph.cpp.

References EngineCore::SceneNode::registry, and EngineCore::SceneNode::SceneNode().

Here is the call graph for this function:

The documentation for this class was generated from the following files:
  • /home/magerbeton/Documents/gl3-vulkan/Engine/include/Engine/World/SceneGraph.h
  • /home/magerbeton/Documents/gl3-vulkan/Engine/src/Engine/World/SceneGraph.cpp