VGM Version 5.3
Loading...
Searching...
No Matches
VMultiUnion.cxx
Go to the documentation of this file.
1// $Id$
2
3// -----------------------------------------------------------------------
4// The BaseVGM package of the Virtual Geometry Model
5// Copyright (C) 2007, Ivana Hrivnacova
6// All rights reserved.
7//
8// For the licensing terms see vgm/LICENSE.
9// Contact: ivana@ipno.in2p3.fr
10// -----------------------------------------------------------------------
11
12//
13// Class VMultiUnion
14// --------------------
15// The ABC for Boolean solids.
16//
17// Author: Ivana Hrivnacova; IPN Orsay
18
21
22#include <math.h>
23
24//_____________________________________________________________________________
25std::ostream& operator<<(std::ostream& out, const VGM::IMultiUnion& boolean)
26{
27 const VGM::ISolid& MultiUnion = boolean;
28 out << MultiUnion;
29 return out;
30}
31
32//_____________________________________________________________________________
34{
36}
37
38//_____________________________________________________________________________
43
44//_____________________________________________________________________________
45std::ostream& BaseVGM::VMultiUnion::Put(std::ostream& out) const
46{
47 for (int i = 0; i < NofSolids(); ++i) {
48 out << i << "th constituent = " << *ConstituentSolid(i) << std::endl
49 << " Displacement translation (object): ( "
50 << Transformation(i)[VGM::kDx] << ", " << Transformation(i)[VGM::kDy]
51 << ", " << Transformation(i)[VGM::kDz] << ") mm " << std::endl
52 << " Displacement rotation (object): ("
53 << Transformation(i)[VGM::kAngleX] << ", "
54 << Transformation(i)[VGM::kAngleY] << ", "
55 << Transformation(i)[VGM::kAngleZ] << ") deg ";
56 if (Round(Transformation(i)[6]) == 0)
57 out << " no reflectionZ";
58 else
59 out << " reflectionZ";
60 }
61 return out;
62}
std::ostream & operator<<(std::ostream &out, const VGM::IMultiUnion &boolean)
virtual std::ostream & Put(std::ostream &out) const
Put the printing of the solid parameters in the out stream.
The VGM interface to Boolean solids.
Definition IMultiUnion.h:31
The VGM interface to solids.
Definition ISolid.h:58
double Round(double x)
Round number.
Definition utilities.cxx:34
VGM interfaces.
Definition VMedium.h:28
@ kAngleZ
Definition Transform.h:49
@ kDx
Definition Transform.h:44
@ kAngleY
Definition Transform.h:48
@ kDz
Definition Transform.h:46
@ kAngleX
Definition Transform.h:47
@ kDy
Definition Transform.h:45