g4display
Loading...
Searching...
No Matches
G4SceneProperties Class Reference

Initializes scene properties for the Geant4 visualization. More...

#include <g4SceneProperties.h>

Inheritance diagram for G4SceneProperties:
Inheritance graph
Collaboration diagram for G4SceneProperties:
Collaboration graph

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)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ G4SceneProperties()

G4SceneProperties::G4SceneProperties ( const std::shared_ptr< GOptions > & gopts)
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.

Parameters
goptsPointer to the GOptions object containing configuration parameters.

Definition at line 61 of file g4SceneProperties.h.

Member Function Documentation

◆ addSceneTexts()

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.

Parameters
goptsPointer to the GOptions object containing scene text configuration.
Returns
A vector of strings representing the scene text commands.

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.

Parameters
goptsPointer to the global options object.
Returns
A vector of strings containing the visualization commands for scene texts.

Definition at line 75 of file g4SceneProperties.cc.

◆ scene_commands()

std::vector< std::string > G4SceneProperties::scene_commands ( const std::shared_ptr< GOptions > & gopts)

Definition at line 21 of file g4SceneProperties.cc.


The documentation for this class was generated from the following files: