VGM Version 5.3
Loading...
Searching...
No Matches
IPlacement.h
Go to the documentation of this file.
1// $Id$
2
3// -----------------------------------------------------------------------
4// The VGM 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
13//
19
20#ifndef VGM_I_PLACEMENT_H
21#define VGM_I_PLACEMENT_H
22
23#include "VGM/common/Axis.h"
25
26#include <iostream>
27#include <string>
28
29namespace VGM {
30
38
39std::string PlacementTypeName(VGM::PlacementType typeId);
40
41class IVolume;
42
44{
45 public:
46 virtual ~IPlacement() {}
47
48 // methods
51 virtual PlacementType Type() const = 0;
54 virtual std::string Name() const = 0;
55
58 virtual IVolume* Volume() const = 0;
61 virtual IVolume* Mother() const = 0;
64 virtual int CopyNo() const = 0;
65
69 virtual Transform Transformation() const = 0;
74 virtual bool MultiplePlacementData(VGM::Axis& axis, int& nofItems,
75 double& width, double& offset, double& halfGap) const = 0;
81 std::vector<VGM::Transform>& transforms,
82 std::vector<VGM::IVolume*>& volumes) const = 0;
83
86 virtual std::ostream& Put(std::ostream& out) const = 0;
87};
88
89} // namespace VGM
90
91std::ostream& operator<<(std::ostream& out, const VGM::IPlacement& placement);
92
93#endif // VGM_I_PLACEMENT_H
std::ostream & operator<<(std::ostream &out, const VGM::IPlacement &placement)
VGM Axis enumeration.
The VGM interface to positions of volumes.
Definition IPlacement.h:44
virtual PlacementType Type() const =0
Return the type of this placement.
virtual ~IPlacement()
Definition IPlacement.h:46
virtual Transform Transformation() const =0
Return the 3D transformation (if simple placement)
virtual bool MultiplePlacementData(VGM::Axis &axis, int &nofItems, double &width, double &offset, double &halfGap) const =0
Fill the multiple placement data if relevant and return true; return false if not multiple placement.
virtual bool ParameterisedPlacementData(std::vector< VGM::Transform > &transforms, std::vector< VGM::IVolume * > &volumes) const =0
Fill the parameterised placement data if relevant and return true; return false if not parameterised ...
virtual int CopyNo() const =0
Return the copy number of this placement.
virtual std::string Name() const =0
Return the name of this placement.
virtual IVolume * Volume() const =0
Return the associated volume.
virtual IVolume * Mother() const =0
Return the associated mother volume.
virtual std::ostream & Put(std::ostream &out) const =0
Put the printing of the placement parameters in the out stream.
The VGM interface to volumes.
Definition IVolume.h:32
VGM interfaces.
Definition VMedium.h:28
std::vector< double > Transform
Definition Transform.h:40
std::string PlacementTypeName(VGM::PlacementType typeId)
PlacementType
Definition IPlacement.h:32
@ kParameterised
Definition IPlacement.h:35
@ kSimplePlacement
Definition IPlacement.h:33
@ kMultiplePlacement
Definition IPlacement.h:34
@ kUnknownPlacement
Definition IPlacement.h:36