|
Vulkan Schnee 0.0.1
High-performance rendering engine
|
A subclass of EngineCore::SceneNode which is the root node of a scene graph. More...
#include <SceneGraph.h>
Public Member Functions | |
| RootNode (entt::registry ®istry) | |
| Public Member Functions inherited from EngineCore::SceneNode | |
| ~SceneNode () | |
| Ecs::LocalTransform & | getLocalTransform () |
| Gets the local transform of the scene node. The local transform is relative to the parent node. | |
| const Ecs::LocalTransform & | getLocalTransform () 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 ®istry, bool disableCaching=false) | |
| Constructs a new Scene Node object. | |
A subclass of EngineCore::SceneNode which is the root node of a scene graph.
Definition at line 253 of file SceneGraph.h.
|
explicit |
Definition at line 238 of file SceneGraph.cpp.
References EngineCore::SceneNode::registry, and EngineCore::SceneNode::SceneNode().