VGM Version 5.3
Loading...
Searching...
No Matches
VTessellatedSolid.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 VTessellatedSolid
14// ---------------------
15// The ABC for TessellatedSolid solids.
16//
17// Author: Ivana Hrivnacova; IPN Orsay
18
20
22
23//_____________________________________________________________________________
24std::ostream& operator<<(std::ostream& out, const VGM::ITessellatedSolid& tessellated)
25{
26 const VGM::ISolid& tessellatedSolid = tessellated;
27 out << tessellatedSolid;
28 return out;
29}
30
31//_____________________________________________________________________________
33{
35}
36
37//_____________________________________________________________________________
42
43//_____________________________________________________________________________
44std::ostream& BaseVGM::VTessellatedSolid::Put(std::ostream& out) const
45{
46 out << std::endl;
47 out << NofFacets() << " facets:" << std::endl;
48 for (int i = 0; i < NofFacets(); i++) {
49 out << "Facet #" << i << ": " << std::endl;
50
51 out << " " << NofVertices(i) << " vertices:" << std::endl;
52 for (int j = 0; j < NofVertices(i); j++) {
53 out << " (" << Vertex(i, j)[VGM::kDx] << ", "
54 << Vertex(i, j)[VGM::kDy] << ", " << Vertex(i, j)[VGM::kDz] << ")";
55 out << " mm" << std::endl;
56 }
57 }
58 return out;
59}
std::ostream & operator<<(std::ostream &out, const VGM::ITessellatedSolid &tessellated)
virtual std::ostream & Put(std::ostream &out) const
Put the printing of the solid parameters in the out stream.
The VGM interface to solids.
Definition ISolid.h:58
The VGM interface to extruded solids.
VGM interfaces.
Definition VMedium.h:28
@ kDx
Definition Transform.h:44
@ kDz
Definition Transform.h:46
@ kDy
Definition Transform.h:45