Skip to content

Modifications to C++ plots for interactive raytrace plots#3776

Open
pshriwise wants to merge 4 commits intoopenmc-dev:developfrom
pshriwise:raytrace-cpp-interface
Open

Modifications to C++ plots for interactive raytrace plots#3776
pshriwise wants to merge 4 commits intoopenmc-dev:developfrom
pshriwise:raytrace-cpp-interface

Conversation

@pshriwise
Copy link
Contributor

Description

This makes some modifications to the plot classes to make them more usable purely from the C++ API. The primary focus here is the addition of a default constructor to the SolidRayTracePlot class. Accessors have been added to this class and others so that the attributes can be modified from C++ as well.

Lastly, a refactor of the PlottableInterface was performed so that create_image can be called on any plot class (with the exception of voxel plots) to produce ImageData directly, which may be useful for exterior applications.

In the case of the SolidRayTracePlot this allows ImageData generated by the class to be accessed by a linked application. The combination of this capability and the new update_view() method to recalculate attributes derived from the camera parameters allows the class to act as an image buffer generation kernel for interactive visualization of raytraced plots. The miniapp below is a prototype. After a subsequent PR adding connections through the CAPI my aim is to enable this capability in the plotter utility.

openmc-render-ex.webm

These changes shouldn't have any effect on current plotting capabilities, performance, or behavior as it exists now in OpenMC.

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 15) on any C++ source files (if applicable)
  • I have followed the style guidelines for Python source files (if applicable)
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

@pshriwise pshriwise changed the title Pulling in changes from original branch Modifications to C++ plots for interactive raytrace plots Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant