|
g4display
|
Helper for constructing Geant4 visualization command sequences. More...
#include <g4SceneProperties.h>
Public Member Functions | |
| G4SceneProperties (const std::shared_ptr< GOptions > &gopts) | |
| Construct a scene-properties helper bound to a set of options. | |
| std::vector< std::string > | addSceneTexts (const std::shared_ptr< GOptions > &gopts) |
| Build commands that insert configured text annotations into the scene. | |
| std::vector< std::string > | addSceneDecorations (const std::shared_ptr< GOptions > &gopts) |
| Build commands for optional scene decorations such as scale, axes, logos, and frame. | |
| std::vector< std::string > | scene_commands (const std::shared_ptr< GOptions > &gopts) |
| Build the full command sequence for scene initialization. | |
Public Member Functions inherited from GBase< G4SceneProperties > | |
| GBase (const std::shared_ptr< GOptions > &gopt, std::string logger_name="") | |
| GBase (const std::shared_ptr< GLogger > &logger) | |
| GBase (const GBase &)=default | |
| GBase (GBase &&) noexcept=default | |
| virtual | ~GBase () |
| GBase & | operator= (const GBase &)=default |
| GBase & | operator= (GBase &&) noexcept=default |
Additional Inherited Members | |
Protected Attributes inherited from GBase< G4SceneProperties > | |
| std::shared_ptr< GLogger > | log |
G4SceneProperties encapsulates the “policy” of how a scene is initialized from options:
--gui),--useDawn),The helper does not apply commands directly; it returns a list of command strings so the caller can decide when to execute them (typically right after the Geant4 visualization system is initialized).
Definition at line 39 of file g4SceneProperties.h.
|
inlineexplicit |
| gopts | Shared options object used for module configuration and logging. |
Definition at line 47 of file g4SceneProperties.h.
| std::vector< std::string > G4SceneProperties::addSceneDecorations | ( | const std::shared_ptr< GOptions > & | gopts | ) |
| gopts | Shared options object used to read decoration configuration. |
Definition at line 88 of file g4SceneProperties.cc.
| std::vector< std::string > G4SceneProperties::addSceneTexts | ( | const std::shared_ptr< GOptions > & | gopts | ) |
The g4text option is parsed into a list of g4display::G4SceneText objects, and then mapped to Geant4 commands of the form:
/vis/scene/add/text (3D text that belongs to the scene),/vis/scene/add/text2D (2D overlay text).For each entry the method:
/vis/set/textColour,/vis/set/textLayout,/vis/scene/add/... command with position and size,| gopts | Shared options object used to read text configuration. |
Definition at line 116 of file g4SceneProperties.cc.
| std::vector< std::string > G4SceneProperties::scene_commands | ( | const std::shared_ptr< GOptions > & | gopts | ) |
The returned command list typically includes:
/vis/scene/create),useDawn is enabled),gui is enabled),| gopts | Shared options object used to derive viewer/camera configuration. |
Definition at line 36 of file g4SceneProperties.cc.