VGM Version 5.3
Loading...
Searching...
No Matches
VDisplacedSolid.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 VDisplacedSolid
14// --------------------
15// The ABC for displaced solids.
16//
17// Author: Ivana Hrivnacova; IPN Orsay
18
21
22#include <math.h>
23
24//_____________________________________________________________________________
25std::ostream& operator<<(std::ostream& out, const VGM::IDisplacedSolid& solid)
26{
27 const VGM::ISolid& displacedSolid = solid;
28 out << displacedSolid;
29 return out;
30}
31
32//_____________________________________________________________________________
34{
36}
37
38//_____________________________________________________________________________
43
44//_____________________________________________________________________________
45std::ostream& BaseVGM::VDisplacedSolid::Put(std::ostream& out) const
46{
47 out << " Const. = \"" << ConstituentSolid()->Name() << "\""
48 << " Displacement = ( " << Displacement()[VGM::kDx] << ", "
49 << Displacement()[VGM::kDy] << ", " << Displacement()[VGM::kDz]
50 << ")mm ( " << Displacement()[VGM::kAngleX] << ", "
51 << Displacement()[VGM::kAngleY] << ", " << Displacement()[VGM::kAngleZ]
52 << ")deg ";
53
54 if (Round(Displacement()[6]) == 0)
55 out << " noReflZ";
56 else
57 out << " reflZ";
58
59 return out;
60}
std::ostream & operator<<(std::ostream &out, const VGM::IDisplacedSolid &solid)
virtual std::ostream & Put(std::ostream &out) const
Put the printing of the solid parameters in the out stream.
The VGM interface to displaced solids.
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