15 #ifndef BORNAGAIN_SAMPLE_LATTICE_LATTICE3D_H
16 #define BORNAGAIN_SAMPLE_LATTICE_LATTICE3D_H
Visitor interface to visit ISampleNode objects.
virtual void visit(const BasicLattice2D *)
Base class for tree-like structures containing parameterized objects.
Abstract base class for selection rules.
A Bravais lattice, characterized by three basis vectors, and optionally an ISelectionRule.
double unitCellVolume() const
Returns the volume of the unit cell.
ivector_t getNearestReciprocalLatticeVectorCoordinates(const kvector_t q) const
Returns the nearest reciprocal lattice point from a given vector.
void computeReciprocalVectors() const
kvector_t m_rc
Cache of basis vectors in reciprocal space.
kvector_t getBasisVectorC() const
Returns basis vector c.
kvector_t m_c
Basis vectors in real space.
void setSelectionRule(const ISelectionRule &selection_rule)
Sets a selection rule for the reciprocal vectors.
Lattice3D transformed(const Transform3D &transform) const
Creates transformed lattice.
void getReciprocalLatticeBasis(kvector_t &ra, kvector_t &rb, kvector_t &rc) const
Returns the reciprocal basis vectors.
kvector_t getMillerDirection(double h, double k, double l) const
Returns normalized direction corresponding to the given Miller indices.
kvector_t getBasisVectorA() const
Returns basis vector a.
std::unique_ptr< ISelectionRule > m_selection_rule
std::vector< kvector_t > reciprocalLatticeVectorsWithinRadius(const kvector_t q, double dq) const
Returns a list of reciprocal lattice vectors within distance dq of a vector q.
Lattice3D & operator=(const Lattice3D &)=delete
kvector_t getBasisVectorB() const
Returns basis vector b.
void onChange() override
Action to be taken in inherited class when a parameter has changed.
void accept(INodeVisitor *visitor) const override
Calls the INodeVisitor's visit method.
void initialize()
Initializes cached data.