Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
DrawGeometryVisAction Class Reference

#include <DrawGeometryVisAction.hh>

Inheritance diagram for DrawGeometryVisAction:
G4VUserVisAction

Public Member Functions

 DrawGeometryVisAction ()
 
 ~DrawGeometryVisAction ()
 
void Draw () override
 
const G4VisExtentGetVisxtent () const
 

Private Attributes

B1::DetectorConstructionfDetectorConstruction
 
G4VPhysicalVolumefPhysicalVolume
 
G4Transform3D fTransform
 
G4VisExtent fExtent
 

Detailed Description

Definition at line 43 of file DrawGeometryVisAction.hh.

Constructor & Destructor Documentation

◆ DrawGeometryVisAction()

DrawGeometryVisAction::DrawGeometryVisAction ( )

Definition at line 42 of file DrawGeometryVisAction.cc.

42 {
43 // Get a physical volume from your detector construction
45 // (I think, properly, we should delete this in the destructor.)
47 // (I think the deletion of constructed volumes is handled by the volume stores.)
48 // Give this an overall transform to avoid clash with other vis action(s)
49 fTransform = G4Translate3D(-20*cm,20*cm,0);
50 fExtent = fPhysicalVolume->GetLogicalVolume()->GetSolid()->GetExtent().Transform(fTransform);
51}
Detector construction class to define materials and geometry.
G4VPhysicalVolume * Construct() override
G4VPhysicalVolume * fPhysicalVolume
B1::DetectorConstruction * fDetectorConstruction

◆ ~DrawGeometryVisAction()

DrawGeometryVisAction::~DrawGeometryVisAction ( )

Definition at line 55 of file DrawGeometryVisAction.cc.

55 {
57}

Member Function Documentation

◆ Draw()

void DrawGeometryVisAction::Draw ( )
override

Definition at line 61 of file DrawGeometryVisAction.cc.

61 {
62 G4VVisManager* pVisManager = G4VVisManager::GetConcreteInstance();
63 if (pVisManager) {
64 pVisManager->DrawGeometry(fPhysicalVolume,fTransform);
65 }
66}

◆ GetVisxtent()

const G4VisExtent & DrawGeometryVisAction::GetVisxtent ( ) const
inline

Definition at line 48 of file DrawGeometryVisAction.hh.

48{return fExtent;}

Member Data Documentation

◆ fDetectorConstruction

B1::DetectorConstruction* DrawGeometryVisAction::fDetectorConstruction
private

Definition at line 50 of file DrawGeometryVisAction.hh.

◆ fPhysicalVolume

G4VPhysicalVolume* DrawGeometryVisAction::fPhysicalVolume
private

Definition at line 51 of file DrawGeometryVisAction.hh.

◆ fTransform

G4Transform3D DrawGeometryVisAction::fTransform
private

Definition at line 52 of file DrawGeometryVisAction.hh.

◆ fExtent

G4VisExtent DrawGeometryVisAction::fExtent
private

Definition at line 53 of file DrawGeometryVisAction.hh.


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

Applications | User Support | Publications | Collaboration