BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
Pyramid3Item Class Reference

Description

Definition at line 402 of file FormFactorItems.h.

Inheritance diagram for Pyramid3Item:
[legend]
Collaboration diagram for Pyramid3Item:
[legend]

Public Member Functions

 Pyramid3Item ()
 
std::unique_ptr< IFormFactor > createFormFactor () const override
 
DoubleDescriptors geometryValues () const override
 
QVector< DoubleProperty * > serializationProperties () override
 
virtual void serialize (Streamer &s)
 

Constructor & Destructor Documentation

◆ Pyramid3Item()

Pyramid3Item::Pyramid3Item ( )

Definition at line 354 of file FormFactorItems.cpp.

355 {
356  m_baseEdge.init("Base edge", "Length of one edge of the equilateral triangular base", 15.0,
357  Unit::nanometer, "baseEdge");
358  m_height.init("Height", "Height of the tetrahedron", 6.0, Unit::nanometer, "height");
359  m_alpha.init("Alpha", "Dihedral angle between base and facet", 60.0, Unit::degree, "alpha");
360 }
@ nanometer
@ degree

References degree, and nanometer.

Member Function Documentation

◆ createFormFactor()

std::unique_ptr< IFormFactor > Pyramid3Item::createFormFactor ( ) const
overridevirtual

Implements FormFactorItem.

Definition at line 362 of file FormFactorItems.cpp.

363 {
364  return std::make_unique<Pyramid3>(baseEdge(), height(), alpha() * Units::deg);
365 }

◆ geometryValues()

DoubleDescriptors Pyramid3Item::geometryValues ( ) const
inlineoverridevirtual

Implements FormFactorItem.

Definition at line 411 of file FormFactorItems.h.

411 { return {baseEdge(), height(), alpha()}; }

◆ serializationProperties()

QVector<DoubleProperty*> Pyramid3Item::serializationProperties ( )
inlineoverridevirtual

Implements FormFactorItem.

Definition at line 412 of file FormFactorItems.h.

413  {
414  return {&m_baseEdge, &m_height, &m_alpha};
415  }

◆ serialize()

void FormFactorItem::serialize ( Streamer s)
virtualinherited

Definition at line 473 of file FormFactorItems.cpp.

474 {
475  s.assertVersion(0);
476  for (auto* p : serializationProperties())
477  Serialize::rwProperty(s, *p);
478 }
virtual QVector< DoubleProperty * > serializationProperties()=0
void assertVersion(unsigned expectedVersion) const
As reader, throws DeserializationException unless the expected version is read. As writer,...
Definition: Streamer.cpp:26
void rwProperty(Streamer &s, DoubleProperty &d)

References Streamer::assertVersion(), Serialize::rwProperty(), and FormFactorItem::serializationProperties().

Here is the call graph for this function:

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