|
Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
|
Aggregates atomic coordinates, bonds, and unit cell wireframes for rendering. More...
#include <Scene3D.hpp>

Public Member Functions | |
| Scene3D ()=default | |
| void | clear () noexcept |
| Clears all geometry in the scene. | |
| std::vector< AtomInstance > & | atoms () noexcept |
| Gets mutable collection of atom visualization instances in the scene. | |
| const std::vector< AtomInstance > & | atoms () const noexcept |
| Gets the collection of atom visualization instances in the scene. | |
| const std::vector< BondInstance > & | bonds () const noexcept |
| Gets the collection of bond cylinders in the scene. | |
| const std::vector< LineSegment > & | unitCellLines () const noexcept |
| Gets the unit cell boundary line segments for wireframe rendering. | |
| const std::vector< LineSegment > & | guideLines () const noexcept |
| Gets 3D overlay guide line segments (e.g. distance/angle measurement ruler). | |
| void | setGuideLines (std::vector< LineSegment > lines) noexcept |
| Replaces the 3D overlay guide line segments. | |
| const math::Vector3< float > & | boundsMin () const noexcept |
| Gets the minimum 3D coordinate bounding box limits. | |
| const math::Vector3< float > & | boundsMax () const noexcept |
| Gets the maximum 3D coordinate bounding box limits. | |
| bool | inCell () const noexcept |
| Checks whether in-cell PBC coordinate wrapping is currently active. | |
| void | setInCell (bool in_cell) noexcept |
| Sets whether in-cell PBC coordinate wrapping is active. | |
| bool | hasLattice () const noexcept |
| Checks if the scene has valid unit cell lattice vectors. | |
| const math::Matrix3< real_t > & | latticeVectors () const noexcept |
| Gets the 3x3 direct lattice vectors matrix. | |
| const math::Matrix3< real_t > & | inverseLatticeVectors () const noexcept |
| Gets the 3x3 inverse lattice vectors matrix. | |
| void | addAtom (const AtomInstance &atom) |
| Appends an atom visualization instance to the scene. | |
| void | addBond (const BondInstance &bond) |
| Appends a bond cylinder to the scene. | |
| void | addUnitCellLine (const LineSegment &line) |
| Appends a wireframe line segment to the scene. | |
| bool | updateFromCell (const core::Cell &cell, bool recompute_bonds=false, double bond_cutoff_scale=1.15, bool in_cell=false) |
| Updates atomic positions and unit cell in-place from a new Cell snapshot. | |
| void | recomputeBonds (double bond_cutoff_scale=1.15, bool in_cell=false) |
| Recomputes covalent bonds for current atomic coordinates. | |
| void | updateAtomPositions (const std::vector< core::Atom > &cell_atoms, bool in_cell=false) |
| Fast in-place update of atom coordinates from Cell atoms vector. | |
| void | setAtomScale (float atom_scale) noexcept |
| Sets the uniform scaling factor applied to covalent radii for ball visualization. | |
| float | atomScale () const noexcept |
| Gets the current uniform scaling factor for atom visualization radii. | |
| void | updateBounds () noexcept |
| Recomputes axis-aligned bounding box from atoms and unit cell vertices. | |
| std::shared_ptr< Scene3D > | buildVisualSupercell (int rep_a, int rep_b, int rep_c, std::size_t max_atoms=250000) const |
| Builds a visual-only periodic supercell tiled rep_a x rep_b x rep_c along lattice vectors. | |
Static Public Member Functions | |
| static std::shared_ptr< Scene3D > | fromCell (const core::Cell &cell, double bond_cutoff_scale=1.15, bool generate_bonds=true, bool in_cell=false) |
| Constructs a Scene3D from a simulation Cell. | |
Private Attributes | |
| std::vector< AtomInstance > | atoms_ |
| std::vector< BondInstance > | bonds_ |
| std::vector< LineSegment > | unit_cell_lines_ |
| std::vector< LineSegment > | guide_lines_ |
| math::Vector3< float > | bounds_min_ {0.0F, 0.0F, 0.0F} |
| math::Vector3< float > | bounds_max_ {0.0F, 0.0F, 0.0F} |
| math::Matrix3< real_t > | lattice_vectors_ |
| math::Matrix3< real_t > | inv_lattice_vectors_ |
| float | atom_scale_ {0.35F} |
| bool | has_lattice_ {false} |
| bool | in_cell_ {false} |
Aggregates atomic coordinates, bonds, and unit cell wireframes for rendering.
|
default |
| void correlation::render3d::Scene3D::addAtom | ( | const AtomInstance & | atom | ) |
Appends an atom visualization instance to the scene.
| [in] | atom | Visual atom definition. |
| void correlation::render3d::Scene3D::addBond | ( | const BondInstance & | bond | ) |
Appends a bond cylinder to the scene.
| [in] | bond | Visual bond definition. |
| void correlation::render3d::Scene3D::addUnitCellLine | ( | const LineSegment & | line | ) |
Appends a wireframe line segment to the scene.
| [in] | line | Line segment definition. |
|
inlinenodiscardnoexcept |
Gets the collection of atom visualization instances in the scene.
|
inlinenodiscardnoexcept |
Gets mutable collection of atom visualization instances in the scene.


|
inlinenodiscardnoexcept |
Gets the current uniform scaling factor for atom visualization radii.
|
inlinenodiscardnoexcept |
Gets the collection of bond cylinders in the scene.

|
inlinenodiscardnoexcept |
Gets the maximum 3D coordinate bounding box limits.
|
inlinenodiscardnoexcept |
Gets the minimum 3D coordinate bounding box limits.
|
nodiscard |
Builds a visual-only periodic supercell tiled rep_a x rep_b x rep_c along lattice vectors.
| [in] | rep_a | Repetitions along lattice vector a (clamped to >= 1). |
| [in] | rep_b | Repetitions along lattice vector b (clamped to >= 1). |
| [in] | rep_c | Repetitions along lattice vector c (clamped to >= 1). |
| [in] | max_atoms | Soft safety cap on total replicated atom instances. |

|
noexcept |
Clears all geometry in the scene.
|
staticnodiscard |
Constructs a Scene3D from a simulation Cell.
| [in] | cell | Atomic cell containing lattice and atoms. |
| [in] | bond_cutoff_scale | Scaling multiplier for covalent radius cutoff. |
| [in] | generate_bonds | Flag enabling covalent bond detection. |
| [in] | in_cell | Flag enabling in-cell coordinate folding and periodic boundary clipped bonds. |


|
inlinenodiscardnoexcept |
Gets 3D overlay guide line segments (e.g. distance/angle measurement ruler).

|
inlinenodiscardnoexcept |
Checks if the scene has valid unit cell lattice vectors.
|
inlinenodiscardnoexcept |
Checks whether in-cell PBC coordinate wrapping is currently active.
|
inlinenodiscardnoexcept |
Gets the 3x3 inverse lattice vectors matrix.
|
inlinenodiscardnoexcept |
Gets the 3x3 direct lattice vectors matrix.
| void correlation::render3d::Scene3D::recomputeBonds | ( | double | bond_cutoff_scale = 1.15, |
| bool | in_cell = false ) |
Recomputes covalent bonds for current atomic coordinates.
| [in] | bond_cutoff_scale | Scaling multiplier for covalent radius cutoff. |
| [in] | in_cell | Flag enabling periodic minimum image convention and boundary clipping. |

|
noexcept |
Sets the uniform scaling factor applied to covalent radii for ball visualization.
| [in] | atom_scale | Multiplier in [0.05, 2.0] (default 0.35). |

|
inlinenoexcept |
Replaces the 3D overlay guide line segments.
| [in] | lines | New guide lines. |
|
inlinenoexcept |
Sets whether in-cell PBC coordinate wrapping is active.
| [in] | in_cell | True to enable in-cell folding and boundary clipping. |
|
inlinenodiscardnoexcept |
Gets the unit cell boundary line segments for wireframe rendering.

| void correlation::render3d::Scene3D::updateAtomPositions | ( | const std::vector< core::Atom > & | cell_atoms, |
| bool | in_cell = false ) |
Fast in-place update of atom coordinates from Cell atoms vector.
| [in] | cell_atoms | Source atom list. |
| [in] | in_cell | Whether to wrap coordinates into [0, 1) fractional box. |


|
noexcept |
Recomputes axis-aligned bounding box from atoms and unit cell vertices.

| bool correlation::render3d::Scene3D::updateFromCell | ( | const core::Cell & | cell, |
| bool | recompute_bonds = false, | ||
| double | bond_cutoff_scale = 1.15, | ||
| bool | in_cell = false ) |
Updates atomic positions and unit cell in-place from a new Cell snapshot.
| [in] | cell | New simulation snapshot. |
| [in] | recompute_bonds | If true, recalculates bond pairs. |
| [in] | bond_cutoff_scale | Scaling multiplier for cutoff. |
| [in] | in_cell | Flag enabling in-cell coordinate folding and periodic boundary clipped bonds. |


|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |