MercuryDPM  Trunk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ArcWall.h
Go to the documentation of this file.
1 //Copyright (c) 2013-2020, The MercuryDPM Developers Team. All rights reserved.
2 //For the list of developers, see <http://www.MercuryDPM.org/Team>.
3 //
4 //Redistribution and use in source and binary forms, with or without
5 //modification, are permitted provided that the following conditions are met:
6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above copyright
9 // notice, this list of conditions and the following disclaimer in the
10 // documentation and/or other materials provided with the distribution.
11 // * Neither the name MercuryDPM nor the
12 // names of its contributors may be used to endorse or promote products
13 // derived from this software without specific prior written permission.
14 //
15 //THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16 //ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 //WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 //DISCLAIMED. IN NO EVENT SHALL THE MERCURYDPM DEVELOPERS TEAM BE LIABLE FOR ANY
19 //DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 //(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 //LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 //ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 //(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 //SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 
26 #ifndef ARCWALL_H
27 #define ARCWALL_H
28 
29 #include "Walls/BaseWall.h"
30 #include <cmath>
31 
32 class WallHandler;
33 
34 class BaseParticle;
35 
36 class BaseWall;
37 
47 class ArcWall : public BaseWall
48 {
49 public:
53  ArcWall();
54 
58  ArcWall(const ArcWall& aw);
59 
63  ~ArcWall() override = default;
64 
68  void set(Vec3D axis, Vec3D pos, Mdouble radius, Vec3D centreline, Mdouble semiangle);
69 
70  ArcWall* copy() const override;
71 
72  bool getDistanceAndNormal(const BaseParticle& p,
73  Mdouble& distance, Vec3D& normal_return) const override;
74 
76  unsigned timeStamp,
77  InteractionHandler* interactionHandler) override;
78 
79  void read(std::istream& is) override;
80 
81  void write(std::ostream& os) const override;
82 
83  std::string getName() const override;
84 
85 private:
91 
92 };
93 
94 #endif
Vec3D centreline_
Definition: ArcWall.h:89
ArcWall * copy() const override
Pure virtual function that can be overwritten in inherited classes in order to copy a BaseWall...
Definition: ArcWall.cc:63
double Mdouble
Definition: GeneralDefine.h:34
A wall that is the inside of an arc of a cylinder.
Definition: ArcWall.h:47
void set(Vec3D axis, Vec3D pos, Mdouble radius, Vec3D centreline, Mdouble semiangle)
Set.
Definition: ArcWall.cc:49
Mdouble semiangle_
Definition: ArcWall.h:90
Stores information about interactions between two interactable objects; often particles but could be ...
~ArcWall() override=default
Default destructor.
void write(std::ostream &os) const override
Write a BaseInteractable to an output stream.
Definition: ArcWall.cc:126
Container to store Interaction objects.
bool getDistanceAndNormal(const BaseParticle &p, Mdouble &distance, Vec3D &normal_return) const override
Pure virtual function that computes the distance of a BaseParticle to this wall and returns the norma...
Definition: ArcWall.cc:68
Basic class for walls.
Definition: BaseWall.h:47
Container to store all BaseWall.
Definition: WallHandler.h:42
void read(std::istream &is) override
Reads a BaseInteractable from an input stream.
Definition: ArcWall.cc:115
BaseInteraction * getInteractionWith(BaseParticle *p, unsigned timeStamp, InteractionHandler *interactionHandler) override
Returns the interaction between this object and a given BaseParticle.
Definition: ArcWall.cc:96
Definition: Vector.h:49
Vec3D axis_
Definition: ArcWall.h:86
Mdouble radius_
Definition: ArcWall.h:88
ArcWall()
Default constructor.
Definition: ArcWall.cc:31
std::string getName() const override
A purely virtual function.
Definition: ArcWall.cc:136
Vec3D pos_
Definition: ArcWall.h:87