Geometrize  1.0
C++ library for geometrizing images into geometric primitives
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
Go to the documentation of this file.
1 #pragma once
3 #include <cstdint>
4 #include <memory>
6 #include "shape.h"
8 namespace geometrize
9 {
15 class Triangle : public Shape
16 {
17 public:
18  Triangle() = default;
19  Triangle(float x1, float y1, float x2, float y2, float x3, float y3);
21  virtual std::shared_ptr<geometrize::Shape> clone() const override;
22  virtual geometrize::ShapeTypes getType() const override;
24  float m_x1;
25  float m_y1;
26  float m_x2;
27  float m_y2;
28  float m_x3;
29  float m_y3;
30 };
32 }
The ShapeTypes enum specifies the types of shapes that can be used. These can be combined to produce ...
Definition: shapetypes.h:16
float m_y2
Second y-coordinate.
Definition: triangle.h:27
virtual std::shared_ptr< geometrize::Shape > clone() const override
clone Clones the shape, a virtual copy constructor.
Definition: triangle.cpp:21
float m_x3
Third x-coordinate.
Definition: triangle.h:28
float m_y1
First y-coordinate.
Definition: triangle.h:25
float m_x2
Second x-coordinate.
Definition: triangle.h:26
float m_x1
First x-coordinate.
Definition: triangle.h:24
The Triangle class represents a triangle.
Definition: triangle.h:15
virtual geometrize::ShapeTypes getType() const override
getType Gets the ShapeType of the shape.
Definition: triangle.cpp:36
float m_y3
Third y-coordinate.
Definition: triangle.h:29
Definition: shape.h:17