Basic, semi-abstract scene node class. Can have children which are other scene nodes, or derived types.
More...
#include <node.hpp>
Inherited by cat3d::obj::camera, cat3d::obj::model, cat3d::obj::texture, and cat3d::obj::timer.
Basic, semi-abstract scene node class. Can have children which are other scene nodes, or derived types.
◆ bind()
| size_t cat3d::scene::node::bind |
( |
node_bind_loc |
loc, |
|
|
std::function< void()> |
fn |
|
) |
| |
Add a hook into the update cycle of the node.
- Parameters
-
| loc | The location in the update cycle to hook into |
| fn | The function to run |
- Returns
- size_t An event token id, to unbind once the hooked class goes out of scope.
◆ create()
template<typename Obj , typename... Args>
| Obj* cat3d::scene::node::create |
( |
Args... |
args | ) |
|
|
inline |
Add a derived node class as a child.
- Template Parameters
-
| Obj | The type of object to add |
| Args | The arguemnts passed to the constructor |
- Returns
- Obj* Pointer to the newly created node instance
◆ create_node()
| node* cat3d::scene::node::create_node |
( |
| ) |
|
Create a child node.
- Returns
- node* The created node
◆ delete_child()
| void cat3d::scene::node::delete_child |
( |
node * |
child | ) |
|
Remove the given child node.
- Parameters
-
| child | A child of this node |
◆ new_root()
| static node* cat3d::scene::node::new_root |
( |
| ) |
|
|
static |
Create a new root scene node.
- Returns
- node*
◆ parent()
| node* cat3d::scene::node::parent |
( |
| ) |
const |
Get this node's parent.
- Returns
- node*
◆ render_self()
| virtual void cat3d::scene::node::render_self |
( |
window & |
win | ) |
|
|
protectedvirtual |
Overridden by child classes to implement custom rendering.
- Parameters
-
| win | The main cat3d window. |
Reimplemented in cat3d::obj::model.
◆ transform()
Access to the underlying transform.
- Returns
- util::transform& Reference to this node's transform.
◆ unbind()
| void cat3d::scene::node::unbind |
( |
size_t |
id | ) |
|
Unbind a hook from the node.
- Parameters
-
◆ update_self()
| virtual void cat3d::scene::node::update_self |
( |
window & |
win | ) |
|
|
protectedvirtual |
The documentation for this class was generated from the following file: