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

Public Member Functions

 Box (double length, double width, double height)
 
 ~Box ()
 
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 Box.h.

Constructor & Destructor Documentation

◆ Box()

Box::Box ( double  length,
double  width,
double  height 
)

Definition at line 19 of file Box.cpp.

20 {
21  m_vertices.resize(8);
22  auto bottom_face = RectangleVertices(length, width, 0.0);
23  auto top_face = RectangleVertices(length, width, height);
24  std::move(bottom_face.begin(), bottom_face.end(), m_vertices.begin());
25  std::move(top_face.begin(), top_face.end(), m_vertices.begin() + 4);
26 }
std::vector< kvector_t > RectangleVertices(double length, double width, double z)
Helper functions to construct lists of vertices.
Definition: IShape.cpp:28
std::vector< kvector_t > m_vertices
List of vertices initialized during construction.
Definition: IShape.h:40

References anonymous_namespace{BoxCompositionBuilder.cpp}::height, anonymous_namespace{BoxCompositionBuilder.cpp}::length, IShape::m_vertices, RectangleVertices(), and anonymous_namespace{BoxCompositionBuilder.cpp}::width.

Here is the call graph for this function:

◆ ~Box()

Box::~Box ( )
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(), DoubleEllipse::DoubleEllipse(), RippleCosine::RippleCosine(), RippleSawtooth::RippleSawtooth(), TruncatedEllipsoid::TruncatedEllipsoid(), and IShape::vertices().


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