Geometrize  1.0
C++ library for geometrizing images into geometric primitives
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | Public Attributes | List of all members
geometrize::RotatedEllipse Class Reference

The RotatedEllipse class represents a rotated ellipse. More...

#include <rotatedellipse.h>

Inheritance diagram for geometrize::RotatedEllipse:
Inheritance graph
[legend]
Collaboration diagram for geometrize::RotatedEllipse:
Collaboration graph
[legend]

Public Member Functions

 RotatedEllipse ()=default
 
 RotatedEllipse (float x, float y, float rx, float ry, float angle)
 
virtual std::shared_ptr
< geometrize::Shape
clone () const override
 clone Clones the shape, a virtual copy constructor. More...
 
virtual geometrize::ShapeTypes getType () const override
 getType Gets the ShapeType of the shape. More...
 
- Public Member Functions inherited from geometrize::Shape
 Shape ()=default
 
virtual ~Shape ()=default
 
Shapeoperator= (const geometrize::Shape &other)=default
 
 Shape (const geometrize::Shape &other)=default
 

Public Attributes

float m_x
 x-coordinate. More...
 
float m_y
 y-coordinate. More...
 
float m_rx
 x-radius. More...
 
float m_ry
 y-radius. More...
 
float m_angle
 Rotation angle. More...
 
- Public Attributes inherited from geometrize::Shape
std::function< void(geometrize::Shape &)> setup
 
std::function< void(geometrize::Shape &)> mutate
 
std::function< std::vector
< geometrize::Scanline >const
geometrize::Shape &)> 
rasterize
 

Detailed Description

The RotatedEllipse class represents a rotated ellipse.

Author
Sam Twidale (https://samcodes.co.uk/)

Constructor & Destructor Documentation

geometrize::RotatedEllipse::RotatedEllipse ( )
default
geometrize::RotatedEllipse::RotatedEllipse ( float  x,
float  y,
float  rx,
float  ry,
float  angle 
)
11  : Shape()
12 {
13  m_x = x;
14  m_y = y;
15  m_rx = rx;
16  m_ry = ry;
17  m_angle = angle;
18 }
float m_y
y-coordinate.
Definition: rotatedellipse.h:25
float m_angle
Rotation angle.
Definition: rotatedellipse.h:28
float m_ry
y-radius.
Definition: rotatedellipse.h:27
float m_x
x-coordinate.
Definition: rotatedellipse.h:24
float m_rx
x-radius.
Definition: rotatedellipse.h:26

Member Function Documentation

std::shared_ptr< geometrize::Shape > geometrize::RotatedEllipse::clone ( ) const
overridevirtual

clone Clones the shape, a virtual copy constructor.

Returns
A clone of the shape.

Reimplemented from geometrize::Shape.

21 {
22  std::shared_ptr<geometrize::RotatedEllipse> ellipse{std::make_shared<geometrize::RotatedEllipse>()};
23  ellipse->m_x = m_x;
24  ellipse->m_y = m_y;
25  ellipse->m_rx = m_rx;
26  ellipse->m_ry = m_ry;
27  ellipse->m_angle = m_angle;
28  ellipse->setup = setup;
29  ellipse->mutate = mutate;
30  ellipse->rasterize = rasterize;
31  return ellipse;
32 }
float m_y
y-coordinate.
Definition: rotatedellipse.h:25
float m_angle
Rotation angle.
Definition: rotatedellipse.h:28
float m_ry
y-radius.
Definition: rotatedellipse.h:27
float m_x
x-coordinate.
Definition: rotatedellipse.h:24
std::function< void(geometrize::Shape &)> mutate
Definition: shape.h:26
std::function< std::vector< geometrize::Scanline >const geometrize::Shape &)> rasterize
Definition: shape.h:27
float m_rx
x-radius.
Definition: rotatedellipse.h:26
std::function< void(geometrize::Shape &)> setup
Definition: shape.h:25
geometrize::ShapeTypes geometrize::RotatedEllipse::getType ( ) const
overridevirtual

getType Gets the ShapeType of the shape.

Returns
The ShapeType of the shape.

Reimplemented from geometrize::Shape.

35 {
37 }
Definition: shapetypes.h:22

Member Data Documentation

float geometrize::RotatedEllipse::m_angle

Rotation angle.

float geometrize::RotatedEllipse::m_rx

x-radius.

float geometrize::RotatedEllipse::m_ry

y-radius.

float geometrize::RotatedEllipse::m_x

x-coordinate.

float geometrize::RotatedEllipse::m_y

y-coordinate.


The documentation for this class was generated from the following files: