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

Public Member Functions

 Box (double length, double width, double height)
 
 ~Box ()
 
virtual std::vector< kvector_tvertices () const
 Retrieves a list of the vertices constituting this concrete shape. More...
 

Static Public Attributes

static const size_t N_Circle = 24
 

Protected Attributes

std::vector< kvector_tm_vertices
 List of vertices initialized during construction. More...
 

Detailed Description

Definition at line 25 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: IShape3D.cpp:28
std::vector< kvector_t > m_vertices
List of vertices initialized during construction.
Definition: IShape3D.h:44

References IShape3D::m_vertices, and RectangleVertices().

Here is the call graph for this function:

◆ ~Box()

Box::~Box ( )
default

Member Function Documentation

◆ vertices()

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

Retrieves a list of the vertices constituting this concrete shape.

Definition at line 23 of file IShape3D.cpp.

24 {
25  return m_vertices;
26 }

References IShape3D::m_vertices.

Member Data Documentation

◆ m_vertices

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

◆ N_Circle

const size_t IShape3D::N_Circle = 24
staticinherited

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