BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
Ellipse Class Reference

Description

An ellipse, for use in detector masks.

Inheritance diagram for Ellipse:

Public Member Functions

 Ellipse (double xcenter, double ycenter, double xradius, double yradius, double theta=0.0)
 
Ellipseclone () const override
 
bool contains (const Bin1D &binx, const Bin1D &biny) const override
 Returns true if area defined by two bins is inside or on border of polygon (more precisely, if mid point of two bins satisfy this condition). More...
 
bool contains (double x, double y) const override
 Returns true if point with given coordinates is inside or on border of the shape. More...
 
double getCenterX () const
 
double getCenterY () const
 
double getTheta () const
 
double radiusX () const
 
double radiusY () const
 

Protected Member Functions

virtual void print (std::ostream &ostr) const
 

Constructor & Destructor Documentation

◆ Ellipse()

Ellipse::Ellipse ( double  xcenter,
double  ycenter,
double  xradius,
double  yradius,
double  theta = 0.0 
)

Member Function Documentation

◆ clone()

Ellipse* Ellipse::clone ( ) const
overridevirtual

Implements IShape2D.

◆ contains() [1/2]

bool Ellipse::contains ( const Bin1D binx,
const Bin1D biny 
) const
overridevirtual

Returns true if area defined by two bins is inside or on border of polygon (more precisely, if mid point of two bins satisfy this condition).

Implements IShape2D.

◆ contains() [2/2]

bool Ellipse::contains ( double  x,
double  y 
) const
overridevirtual

Returns true if point with given coordinates is inside or on border of the shape.

Implements IShape2D.

◆ getCenterX()

double Ellipse::getCenterX ( ) const

◆ getCenterY()

double Ellipse::getCenterY ( ) const

◆ getTheta()

double Ellipse::getTheta ( ) const

◆ print()

virtual void IShape2D::print ( std::ostream &  ostr) const
protectedvirtualinherited

Reimplemented in Polygon.

◆ radiusX()

double Ellipse::radiusX ( ) const

◆ radiusY()

double Ellipse::radiusY ( ) const