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

Data Structures

struct  G4View
 Viewer configuration derived from the g4view option node. More...
struct  G4Camera
 Camera angle configuration derived from the g4camera option node. More...
struct  G4Light
 Light angle configuration derived from the g4light 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  G4SceneText
 One text annotation to be inserted into the Geant4 scene. 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.

Variables

constexpr char GDEFAULTVIEWERDRIVER [] = "TOOLSSG_QT_GLES"
constexpr char GDEFAULTVIEWERSIZE [] = "800x800"
constexpr char GDEFAULTVIEWERPOS [] = "-400+100"
constexpr int GDEFAULTVSEGPERCIRCLE = 100
constexpr int EC__VISDRIVERNOTFOUND = 1301
constexpr int EC__NOUIMANAGER = 1302
std::vector< std::string > AVAILABLEG4VIEWERS
 List of Geant4 viewer driver names known to the application.

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 (required when kind is 3D)
  • 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 42 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 105 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)

YAML null values are represented with std::nullopt.

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 82 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.

Variable Documentation

◆ AVAILABLEG4VIEWERS

std::vector<std::string> g4display::AVAILABLEG4VIEWERS
extern

The list is defined elsewhere (typically in a compilation unit) and used to validate or present available driver choices.

◆ EC__NOUIMANAGER

int g4display::EC__NOUIMANAGER = 1302
inlineconstexpr

Definition at line 50 of file g4displayConventions.h.

◆ EC__VISDRIVERNOTFOUND

int g4display::EC__VISDRIVERNOTFOUND = 1301
inlineconstexpr

Definition at line 49 of file g4displayConventions.h.

◆ GDEFAULTVIEWERDRIVER

char g4display::GDEFAULTVIEWERDRIVER[] = "TOOLSSG_QT_GLES"
inlineconstexpr

Definition at line 37 of file g4displayConventions.h.

◆ GDEFAULTVIEWERPOS

char g4display::GDEFAULTVIEWERPOS[] = "-400+100"
inlineconstexpr

Definition at line 43 of file g4displayConventions.h.

◆ GDEFAULTVIEWERSIZE

char g4display::GDEFAULTVIEWERSIZE[] = "800x800"
inlineconstexpr

Definition at line 40 of file g4displayConventions.h.

◆ GDEFAULTVSEGPERCIRCLE

int g4display::GDEFAULTVSEGPERCIRCLE = 100
inlineconstexpr

Definition at line 46 of file g4displayConventions.h.