CVB++ 14.1
Ellipse Class Referencefinal

Class representing an ellipse. More...

#include <cvb/ellipse.hpp>

Public Member Functions

 Ellipse (Point2D< double > center, double radiusA, double radiusB, Angle rotation)
 Create an ellipse. More...
 
Point2D< double > Center () const noexcept
 Gets the center of the ellipse. More...
 
void SetCenter (Point2D< double > center) noexcept
 Sets the center of the ellipse. More...
 
double RadiusA () const noexcept
 Gets the larger radius of the ellipse. More...
 
void SetRadiusA (double radiusA)
 Sets the larger radius A of the ellipse. More...
 
double RadiusB () const noexcept
 Gets the larger radius of the ellipse. More...
 
void SetRadiusB (double radiusB)
 Sets the smaller radius of the ellipse. More...
 
Angle Rotation () const noexcept
 Gets the angle by which the ellipse is rotated. More...
 
void SetRotation (Angle rotation) noexcept
 Sets the angle by which the ellipse is rotated. More...
 
bool operator== (const Ellipse &ellipse) const noexcept
 Compares to an other ellipse. More...
 
bool operator!= (const Ellipse &ellipse) const noexcept
 Compares to an other ellipse. More...
 

Detailed Description

Class representing an ellipse.

For the purpose of regression and other calculations.

Constructor & Destructor Documentation

◆ Ellipse()

Ellipse ( Point2D< double >  center,
double  radiusA,
double  radiusB,
Angle  rotation 
)
inline

Create an ellipse.

Parameters
[in]centerCenter of the ellipse.
[in]radiusALarger radius of the ellipse.
[in]radiusBSmaller radius of the ellipse.
[in]rotationAngle by which the ellipse is rotated (auto trimmed).
Exceptions
Doesnot throw any exception.

Member Function Documentation

◆ Center()

Point2D< double > Center ( ) const
inlinenoexcept

Gets the center of the ellipse.

Returns
The center.
Exceptions
Doesnot throw any exception.

◆ operator!=()

bool operator!= ( const Ellipse ellipse) const
inlinenoexcept

Compares to an other ellipse.

Parameters
[in]ellipseOther ellipse.
Returns
True if not equal, otherwise false.
Exceptions
Doesnot throw any exception.

◆ operator==()

bool operator== ( const Ellipse ellipse) const
inlinenoexcept

Compares to an other ellipse.

Parameters
[in]ellipseOther ellipse.
Returns
True if equal, otherwise false.
Exceptions
Doesnot throw any exception.

◆ RadiusA()

double RadiusA ( ) const
inlinenoexcept

Gets the larger radius of the ellipse.

Returns
The radius A.
Exceptions
Doesnot throw any exception.

◆ RadiusB()

double RadiusB ( ) const
inlinenoexcept

Gets the larger radius of the ellipse.

Returns
The radius B.
Exceptions
Doesnot throw any exception.

◆ Rotation()

Angle Rotation ( ) const
inlinenoexcept

Gets the angle by which the ellipse is rotated.

Returns
The current rotation.
Exceptions
Doesnot throw any exception.

◆ SetCenter()

void SetCenter ( Point2D< double >  center)
inlinenoexcept

Sets the center of the ellipse.

Parameters
[in]centerThe new center.
Exceptions
Doesnot throw any exception.

◆ SetRadiusA()

void SetRadiusA ( double  radiusA)
inline

Sets the larger radius A of the ellipse.

Parameters
[in]radiusAThe new radius, if negative the absolute value is used.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ SetRadiusB()

void SetRadiusB ( double  radiusB)
inline

Sets the smaller radius of the ellipse.

Parameters
[in]radiusBThe new radius, if negative the absolute value is used.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ SetRotation()

void SetRotation ( Angle  rotation)
inlinenoexcept

Sets the angle by which the ellipse is rotated.

Parameters
[in]rotationThe new rotation angle (auto trimmed).
Exceptions
Doesnot throw any exception.