g4display
|
Initializes scene properties for the Geant4 visualization. More...
#include <g4SceneProperties.h>
Public Member Functions | |
G4SceneProperties (const std::shared_ptr< GOptions > &gopts) | |
Constructs a G4SceneProperties object. | |
std::vector< std::string > | addSceneTexts (const std::shared_ptr< GOptions > &gopts) |
Generates a vector of scene text commands. | |
std::vector< std::string > | scene_commands (const std::shared_ptr< GOptions > &gopts) |
The G4SceneProperties class provides helper functions to configure the scene in Geant4. It offers the ability to generate text commands that add labels or annotations to the scene. Configuration is obtained from a GOptions instance, and logging is performed using a GLogger.
Definition at line 49 of file g4SceneProperties.h.
|
inlineexplicit |
Initializes the scene properties based on configuration options. The constructor uses the provided GOptions pointer to configure internal settings and logs the initialization details.
gopts | Pointer to the GOptions object containing configuration parameters. |
Definition at line 61 of file g4SceneProperties.h.
std::vector< std::string > G4SceneProperties::addSceneTexts | ( | const std::shared_ptr< GOptions > & | gopts | ) |
Generates visualization commands for adding text annotations to the scene.
Reads scene text-related configuration from the provided GOptions object and constructs a vector of strings. Each string represents a command (e.g., to add a text label) that can be applied to the Geant4 UImanager.
gopts | Pointer to the GOptions object containing scene text configuration. |
This function retrieves a list of scene text objects from the global options and constructs the appropriate commands to add text annotations to the scene. It sets the text color, position, and size based on the parameters provided. Depending on whether a Z-coordinate is specified, the function chooses between 2D and regular text commands.
gopts | Pointer to the global options object. |
Definition at line 75 of file g4SceneProperties.cc.
std::vector< std::string > G4SceneProperties::scene_commands | ( | const std::shared_ptr< GOptions > & | gopts | ) |
Definition at line 21 of file g4SceneProperties.cc.