Improved DrawVisitor to accept list of nodes

This commit is contained in:
Bruno
2021-01-24 17:16:28 +01:00
parent edeec9568e
commit b17136d23a
2 changed files with 25 additions and 13 deletions

View File

@@ -1,6 +1,8 @@
#ifndef DRAWVISITOR_H
#define DRAWVISITOR_H
#include <vector>
#include <glm/glm.hpp>
#include "Visitor.h"
@@ -8,14 +10,14 @@ class DrawVisitor : public Visitor
{
glm::mat4 modelview_;
glm::mat4 projection_;
Node *target_;
bool done_;
std::vector<Node *> targets_;
bool force_;
int num_duplicat_;
glm::mat4 transform_duplicat_;
public:
DrawVisitor(Node *nodetodraw, glm::mat4 projection, bool force = false);
DrawVisitor(std::vector<Node *> nodestodraw, glm::mat4 projection, bool force = false);
void loop(int num, glm::mat4 transform);