|
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 > | 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),g4text option.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 40 of file g4SceneProperties.h.
|
inlineexplicit |
| gopts | Shared options object used for module configuration and logging. |
Definition at line 48 of file g4SceneProperties.h.
| 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 text, when the Z coordinate is explicitly provided).For each entry the method:
/vis/set/textColour,/vis/scene/add/... command with position and size,/vis/set/textColour with no arguments.| gopts | Shared options object used to read text configuration. |
Definition at line 63 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 18 of file g4SceneProperties.cc.