Voxeloop
0.1.0
Musical Loop Generation in Voxel World
Tree.hpp
Go to the documentation of this file.
1
#ifndef VOXELOOP_TREE_HPP
2
#define VOXELOOP_TREE_HPP
3
4
#include "
LinkedList.hpp
"
5
6
typedef
struct
{
7
char
key
;
8
float
mvmt
;
9
}
TreeData
;
10
11
struct
TreeNode
{
12
TreeData
*
value
;
13
struct
TreeNode
*
left
, *
right
, *
prev
;
14
};
15
16
typedef
struct
TreeNode
TreeNode
;
17
18
class
Tree
{
19
public
:
20
Tree
();
21
22
TreeNode
*
root
;
23
TreeNode
*
addNode
(
char
key,
float
mvmt,
TreeNode
*troot);
24
void
flatten
(
TreeNode
*node);
25
26
TreeNode
*
createNode
(
char
key,
float
mvmt);
27
};
28
29
#endif
// VOXELOOP_AVLTREE_HPP
LinkedList.hpp
Tree
Definition:
Tree.hpp:18
Tree::addNode
TreeNode * addNode(char key, float mvmt, TreeNode *troot)
Definition:
Tree.cpp:5
Tree::flatten
void flatten(TreeNode *node)
Definition:
Tree.cpp:22
Tree::createNode
TreeNode * createNode(char key, float mvmt)
Definition:
Tree.cpp:44
Tree::Tree
Tree()
Definition:
Tree.cpp:3
Tree::root
TreeNode * root
Definition:
Tree.hpp:22
TreeData
Definition:
Tree.hpp:6
TreeData::mvmt
float mvmt
Definition:
Tree.hpp:8
TreeData::key
char key
Definition:
Tree.hpp:7
TreeNode
Definition:
Tree.hpp:11
TreeNode::value
TreeData * value
Definition:
Tree.hpp:12
TreeNode::right
struct TreeNode * right
Definition:
Tree.hpp:13
TreeNode::prev
struct TreeNode * prev
Definition:
Tree.hpp:13
TreeNode::left
struct TreeNode * left
Definition:
Tree.hpp:13
core
include
Data Structures
Tree.hpp
Generated by
1.9.0