31 #ifndef SphericalWall_H
32 #define SphericalWall_H
102 void read(std::istream& is)
override;
107 void write(std::ostream& os)
const override;
112 std::string
getName()
const override;
SphericalWall * copy() const override
Wall copy method. It calls the copy constructor of this Wall, useful for polymorphism.
void write(std::ostream &os) const override
Writes the SphericalWall to an output stream, usually a restart file.
This is a class defining walls.
SphericalWall()
Default constructor, the normal is infinitely long.
void setRadius(Mdouble radius)
Defines a spherical wall with radius r.
std::string getName() const override
Returns the name of the object, in this case the string "SphericalWall".
Mdouble getRadius() const
Returns the distance of the wall to the particle.
bool getDistanceAndNormal(const BaseParticle &p, Mdouble &distance, Vec3D &normal_return) const override
Compute the distance from the wall for a given BaseParticle and return if there is a collision...
Implementation of a 3D vector (by Vitaliy).
virtual ~SphericalWall()
Default destructor.
virtual void move(const Vec3D &move)
Moves this BaseInteractable by adding an amount to the position.
Mdouble getDistance(const Vec3D &otherPosition) const
Returns the distance of the wall to the particle.
void read(std::istream &is) override
Reads SphericalWall from a restart file.