SLIC  6.1.1
Simulation for the Linear Collider (SLIC) - Geant4 simulation application
Public Member Functions | Private Member Functions | Private Attributes | List of all members
VRML2Writer Class Reference

A simple, standalone VRML2 writer that dumps the detector geometry in a hierarchical format. More...

#include <VRML2Writer.hh>

Public Member Functions

 VRML2Writer (const std::string &filename)
 
 ~VRML2Writer ()
 
void write ()
 

Private Member Functions

void indent ()
 
void processBox (G4Box *box)
 
void processPhysicalVolume (G4VPhysicalVolume *volume)
 
void processPolyhedron (G4Polyhedron *poly)
 
void processSolid (G4VSolid *solid)
 
void processTopVolume (G4VPhysicalVolume *volume)
 
void processVisualization (G4VPhysicalVolume *volume)
 
void unindent ()
 
void writeLine (const std::string &line)
 

Private Attributes

int _indentLevel
 
std::ofstream _out
 

Detailed Description

A simple, standalone VRML2 writer that dumps the detector geometry in a hierarchical format.

Definition at line 21 of file VRML2Writer.hh.

Constructor & Destructor Documentation

◆ VRML2Writer()

VRML2Writer ( const std::string &  filename)

Class constructor.

Definition at line 24 of file VRML2Writer.cc.

References VRML2Writer::_out.

◆ ~VRML2Writer()

Class destructor.

Definition at line 29 of file VRML2Writer.cc.

References VRML2Writer::_out.

Member Function Documentation

◆ indent()

void indent ( )
private

◆ processBox()

void processBox ( G4Box *  box)
private

Process a box shape.

Parameters
[in]boxThe G4Box.

Definition at line 139 of file VRML2Writer.cc.

References VRML2Writer::indent(), VRML2Writer::unindent(), and VRML2Writer::writeLine().

Referenced by VRML2Writer::processSolid().

◆ processPhysicalVolume()

void processPhysicalVolume ( G4VPhysicalVolume *  volume)
private

Process a physical volume.

Parameters
[in]volumeThe physical volume.

Definition at line 51 of file VRML2Writer.cc.

References VRML2Writer::indent(), VRML2Writer::processSolid(), VRML2Writer::processVisualization(), VRML2Writer::unindent(), and VRML2Writer::writeLine().

Referenced by VRML2Writer::processTopVolume().

◆ processPolyhedron()

void processPolyhedron ( G4Polyhedron *  poly)
private

Process a polyhedron.

Parameters
[in]polyThe G4Polyhedron.

Definition at line 151 of file VRML2Writer.cc.

References VRML2Writer::indent(), VRML2Writer::unindent(), and VRML2Writer::writeLine().

Referenced by VRML2Writer::processSolid().

◆ processSolid()

void processSolid ( G4VSolid *  solid)
private

Process a solid.

Parameters
[in]solidThe G4VSolid.

Definition at line 131 of file VRML2Writer.cc.

References VRML2Writer::processBox(), and VRML2Writer::processPolyhedron().

Referenced by VRML2Writer::processPhysicalVolume().

◆ processTopVolume()

void processTopVolume ( G4VPhysicalVolume *  volume)
private

Recursively process volumes from the top.

Parameters
[in]Thetop volume.

Definition at line 39 of file VRML2Writer.cc.

References VRML2Writer::indent(), VRML2Writer::processPhysicalVolume(), VRML2Writer::unindent(), and VRML2Writer::writeLine().

Referenced by VRML2Writer::write().

◆ processVisualization()

void processVisualization ( G4VPhysicalVolume *  volume)
private

Process the visualization settings of the volume.

Parameters
[in]volumeThe physical volume.

Definition at line 107 of file VRML2Writer.cc.

References VRML2Writer::indent(), VRML2Writer::unindent(), and VRML2Writer::writeLine().

Referenced by VRML2Writer::processPhysicalVolume().

◆ unindent()

void unindent ( )
private

◆ write()

void write ( )

Write out VRML to the current file.

Definition at line 34 of file VRML2Writer.cc.

References VRML2Writer::processTopVolume(), and VRML2Writer::writeLine().

Referenced by VRML2WriterMessenger::SetNewValue().

◆ writeLine()

void writeLine ( const std::string &  line)
private

Member Data Documentation

◆ _indentLevel

int _indentLevel
private

◆ _out

std::ofstream _out
private

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