Scene node class for managing a single node in a scene graph. This class can hold meshes and transformations.
More...
#include <Scene.h>
|
MANDRILL_API | Node () |
| Create a new scene node.
|
|
MANDRILL_API | ~Node () |
| Destructor for scene node.
|
|
MANDRILL_API void | render (VkCommandBuffer cmd, const ptr< Camera > pCamera, const ptr< const Scene > pScene) const |
| Render a node in the scene.
|
|
MANDRILL_API void | addMesh (uint32_t meshIndex) |
| Add a mesh to the node.
|
|
MANDRILL_API void | setPipeline (ptr< Pipeline > pPipeline) |
| Set pipeline to use when rendering node.
|
|
MANDRILL_API glm::mat4 | getTransform () const |
| Get the TRS transform of the node.
|
|
MANDRILL_API void | setTransform (glm::mat4 transform) |
| Set the TRS transform of the node.
|
|
MANDRILL_API void | setVisible (bool visible) |
| Set weather the node should be rendered or not.
|
|
MANDRILL_API bool | getVisible () const |
| Get the visibility of the node.
|
|
MANDRILL_API std::vector< uint32_t > & | getMeshIndices () |
| Get the mesh indices.
|
|
Scene node class for managing a single node in a scene graph. This class can hold meshes and transformations.
◆ Node()
Create a new scene node.
- Returns
◆ ~Node()
Destructor for scene node.
- Returns
◆ addMesh()
MANDRILL_API void Mandrill::Node::addMesh |
( |
uint32_t |
meshIndex | ) |
|
|
inline |
Add a mesh to the node.
- Parameters
-
meshIndex | Mesh index that was received during mesh creation |
- Returns
◆ getMeshIndices()
MANDRILL_API std::vector< uint32_t > & Mandrill::Node::getMeshIndices |
( |
| ) |
|
|
inline |
Get the mesh indices.
- Returns
- Vector of mesh indices
◆ getTransform()
MANDRILL_API glm::mat4 Mandrill::Node::getTransform |
( |
| ) |
const |
|
inline |
Get the TRS transform of the node.
- Returns
- 4x4 matrix containing transform
◆ getVisible()
MANDRILL_API bool Mandrill::Node::getVisible |
( |
| ) |
const |
|
inline |
Get the visibility of the node.
- Returns
◆ render()
void Node::render |
( |
VkCommandBuffer |
cmd, |
|
|
const ptr< Camera > |
pCamera, |
|
|
const ptr< const Scene > |
pScene |
|
) |
| const |
Render a node in the scene.
- Parameters
-
cmd | Command buffer to use for rendering |
pCamera | Camera that defines which camera matrices to use |
pScene | Scene which the node belongs to |
- Returns
◆ setPipeline()
MANDRILL_API void Mandrill::Node::setPipeline |
( |
ptr< Pipeline > |
pPipeline | ) |
|
|
inline |
Set pipeline to use when rendering node.
- Parameters
-
- Returns
◆ setTransform()
MANDRILL_API void Mandrill::Node::setTransform |
( |
glm::mat4 |
transform | ) |
|
|
inline |
Set the TRS transform of the node.
- Parameters
-
transform | Transform to use |
- Returns
◆ setVisible()
MANDRILL_API void Mandrill::Node::setVisible |
( |
bool |
visible | ) |
|
|
inline |
Set weather the node should be rendered or not.
- Parameters
-
visible | True to render the node, otherwise false |
- Returns
The documentation for this class was generated from the following files:
- /home/runner/work/Mandrill/Mandrill/src/Scene.h
- /home/runner/work/Mandrill/Mandrill/src/Scene.cpp