Geometrize  1.0
C++ library for geometrizing images into geometric primitives
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
shapefactory.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <cstdint>
4 #include <functional>
5 #include <memory>
6 
7 #include "shape.h"
8 #include "shapetypes.h"
9 
10 namespace geometrize
11 {
12 class Shape;
13 }
14 
15 namespace geometrize
16 {
17 
26 std::function<std::shared_ptr<geometrize::Shape>()> createDefaultShapeCreator(geometrize::ShapeTypes types, std::int32_t w, std::int32_t h);
27 
33 std::shared_ptr<geometrize::Shape> create(geometrize::ShapeTypes t);
34 
39 std::shared_ptr<geometrize::Shape> randomShape();
40 
46 std::shared_ptr<geometrize::Shape> randomShapeOf(geometrize::ShapeTypes t);
47 
48 }
std::shared_ptr< geometrize::Shape > randomShape()
randomShape Creates a random shape.
Definition: shapefactory.cpp:124
ShapeTypes
The ShapeTypes enum specifies the types of shapes that can be used. These can be combined to produce ...
Definition: shapetypes.h:16
std::shared_ptr< geometrize::Shape > randomShapeOf(const ShapeTypes types)
randomShapeOf Creates a random shape from the types supplied.
Definition: shapefactory.cpp:129
std::function< std::shared_ptr< geometrize::Shape >)> createDefaultShapeCreator(const geometrize::ShapeTypes types, const std::int32_t w, const std::int32_t h)
createDefaultShapeCreator Creates an instance of the default shape creator object. The setup, mutate and rasterize methods are bound with default methods.
Definition: shapefactory.cpp:25
std::shared_ptr< geometrize::Shape > create(const geometrize::ShapeTypes t)
create Creates a new shape of the specified type.
Definition: shapefactory.cpp:95