g4display
Loading...
Searching...
No Matches
g4display Namespace Reference

Data Structures

struct  G4Camera
 Camera angle configuration derived from the g4camera option node. More...
 
struct  G4Dawn
 DAWN view configuration derived from the dawn option node. More...
 
struct  G4SceneText
 One text annotation to be inserted into the Geant4 scene. More...
 
struct  G4View
 Viewer configuration derived from the g4view option node. More...
 

Functions

G4View getG4View (const std::shared_ptr< GOptions > &gopts)
 Read the g4view option node and return a projected G4View struct.
 
G4Camera getG4Camera (const std::shared_ptr< GOptions > &gopts)
 Read the g4camera option node and return a projected G4Camera struct.
 
G4Dawn getG4Dawn (const std::shared_ptr< GOptions > &gopts)
 Read the dawn option node and return a projected G4Dawn struct.
 
GOptions defineOptions ()
 Define the full set of g4display options.
 
vector< G4SceneTextgetSceneTexts (const std::shared_ptr< GOptions > &gopts)
 Extract scene text entries from the g4text option node.
 
GOptions addSceneTextsOptions ()
 Define the g4text structured option schema.
 

Function Documentation

◆ addSceneTextsOptions()

GOptions g4display::addSceneTextsOptions ( )

This helper returns a GOptions object that defines the g4text option. The option supports multiple text items, each item providing:

  • text (required)
  • color (default "black")
  • x, y (default 0)
  • z (default sentinel GNOT_SPECIFIED_SCENE_TEXT_Z)
  • size (default 24.0)
Returns
A GOptions object containing the g4text option definition.

Definition at line 36 of file g4Text.cc.

◆ defineOptions()

GOptions g4display::defineOptions ( )

This function builds a GOptions object for the module, including:

  • g4view : viewer driver/window settings and precision.
  • g4camera : initial camera angles.
  • dawn / useDawn : DAWN view configuration and enable switch.
  • g4text : optional scene text entries (added via g4display::addSceneTextsOptions).
Returns
A GOptions instance containing the module option definitions.

Definition at line 53 of file g4display_options.cc.

◆ getG4Camera()

G4Camera g4display::getG4Camera ( const std::shared_ptr< GOptions > & gopts)
Parameters
goptsShared options object to query.
Returns
G4Camera populated from the g4camera node.

Definition at line 25 of file g4display_options.cc.

◆ getG4Dawn()

G4Dawn g4display::getG4Dawn ( const std::shared_ptr< GOptions > & gopts)

The implementation normalizes "null" values to goptions::NODFLT.

Parameters
goptsShared options object to query.
Returns
G4Dawn populated from the dawn node.

Definition at line 36 of file g4display_options.cc.

◆ getG4View()

G4View g4display::getG4View ( const std::shared_ptr< GOptions > & gopts)
Parameters
goptsShared options object to query.
Returns
G4View populated from the g4view node.

Definition at line 12 of file g4display_options.cc.

◆ getSceneTexts()

std::vector< G4SceneText > g4display::getSceneTexts ( const std::shared_ptr< GOptions > & gopts)

The function reads the option node named "g4text" and projects each element into a G4SceneText. Missing properties are filled with defaults defined by the option schema.

Parameters
goptsShared options object used to access the g4text option node.
Returns
A vector of G4SceneText entries in the order they appear in the option node.

Definition at line 13 of file g4Text.cc.