BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
Rectangle Class Reference

The rectangle shape having its axis aligned to the (non-rotated) coordinate system. More...

+ Inheritance diagram for Rectangle:

Public Member Functions

 Rectangle (double xlow, double ylow, double xup, double yup)
 
Rectangleclone () const
 
bool contains (double x, double y) const
 Returns true if point with given coordinates is inside or on border of the shape.
 
bool contains (const Bin1D &binx, const Bin1D &biny) const
 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).
 
double getArea () const
 
double getXlow () const
 
double getYlow () const
 
double getXup () const
 
double getYup () const
 
- Public Member Functions inherited from IShape2D
 IShape2D (const char *name)
 
- Public Member Functions inherited from ICloneable
 ICloneable (const ICloneable &)=delete
 
 ICloneable (ICloneable &&)=default
 
virtual void transferToCPP ()
 Used for Python overriding of clone (see swig/tweaks.py)
 

Additional Inherited Members

- Protected Member Functions inherited from IShape2D
virtual void print (std::ostream &ostr) const
 

Detailed Description

The rectangle shape having its axis aligned to the (non-rotated) coordinate system.

Definition at line 23 of file Rectangle.h.

Constructor & Destructor Documentation

◆ Rectangle()

Rectangle::Rectangle ( double  xlow,
double  ylow,
double  xup,
double  yup 
)
Parameters
xlowx-coordinate of lower left corner
ylowy-coordinate of lower left corner
xupx-coordinate of upper right corner
yupy-coordinate of upper right corner

Definition at line 23 of file Rectangle.cpp.


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