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  G4Decorations
 Optional scene decorations derived from the g4decoration option node. More...
 
struct  G4Light
 Light angle configuration derived from the g4light 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.
 
G4Light getG4Light (const std::shared_ptr< GOptions > &gopts)
 Read the g4light option node and return a projected G4Light struct.
 
G4Dawn getG4Dawn (const std::shared_ptr< GOptions > &gopts)
 Read the dawn option node and return a projected G4Dawn struct.
 
G4Decorations getG4Decorations (const std::shared_ptr< GOptions > &gopts)
 Read the g4decoration option node and return scene decoration settings.
 
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")
  • kind (default "2D"; use "3D" for /vis/scene/add/text)
  • layout (default empty; e.g. "right")
  • x, y (default 0)
  • z (default sentinel GNOT_SPECIFIED_SCENE_TEXT_Z)
  • unit (default "cm" for 3D text)
  • size (default 24.0)
  • dx, dy (default 4.0 for 3D text offsets)
Returns
A GOptions object containing the g4text option definition.

Definition at line 43 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.
  • g4light : initial light-source 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 110 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 49 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 71 of file g4display_options.cc.

◆ getG4Decorations()

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

Definition at line 87 of file g4display_options.cc.

◆ getG4Light()

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

Definition at line 60 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 34 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.