BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
DoubleEllipse Class Reference
Inheritance diagram for DoubleEllipse:
Collaboration diagram for DoubleEllipse:

Public Member Functions

 DoubleEllipse (double r0_x, double r0_y, double z, double rz_x, double rz_y)
 
 ~DoubleEllipse ()
 
virtual std::vector< kvector_tvertices () const
 

Static Public Attributes

static const size_t N_Circle = 24
 

Protected Attributes

std::vector< kvector_tm_vertices
 

Detailed Description

Definition at line 20 of file DoubleEllipse.h.

Constructor & Destructor Documentation

◆ DoubleEllipse()

DoubleEllipse::DoubleEllipse ( double  r0_x,
double  r0_y,
double  z,
double  rz_x,
double  rz_y 
)

Definition at line 19 of file DoubleEllipse.cpp.

20 {
21  auto bottom_face = EllipseVertices(r0_x, r0_y, 0.0);
22  size_t n_bottom = bottom_face.size();
23  auto top_face = EllipseVertices(rz_x, rz_y, z);
24  m_vertices.resize(n_bottom + top_face.size());
25  std::move(bottom_face.begin(), bottom_face.end(), m_vertices.begin());
26  std::move(top_face.begin(), top_face.end(), m_vertices.begin() + n_bottom);
27 }
std::vector< kvector_t > EllipseVertices(double r_x, double r_y, double z)
Generate vertices of centered ellipse with given semi-axes at height z.
Definition: IShape.cpp:37
std::vector< kvector_t > m_vertices
List of vertices initialized during construction.
Definition: IShape.h:40

References EllipseVertices(), and IShape::m_vertices.

Here is the call graph for this function:

◆ ~DoubleEllipse()

DoubleEllipse::~DoubleEllipse ( )
default

Member Function Documentation

◆ vertices()

std::vector< kvector_t > IShape::vertices ( ) const
virtualinherited

Retrieves a list of the vertices constituting this concrete shape.

Definition at line 23 of file IShape.cpp.

24 {
25  return m_vertices;
26 }

References IShape::m_vertices.

Member Data Documentation

◆ N_Circle

const size_t IShape::N_Circle = 24
staticinherited

◆ m_vertices

std::vector<kvector_t> IShape::m_vertices
protectedinherited

List of vertices initialized during construction.

Definition at line 40 of file IShape.h.

Referenced by Box::Box(), DoubleEllipse(), RippleCosine::RippleCosine(), RippleSawtooth::RippleSawtooth(), TruncatedEllipsoid::TruncatedEllipsoid(), and IShape::vertices().


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