Geometrize 1.0
C++ library for geometrizing images into geometric primitives
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
10namespace geometrize
11{
12class Shape;
13}
14
15namespace geometrize
16{
17
28std::function<std::shared_ptr<geometrize::Shape>()> createDefaultShapeCreator(geometrize::ShapeTypes types, std::int32_t xMin, std::int32_t yMin, std::int32_t xMax, std::int32_t yMax);
29
35std::shared_ptr<geometrize::Shape> create(geometrize::ShapeTypes t);
36
41std::shared_ptr<geometrize::Shape> randomShape();
42
48std::shared_ptr<geometrize::Shape> randomShapeOf(geometrize::ShapeTypes t);
49
50}
Definition: bitmap.cpp:8
std::shared_ptr< geometrize::Shape > randomShapeOf(const ShapeTypes types)
randomShapeOf Creates a random shape from the types supplied.
Definition: shapefactory.cpp:129
ShapeTypes
The ShapeTypes enum specifies the types of shapes that can be used. These can be combined to produce ...
Definition: shapetypes.h:17
std::shared_ptr< geometrize::Shape > randomShape()
randomShape Creates a random shape.
Definition: shapefactory.cpp:124
std::shared_ptr< geometrize::Shape > create(const geometrize::ShapeTypes t)
create Creates a new shape of the specified type.
Definition: shapefactory.cpp:95
std::function< std::shared_ptr< geometrize::Shape >()> createDefaultShapeCreator(const geometrize::ShapeTypes types, const std::int32_t xMin, const std::int32_t yMin, const std::int32_t xMax, const std::int32_t yMax)
createDefaultShapeCreator Creates an instance of the default shape creator object....
Definition: shapefactory.cpp:25