49 fOptionString(
"none"),
50 fScene(
"room-and-chair"),
57 fWindowSillHeight(80*
cm),
58 fWindowOffset(-50*
cm),
62 fDoorFrameOffset(1.5*
m),
70 fChairThickness(3.*
cm)
84 if (
fScene ==
"room-and-chair" )
139 Chair(chair_visAtts, chair_transform);
150 (
G4Box(
"chair-back",fChairX, fChairThickness, fChairZ - fChairSeat),
152 G4Translate3D(0.,-fChairY + fChairThickness, fChairZ + fChairSeat));
154 (
G4Box(
"chair-seat",fChairX, fChairY, fChairThickness),
155 visAtts, transform *
G4TranslateZ3D(-fChairThickness + 2.* fChairSeat));
156 for (
int i = -1; i < 2; i+=2) {
157 for (
int j = -1; j < 2; j+=2) {
159 (
G4Box(
"chair-leg",fChairThickness,
161 fChairSeat - fChairThickness),
164 j * (fChairY - fChairThickness),
165 fChairSeat - fChairThickness));
183 G4bool any =
false,
A =
false, X =
false, Y =
false, Z =
false;
184 if (fOptionString.contains(
"a")) {
A =
true; any =
true;}
185 if (fOptionString.contains(
"x")) {X =
true; any =
true;}
186 if (fOptionString.contains(
"y")) {Y =
true; any =
true;}
187 if (fOptionString.contains(
"z")) {Z =
true; any =
true;}
191 G4bool isAuxEdgeVisible =
false;
196 notLastFace = polyhedron->GetNextFacet(n, nodes);
201 notLastEdge = polyhedron->GetNextEdge(v1, v2, edgeFlag);
202 if (isAuxEdgeVisible || edgeFlag > 0) {
206 v21a.transform(transform);
210 (Z && abs(v21a.z()) >
211 sqrt(v21a.x()*v21a.x()+v21a.y()*v21a.y())) ||
212 (X && abs(v21a.x()) >
213 sqrt(v21a.y()*v21a.y()+v21a.z()*v21a.z())) ||
214 (Y && abs(v21a.y()) >
215 sqrt(v21a.x()*v21a.x()+v21a.x()*v21a.z()))) {
218 edge.push_back(v1 - extender * v21.unit());
219 edge.push_back(v2 + extender * v21.unit());
220 fpVisManager->Draw(edge, transform);
223 }
while (notLastEdge);
224 }
while (notLastFace);
228 fpVisManager->Draw(solid, visAtts, transform);
virtual G4Polyhedron * GetPolyhedron() const
void SetForceWireframe(G4bool)
static G4VVisManager * GetConcreteInstance()
HepGeom::Point3D< G4double > G4Point3D
HepGeom::Vector3D< G4double > G4Vector3D
Definition of the PerspectiveVisActionMessenger class.
void ExtendedDraw(const G4VSolid &, const G4VisAttributes &, const G4Transform3D &objectTransformation=G4Transform3D())
static const G4double A[nN]
void SetVisAttributes(const G4VisAttributes *)
G4double fWindowSillHeight
G4VVisManager * fpVisManager
Definition of the PerspectiveVisAction class.
void Chair(const G4VisAttributes &, const G4Transform3D &)
G4double fDoorFrameOffset