Geometrize 1.0
C++ library for geometrizing images into geometric primitives
state.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <memory>
5
6namespace geometrize
7{
8class Bitmap;
9class Model;
10class Shape;
11}
12
13namespace geometrize
14{
15
20class State
21{
22public:
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}
The State class relates a shape and related properties to a measure of how close it brings the workin...
Definition: state.h:21
std::uint8_t m_alpha
The alpha of the shape.
Definition: state.h:42
State()
Definition: state.cpp:11
geometrize::State mutate()
mutate Modifies the current state in a random fashion.
Definition: state.cpp:33
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
State & operator=(const State &other)
Definition: state.cpp:19
std::shared_ptr< geometrize::Shape > m_shape
The geometric primitive owned by the state.
Definition: state.h:43
Definition: bitmap.cpp:8