Reformat to folow style
This commit is contained in:
24
inc/Tree.hpp
24
inc/Tree.hpp
@@ -1,19 +1,18 @@
|
||||
|
||||
#include "raylib.h";
|
||||
#include "raylib.h"
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
#include <list>
|
||||
|
||||
#define MAX_DEPTH 11
|
||||
|
||||
struct branch
|
||||
struct Branch
|
||||
{
|
||||
Color color;
|
||||
uint8_t numOfBranches;
|
||||
float lenghthRatio;
|
||||
};
|
||||
|
||||
struct draw_args
|
||||
struct DrawArgs
|
||||
{
|
||||
Vector2 start;
|
||||
float angleDeg;
|
||||
@@ -27,17 +26,18 @@ class Tree
|
||||
public:
|
||||
Tree(int size);
|
||||
~Tree();
|
||||
void Draw(Rectangle dest);
|
||||
void new_tree();
|
||||
void generate_tree();
|
||||
void draw_tree(draw_args first);
|
||||
void draw_branch(draw_args arg);
|
||||
Vector2 draw_line(Vector2 start, float angleDeg, float lenghth, int dep);
|
||||
void draw(Rectangle dest, float rotation);
|
||||
void newTree();
|
||||
|
||||
private:
|
||||
int size = 0;
|
||||
RenderTexture2D target = {0};
|
||||
Vector2 start = {0};
|
||||
std::vector<branch> tree;
|
||||
std::list<draw_args> draw_calls;
|
||||
std::vector<Branch> branches;
|
||||
std::list<DrawArgs> draw_calls;
|
||||
|
||||
void generateBranches();
|
||||
void drawTree();
|
||||
void drawBranch();
|
||||
Vector2 drawLine();
|
||||
};
|
Reference in New Issue
Block a user