-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathByte.h
More file actions
41 lines (34 loc) · 1012 Bytes
/
Byte.h
File metadata and controls
41 lines (34 loc) · 1012 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#pragma once // include guard: ensure the compiler only includes this file once
#include "ofMain.h"
#include "DNA.h"
class Byte{
public:
Byte();
void setup(DNA _dna, int _bitNum);
void setup(int _numOfGenes, int _bitNum);
void draw();
void calcPhenotype();
void draw(int x, int y, vector<bool> _bitStates);
void branch(float b_length, float theta, float b_width, int depthRemaining,vector<bool> _bitStates);
void mutate(float mutationRate);
float getFitness();
Byte crossover(Byte partner);
int numOfGenes, geneSize;
float fitness;
DNA dna;
float startLength;
float startTheta;
int startWidth;
float minLength;
float branchReduce;
float thetaVariance;
float reduceVariance;
float startAngle;
float erosionFactor;
int leafSize;
float leafColorB;
float leafColorA;
float seed = 0;
int bitCount = 0;
int bitNum;
};