11#include <framework/core/Module.h>
16class G4VPhysicalVolume;
52 void event()
override;
57 void assignName(std::vector<std::string>*,
unsigned int,
const G4String&,
int);
78 void writePhysicalVolume(
const G4VPhysicalVolume*,
const std::string&,
const std::string&,
bool);
void describeSolid(G4VSolid *, const std::string &, bool)
Emit VRML for each solid.
VRMLWriterModule()
Constructor of the module.
void writePolyhedron(const G4Polyhedron *, const std::string &)
Emit VRML for the solid's polyhedron.
void initialize() override
Initialize at the start of a job.
void event() override
Called for each event: this runs the VRML writer only for the first event.
void writePhysicalVolume(const G4VPhysicalVolume *, const std::string &, const std::string &, bool)
Emit VRML for each daughter of a logical volume.
void descendAndDescribe(G4VPhysicalVolume *, const std::string &, int)
Emit VRML for a physical volume (recursive)
std::ofstream m_File
Output file.
void writePreamble(void)
Emit VRML for the start of the file.
bool m_First
Once-only flag to write VRML only on the first event.
std::vector< std::vector< int > > * m_PVIndex
Indices (in G4PhysicalVolumeStore) of the logical volume's physical-volume daughters.
void assignName(std::vector< std::string > *, unsigned int, const G4String &, int)
Create unique and legal name for each solid.
std::vector< bool > * m_IsCylinder
Flag to indicate that a solid can be rendered as a VMRL cylinder.
std::string m_Filename
User-specified output filename.
std::vector< bool > * m_PVWritten
Flag to indicate that the physical volume has already been written.
std::vector< std::string > * m_PVName
Modified (legal-character and unique) physical-volume name.
std::vector< std::string > * m_SolidName
Modified (legal-character and unique) solid name.
void describeLogicalVolume(G4LogicalVolume *, const std::string &, const std::string &, bool)
Emit VRML for each logical volume.
std::vector< bool > * m_LVWritten
Flag to indicate that the logical volume has already been written.
HepPolyhedron * getBooleanSolidPolyhedron(G4VSolid *)
Create polyhedron for a boolean solid (recursive)
std::vector< std::string > * m_LVName
Modified (legal-character and unique) logical-volume name.
void describePhysicalVolume(G4VPhysicalVolume *)
Access next physical volume in the tree (recursive)
Abstract base class for different kinds of events.