Geometrize  1.0
C++ library for geometrizing images into geometric primitives
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
circle.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <cstdint>
4 #include <memory>
5 
6 #include "shape.h"
7 
8 namespace geometrize
9 {
10 
15 class Circle : public Shape
16 {
17 public:
18  Circle() = default;
19  Circle(float x, float y, float r);
20 
21  virtual std::shared_ptr<geometrize::Shape> clone() const override;
22  virtual geometrize::ShapeTypes getType() const override;
23 
24  float m_x;
25  float m_y;
26  float m_r;
27 };
28 
29 }
The Circle class represents a circle.
Definition: circle.h:15
ShapeTypes
The ShapeTypes enum specifies the types of shapes that can be used. These can be combined to produce ...
Definition: shapetypes.h:16
virtual std::shared_ptr< geometrize::Shape > clone() const override
clone Clones the shape, a virtual copy constructor.
Definition: circle.cpp:18
float m_x
x-coordinate.
Definition: circle.h:24
float m_r
Radius.
Definition: circle.h:26
virtual geometrize::ShapeTypes getType() const override
getType Gets the ShapeType of the shape.
Definition: circle.cpp:30
Definition: shape.h:17
float m_y
y-coordinate.
Definition: circle.h:25