35 if (
className().substr(0, 10) ==
"FormFactor")
53 throw std::runtime_error(
"Bug: Form factor has no m_shape3D, cannot compute bottom z");
60 throw std::runtime_error(
"Bug: Form factor has no m_shape3D, cannot compute top z");
71 std::vector<std::pair<double, std::string>> arguments;
72 for (
size_t i = 0; i <
parDefs().size(); i++)
73 arguments.emplace_back(
m_P[i],
parDefs()[i].unit);
Defines a few helper functions.
Defines interface IShape3D.
Defines interface IDecoratableBorn.
Defines IRotation classes.
virtual std::vector< ParaMeta > parDefs() const
Returns the parameter definitions, to be hard-coded in each leaf class.
std::vector< double > m_P
virtual std::string className() const =0
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
Abstract base class for rotations.
Abstract base class for sample components and properties related to scattering.
Holds all wavevector information relevant for calculating form factors.
double BottomZ(const std::vector< R3 > &vertices, const IRotation *rotation)
Calculates the z-coordinate of the lowest vertex after rotation.
double TopZ(const std::vector< R3 > &vertices, const IRotation *rotation)
Calculates the z-coordinate of the highest vertex after rotation.
std::string printFunction(const std::string &name, const std::vector< std::pair< double, std::string >> &arguments)
Print a function in the form "<name>(<arguments>)". arguments will be processed by printArguments(),...