24 const R3* position,
const RotMatrix* rotMatrix)
26 , m_material(std::move(material))
27 , m_ambient_material(std::move(ambient_material))
28 , m_position(std::move(position))
29 , m_rotMatrix(std::move(rotMatrix))
34 :
ReParticle(
ff.clone(), nullptr, nullptr, nullptr, nullptr)
55 if (translation != R3())
56 result->setPosition(translation);
62 m_material = std::make_unique<Material>(material);
77 m_rotMatrix = std::make_unique<RotMatrix>(rotMatrix);
82 return m_ff->volume();
87 return m_ff->radialExtension();
97 return m_ff->formfactor_at_bottom(q);
104 complex_t result =
m_ff->theFF(wavevectors2);
106 result = (
m_material->scalarSubtrSLD(wavevectors2)
125 * (
m_material->polarizedSubtrSLD(wavevectors2)
140 double result =
m_ff->bottomZ(total_rotation.get());
152 double result =
m_ff->topZ(total_rotation.get());
Factory functions used to create material instances.
Defines and implements class Material.
Defines interface class ReParticle.
Declares class RotMatrix.
Defines IRotation classes.
Abstract base class for rotations.
virtual RotMatrix rotMatrix() const =0
Returns transformation.
R3 transformed(const R3 &v) const
virtual bool isIdentity() const
Returns true if rotation matrix is identity matrix (no rotations)
static IRotation * createRotation(const RotMatrix &transform)
A wrapper for underlying material implementation.
A reprocessed simple particle, with shape m_ff.
std::unique_ptr< const RotMatrix > m_rotMatrix
double radialExtension() const override
Returns the (approximate in some cases) radial size of the particle of this form factor's shape....
double topZ(const IRotation *rotation) const override
Returns the z-coordinate of the lowest point in this shape after a given rotation.
void setMaterial(const Material &material)
Sets the material of the scatterer.
const IFormFactor * formfactor_at_bottom() const
ReParticle(const IFormFactor &ff)
std::unique_ptr< const Material > m_material
void setAmbientMaterial(const Material &ambient_material) override
Sets the ambient material.
SpinMatrix thePolFF(const WavevectorInfo &wavevectors) const override
Returns scattering amplitude for matrix interactions.
double bottomZ(const IRotation *rotation) const override
Returns the z-coordinate of the lowest point in this shape after a given rotation.
ReParticle * clone() const override
void setRotMatrix(const RotMatrix &rotMatrix)
std::unique_ptr< const IFormFactor > m_ff
std::unique_ptr< const Material > m_ambient_material
void setPosition(const R3 &position)
static ReParticle * createTransformedFormFactor(const IFormFactor &formfactor, const IRotation *rot, R3 translation)
double volume() const override
Returns the total volume of the particle of this form factor's shape.
std::unique_ptr< const R3 > m_position
complex_t theFF(const WavevectorInfo &wavevectors) const override
Returns scattering amplitude for complex wavevectors ki, kf.
Rotation matrix in three dimensions. Represents group SO(3). Internal parameterization based on quate...
Holds all wavevector information relevant for calculating form factors.
WavevectorInfo transformed(const RotMatrix &transform) const