 |
Belle II Software
release-05-02-19
|
11 #ifndef VRMLWRITERMODULE_H
12 #define VRMLWRITERMODULE_H
14 #include <framework/core/Module.h>
19 class G4VPhysicalVolume;
20 class G4LogicalVolume;
55 void event()
override;
60 void assignName(std::vector<std::string>*,
unsigned int,
const G4String&,
int);
81 void writePhysicalVolume(
const G4VPhysicalVolume*,
const std::string&,
const std::string&,
bool);
void assignName(std::vector< std::string > *, unsigned int, const G4String &, int)
Create unique and legal name for each solid.
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< bool > * m_IsCylinder
Flag to indicate that a solid can be rendered as a VMRL cylinder.
std::ofstream m_File
Output file.
std::string m_Filename
User-specified output filename.
VRMLWriterModule()
Constructor of the module.
std::vector< std::string > * m_SolidName
Modified (legal-character and unique) solid name.
std::vector< bool > * m_LVWritten
Flag to indicate that the logical volume has already been written.
void writePhysicalVolume(const G4VPhysicalVolume *, const std::string &, const std::string &, bool)
Emit VRML for each daughter of a logical volume.
void event() override
Called for each event: this runs the VRML writer only for the first event.
Abstract base class for different kinds of events.
void describeSolid(G4VSolid *, const std::string &, bool)
Emit VRML for each solid.
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 describeLogicalVolume(G4LogicalVolume *, const std::string &, const std::string &, bool)
Emit VRML for each logical volume.
std::vector< std::string > * m_PVName
Modified (legal-character and unique) physical-volume name.
void descendAndDescribe(G4VPhysicalVolume *, const std::string &, int)
Emit VRML for a physical volume (recursive)
void initialize() override
Initialize at the start of a job.
void describePhysicalVolume(G4VPhysicalVolume *)
Access next physical volume in the tree (recursive)
void writePolyhedron(const G4Polyhedron *, const std::string &)
Emit VRML for the solid's polyhedron.
std::vector< bool > * m_PVWritten
Flag to indicate that the physical volume has already been written.
std::vector< std::vector< int > > * m_PVIndex
Indices (in G4PhysicalVolumeStore) of the logical volume's physical-volume daughters.