Geometrize  1.0
C++ library for geometrizing images into geometric primitives
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
state.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <cstdint>
4 #include <memory>
5 
6 namespace geometrize
7 {
8 class Bitmap;
9 class Model;
10 class Shape;
11 }
12 
13 namespace geometrize
14 {
15 
20 class State
21 {
22 public:
23  State(); // Seems to be necessary of because MSVC futures - "_Associated_state ctor assumes _Ty is default constructible"
24 
30  State(const std::shared_ptr<geometrize::Shape>& shape, std::uint8_t alpha);
31  ~State() = default;
32  State(const State& other);
33  State& operator=(const State& other);
34 
40 
41  double m_score;
42  std::uint8_t m_alpha;
43  std::shared_ptr<geometrize::Shape> m_shape;
44 };
45 
46 }
std::shared_ptr< geometrize::Shape > m_shape
The geometric primitive owned by the state.
Definition: state.h:43
State()
Definition: state.cpp:11
double m_score
The score of the state, a measure of the improvement applying the state to the current bitmap will ha...
Definition: state.h:41
std::uint8_t m_alpha
The alpha of the shape.
Definition: state.h:42
geometrize::State mutate()
mutate Modifies the current state in a random fashion.
Definition: state.cpp:33
State & operator=(const State &other)
Definition: state.cpp:19
The State class relates a shape and related properties to a measure of how close it brings the workin...
Definition: state.h:20