26 #ifndef INTERSECTIONOFWALLS_H
27 #define INTERSECTIONOFWALLS_H
98 void clear()
override;
155 void read(std::istream& is)
override;
160 void write(std::ostream& os)
const override;
165 std::string
getName()
const override;
184 std::vector<Vec3D>
A_;
198 std::vector<Vec3D>
C_;
A IntersectionOfWalls is convex polygon defined as an intersection of InfiniteWall's.
void writeVTK(VTKContainer &vtk) const override
void read(std::istream &is) override
Reads an IntersectionOfWalls from an input stream, for example a restart file.
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...
std::string getName() const override
Returns the name of the object, here the string "IntersectionOfWalls".
void addObject(Vec3D normal, Vec3D point)
Adds a wall to the set of infinite walls, given an outward normal vector s.t. normal*x=normal*point.
#define MERCURY_DEPRECATED
std::vector< InfiniteWall > wallObjects_
The wall "segments"/directions that together make up the finite wall.
void createOpenPrism(std::vector< Vec3D > points, Vec3D prismAxis)
Creates an open prism which is a polygon between the points, except the first and last point...
void setSpecies(const ParticleSpecies *species)
sets species of subwalls as well
IntersectionOfWalls()
Default constructor.
MERCURY_DEPRECATED void clear() override
Removes all parts of the walls.
std::vector< Vec3D > C_
A vector that stores the intersection point of three different InfiniteWall.
std::vector< Vec3D > A_
A vector that stores a point for each intersecting line between two different InfiniteWall.
void move(const Vec3D &move) override
Move the IntersectionOfWalls to a new position, which is a Vec3D from the old position.
IntersectionOfWalls * copy() const override
Wall copy method. It calls the copy constructor of this Wall, useful for polymorphism.
Container to store all BaseWall.
std::vector< Vec3D > AB_
A vector that stores the direction of the intersecting lines between two different InfiniteWall...
void createPrism(std::vector< Vec3D > points, Vec3D prismAxis)
Creates an open prism which is a polygon between the points and extends infinitely in the PrismAxis d...
virtual ~IntersectionOfWalls()
Destructor.
Implementation of a 3D vector (by Vitaliy).
IntersectionOfWalls & operator=(const IntersectionOfWalls &other)
void setHandler(WallHandler *wallHandler) override
A function which sets the WallHandler for this BaseWall.
void write(std::ostream &os) const override
Writes an IntersectionOfWalls to an output stream, for example a restart file.