VGM
Version 5.5
Toggle main menu visibility
Loading...
Searching...
No Matches
packages
BaseVGM
source
solids
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
19
#include "
VGM/common/Transform.h
"
20
21
#include "
BaseVGM/solids/VTessellatedSolid.h
"
22
23
//_____________________________________________________________________________
24
std::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
//_____________________________________________________________________________
32
BaseVGM::VTessellatedSolid::VTessellatedSolid
() :
VGM
::ITessellatedSolid()
33
{
35
}
36
37
//_____________________________________________________________________________
38
BaseVGM::VTessellatedSolid::~VTessellatedSolid
()
39
{
40
//
41
}
42
43
//_____________________________________________________________________________
44
std::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
}
Transform.h
operator<<
std::ostream & operator<<(std::ostream &out, const VGM::ITessellatedSolid &tessellated)
Definition
VTessellatedSolid.cxx:24
VTessellatedSolid.h
BaseVGM::VTessellatedSolid::Put
virtual std::ostream & Put(std::ostream &out) const
Put the printing of the solid parameters in the out stream.
Definition
VTessellatedSolid.cxx:44
BaseVGM::VTessellatedSolid::~VTessellatedSolid
virtual ~VTessellatedSolid()
Definition
VTessellatedSolid.cxx:38
BaseVGM::VTessellatedSolid::VTessellatedSolid
VTessellatedSolid()
Definition
VTessellatedSolid.cxx:32
VGM::ISolid
The VGM interface to solids.
Definition
ISolid.h:58
VGM::ITessellatedSolid
The VGM interface to extruded solids.
Definition
ITessellatedSolid.h:31
VGM::ITessellatedSolid::NofVertices
virtual int NofVertices(int ifacet) const =0
Return the number of vertices in the the ifacet-th facet.
VGM::ITessellatedSolid::Vertex
virtual ThreeVector Vertex(int ifacet, int index) const =0
Return the index-th vertex in the ifacet-th facet.
VGM::ITessellatedSolid::NofFacets
virtual int NofFacets() const =0
Return the number of facets.
VGM
VGM interfaces.
Definition
VMedium.h:28
VGM::kDx
@ kDx
Definition
Transform.h:44
VGM::kDz
@ kDz
Definition
Transform.h:46
VGM::kDy
@ kDy
Definition
Transform.h:45
Generated on
for VGM by
1.17.0