Mandrill 2025.6.0
Loading...
Searching...
No Matches
Mandrill::Node Class Reference

Scene node class for managing a single node in a scene graph. This class can hold meshes and transformations. More...

#include <Scene.h>

Public Member Functions

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.
 

Detailed Description

Scene node class for managing a single node in a scene graph. This class can hold meshes and transformations.

Constructor & Destructor Documentation

◆ Node()

Node::Node ( )

Create a new scene node.

Returns

◆ ~Node()

Node::~Node ( )

Destructor for scene node.

Returns

Member Function Documentation

◆ addMesh()

MANDRILL_API void Mandrill::Node::addMesh ( uint32_t  meshIndex)
inline

Add a mesh to the node.

Parameters
meshIndexMesh 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
cmdCommand buffer to use for rendering
pCameraCamera that defines which camera matrices to use
pSceneScene 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
pPipelinePipeline to use
Returns

◆ setTransform()

MANDRILL_API void Mandrill::Node::setTransform ( glm::mat4  transform)
inline

Set the TRS transform of the node.

Parameters
transformTransform to use
Returns

◆ setVisible()

MANDRILL_API void Mandrill::Node::setVisible ( bool  visible)
inline

Set weather the node should be rendered or not.

Parameters
visibleTrue to render the node, otherwise false
Returns

The documentation for this class was generated from the following files: