Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
Loading...
Searching...
No Matches
correlation::render3d Namespace Reference

Namespaces

namespace  detail
namespace  vulkan

Classes

class  Camera3D
 Manages camera positioning, orbit rotations, panning, zooming, and view-projection matrices. More...
class  CpuRenderEngine
 Offscreen CPU software rasterizer implementing IRenderEngine. More...
class  SoftwareFramebuffer
 Manages RGBA8 color pixels and Z-buffer for software rasterization. More...
struct  RasterizerOptions
 Configuration parameters for software rasterizer lighting and shading. More...
class  SoftwareRasterizer
 Executes software-rendered 3D visualization using depth-tested billboards and lines. More...
struct  RgbaColor
 8-bit RGBA color representation for vertex colors and framebuffers. More...
struct  ViewportDimensions
 Width and height in pixels for the rendering viewport. More...
struct  GpuHaloConfig
 Configuration parameters for GPU-driven halo visualization. More...
struct  RenderStyleConfig
 Visual shading and background styling configuration for 3D render engines. More...
class  IRenderEngine
 Abstract interface representing a headless offscreen 3D rendering backend. More...
struct  LodRenderPolicy
 Effective rendering policy derived from LOD state and camera motion. More...
class  LodController
 Evaluates active LOD policies based on atom count and camera interaction state. More...
class  Vector4
 Stack-allocated 4D homogeneous vector. More...
class  Matrix4
 4x4 column-major transformation matrix. More...
class  Quaternion
 Unit quaternion for robust 3D rotation representation without gimbal lock. More...
struct  RgbaPixel
 Standard 32-bit RGBA pixel representation. More...
struct  PlotImageBuffer
 Raw RGBA pixel buffer generated by MiniPlotRenderer. More...
struct  PeakInfo
 Detected peak position on a 1D distribution profile. More...
struct  MiniPlotConfig
 Configuration parameters for MiniPlot rendering. More...
class  MiniPlotRenderer
 High-performance 2D software renderer for distribution mini-charts. More...
struct  CameraHudMetrics
 Projected 2D axis endpoints and calibrated scale bar metrics derived from Camera3D. More...
class  RenderEngineFactory
 Constructs initialized IRenderEngine instances with fallback handling. More...
struct  AtomInstance
 Visual instance of an atom for 3D rendering. More...
struct  BondInstance
 Visual instance of a covalent or ionic bond connecting two atoms. More...
struct  LineSegment
 3D line segment for wireframe rendering (e.g. simulation box boundaries). More...
class  Scene3D
 Aggregates atomic coordinates, bonds, and unit cell wireframes for rendering. More...
class  TrajectoryStreamer
 Streams trajectory snapshot frames into Scene3D with zero vector reallocation. More...
class  VulkanContext
 Inspects host Vulkan drivers and physical devices for headless rendering. More...
class  VulkanRenderEngine
 Headless Vulkan offscreen rendering pipeline producing RGBA pixel buffers. More...

Enumerations

enum class  ProjectionMode : std::uint8_t { Perspective = 0 , Orthographic = 1 }
 Projection mode for 3D camera rendering. More...
enum class  LodLevel { High , Medium , Low }
enum class  BackendPreference { Auto , VulkanOnly , CpuOnly }

Functions

constexpr int getAtomicNumber (std::string_view symbol) noexcept
 Retrieves the atomic number (Z) for a chemical symbol.
constexpr RgbaColor getElementColor (int atomic_number) noexcept
 Retrieves standard CPK color for a given atomic number in O(1) time.
constexpr RgbaColor getElementColor (std::string_view symbol) noexcept
 Retrieves standard CPK color for a chemical symbol, or a categorical color for numeric LAMMPS atom types ("1", "2", ...).
float getElementDisplayRadius (std::string_view symbol, float scale=0.4F)
 Retrieves visualization sphere radius scaled from covalent radius.
std::optional< std::size_t > pickAtom (const Camera3D &camera, const Scene3D &scene, float norm_x, float norm_y) noexcept
 Picks the closest visible atom sphere intersected by a viewport click ray.
CameraHudMetrics computeCameraHudMetrics (const Camera3D &camera, float viewport_height_px)
 Computes projected axis triad vectors and a nice-number Angstrom scale bar.

Variables

constexpr std::array< RgbaColor, 119 > ELEMENT_COLORS
 Full 118-element CPK lookup table based on official ASE/Jmol standards.

Enumeration Type Documentation

◆ BackendPreference

Enumerator
Auto 

Try Vulkan GPU first; automatically fall back to CPU rasterizer.

VulkanOnly 

Require Vulkan GPU; fail if unavailable.

CpuOnly 

Explicitly use portable CPU software rasterizer.

◆ LodLevel

Enumerator
High 

Systems < 5k atoms: Full analytical ray-cast spheres and cylinder bonds.

Medium 

Systems 5k-25k atoms: Sphere impostors and line bonds.

Low 

Systems > 25k atoms: Simplified point sprites, bonds suppressed during motion.

◆ ProjectionMode

enum class correlation::render3d::ProjectionMode : std::uint8_t
strong

Projection mode for 3D camera rendering.

Enumerator
Perspective 

Foreshortened perspective projection.

Orthographic 

Parallel isometric / orthographic projection.

Function Documentation

◆ computeCameraHudMetrics()

CameraHudMetrics correlation::render3d::computeCameraHudMetrics ( const Camera3D & camera,
float viewport_height_px )
nodiscard

Computes projected axis triad vectors and a nice-number Angstrom scale bar.

Parameters
[in]cameraActive 3D orbit camera.
[in]viewport_height_pxHeight of the 3D viewport in pixels.
Returns
Populated CameraHudMetrics struct.
Here is the caller graph for this function:

◆ getAtomicNumber()

int correlation::render3d::getAtomicNumber ( std::string_view symbol)
nodiscardconstexprnoexcept

Retrieves the atomic number (Z) for a chemical symbol.

Parameters
symbolElement symbol (e.g. "H", "Fe", "Si").
Returns
Atomic number Z in [1, 118], or 0 if unknown.
Here is the caller graph for this function:

◆ getElementColor() [1/2]

RgbaColor correlation::render3d::getElementColor ( int atomic_number)
nodiscardconstexprnoexcept

Retrieves standard CPK color for a given atomic number in O(1) time.

Parameters
atomic_numberAtomic number (Z).
Returns
RGBA color representation.
Here is the caller graph for this function:

◆ getElementColor() [2/2]

RgbaColor correlation::render3d::getElementColor ( std::string_view symbol)
nodiscardconstexprnoexcept

Retrieves standard CPK color for a chemical symbol, or a categorical color for numeric LAMMPS atom types ("1", "2", ...).

Parameters
symbolElement symbol (e.g. "H", "Fe", "Si", or "1").
Returns
RGBA color representation.
Here is the call graph for this function:

◆ getElementDisplayRadius()

float correlation::render3d::getElementDisplayRadius ( std::string_view symbol,
float scale = 0.4F )
inlinenodiscard

Retrieves visualization sphere radius scaled from covalent radius.

Parameters
symbolElement symbol.
scaleScaling factor (default 0.4 for ball-and-stick).
Returns
Sphere radius in Angstroms.
Here is the call graph for this function:

◆ pickAtom()

std::optional< std::size_t > correlation::render3d::pickAtom ( const Camera3D & camera,
const Scene3D & scene,
float norm_x,
float norm_y )
nodiscardnoexcept

Picks the closest visible atom sphere intersected by a viewport click ray.

Parameters
[in]cameraActive 3D orbit camera.
[in]sceneActive 3D molecular scene.
[in]norm_xNormalized horizontal viewport coordinate in [0, 1] (left to right).
[in]norm_yNormalized vertical viewport coordinate in [0, 1] (top to bottom).
Returns
Zero-based index into scene.atoms() of the closest hit atom, or std::nullopt.
Here is the caller graph for this function:

Variable Documentation

◆ ELEMENT_COLORS

std::array<RgbaColor, 119> correlation::render3d::ELEMENT_COLORS
inlineconstexpr

Full 118-element CPK lookup table based on official ASE/Jmol standards.

Index 0 holds the fallback color (Deep Pink {255, 20, 147, 255}) for unassigned or invalid Z. Indices 1 to 118 map directly to elements H (Z=1) through Og (Z=118) in O(1) time.