VGM Version 5.3
Loading...
Searching...
No Matches
IBooleanSolid.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
19
20#ifndef VGM_I_BOOLEAN_SOLID_H
21#define VGM_I_BOOLEAN_SOLID_H
22
24#include "VGM/solids/ISolid.h"
25
26#include <iostream>
27
28namespace VGM {
29
37
38std::string BooleanTypeName(BooleanType typeId);
39
40class IBooleanSolid : public virtual ISolid
41{
42 public:
43 virtual ~IBooleanSolid() {}
44
45 // methods
46
47 virtual SolidType Type() const = 0;
48 virtual std::string Name() const = 0;
49
52 virtual BooleanType BoolType() const = 0;
55 virtual ISolid* ConstituentSolidA() const = 0;
58 virtual ISolid* ConstituentSolidB() const = 0;
62 virtual Transform Displacement() const = 0;
66 virtual bool ToBeReflected() const = 0;
67
68 // streaming
69 virtual std::ostream& Put(std::ostream& out) const = 0;
70};
71
72} // namespace VGM
73
74std::ostream& operator<<(std::ostream& out, const VGM::IBooleanSolid& solid);
75
76#endif // VGM_I_BOOLEAN_SOLID_H
std::ostream & operator<<(std::ostream &out, const VGM::IBooleanSolid &solid)
The VGM interface to Boolean solids.
virtual std::string Name() const =0
Return the name of this solid.
virtual ISolid * ConstituentSolidB() const =0
Return the second constituent solid.
virtual bool ToBeReflected() const =0
Return true if the solid has to be first reflected before being placed.
virtual std::ostream & Put(std::ostream &out) const =0
Put the printing of the solid parameters in the out stream.
virtual ~IBooleanSolid()
virtual ISolid * ConstituentSolidA() const =0
Return the first constituent solid.
virtual SolidType Type() const =0
Return the type of this solid.
virtual BooleanType BoolType() const =0
Return the Boolean type of this solid.
virtual Transform Displacement() const =0
Return the 3D displacement of the second constituent solid with respect to the first one.
The VGM interface to solids.
Definition ISolid.h:58
VGM interfaces.
Definition VMedium.h:28
std::vector< double > Transform
Definition Transform.h:40
@ kUnknownBoolean
@ kIntersection
@ kSubtraction
std::string BooleanTypeName(BooleanType typeId)
SolidType
Definition ISolid.h:29