Go to the documentation of this file.
6 #include <GLFW/glfw3.h>
31 void render(glm::mat4
const& WVP, glm::mat4
const& parentTransform = glm::mat4(1.0f))
const;
42 void render(glm::mat4
const& WVP, glm::mat4
const& world,
44 std::function<
void (GLuint)>
const& set_uniforms = [](GLuint ){})
const;
75 std::function<
void (GLuint)>
const& set_uniforms = [](GLuint ){});
85 void add_texture(std::string
const& name, GLuint tex_id, GLenum type);
125 std::vector<std::tuple<std::string, GLuint, GLenum>>
_textures;
GLuint _vao
Definition: node.hpp:114
std::string _name
Definition: node.hpp:134
std::vector< std::tuple< std::string, GLuint, GLenum > > _textures
Definition: node.hpp:125
GLenum _drawing_mode
Definition: node.hpp:117
bool _has_indices
Definition: node.hpp:118
void set_indices_nb(size_t const &indices_nb)
Set the number of indices to use.
Definition: node.cpp:108
size_t get_children_nb() const
Return the number of children to this node.
Definition: node.cpp:129
std::function< void(GLuint)> _set_uniforms
Definition: node.hpp:122
TRSTransformf _transform
Definition: node.hpp:128
void add_texture(std::string const &name, GLuint tex_id, GLenum type)
Add a texture to this node.
Definition: node.cpp:114
void set_program(GLuint const *const program, std::function< void(GLuint)> const &set_uniforms=[](GLuint){})
Set the program of this node.
Definition: node.cpp:92
void render(glm::mat4 const &WVP, glm::mat4 const &parentTransform=glm::mat4(1.0f)) const
Render this node.
Definition: node.cpp:15
GLsizei _vertices_nb
Definition: node.hpp:115
Contains the data for a mesh in OpenGL.
Definition: helpers.hpp:32
Represents a node of a scene graph.
Definition: node.hpp:21
GLuint const * _program
Definition: node.hpp:121
void set_geometry(bonobo::mesh_data const &shape)
Set the geometry of this node.
Definition: node.cpp:76
Node const * get_child(size_t index) const
Return the ith child.
Definition: node.cpp:135
Node()
Default constructor.
Definition: node.cpp:10
size_t get_indices_nb() const
Get the number of indices to use.
Definition: node.cpp:102
Namespace containing a few helpers for the LUGG computer graphics labs.
Definition: helpers.hpp:16
void add_child(Node const *child)
Add a child to this node.
Definition: node.cpp:121
TRSTransformf const & get_transform() const
Return this node transformation matrix.
Definition: node.cpp:142
std::vector< Node const * > _children
Definition: node.hpp:131
GLsizei _indices_nb
Definition: node.hpp:116