26 #ifndef TriangleWall_H
27 #define TriangleWall_H
85 {
return "TriangleWall"; }
90 void read(std::istream& is)
override;
95 void write(std::ostream& os)
const override;
132 void rotate(
const Vec3D& angularVelocity)
override;
double Mdouble
Definition: GeneralDefine.h:34
@ A
Definition: StatisticsVector.h:42
Definition: BaseParticle.h:54
Basic class for walls.
Definition: BaseWall.h:49
This class contains the 4 components of a quaternion and the standard operators and functions needed ...
Definition: Quaternion.h:63
A TriangleWall is convex polygon defined as an intersection of InfiniteWall's.
Definition: TriangleWall.h:57
Vec3D faceNormal_
Definition: TriangleWall.h:185
bool isFaceContact(const Vec3D &normal) const override
Definition: TriangleWall.h:151
Vec3D vertexMax_
Definition: TriangleWall.h:173
std::array< Vec3D, 3 > getVertices() const
Definition: TriangleWall.h:105
void updateVertexAndNormal()
Definition: TriangleWall.cc:218
TriangleWall(const TriangleWall &other)=default
Copy constructor.
void setVertices(Vec3D A, Vec3D B, Vec3D C)
Sets member variables such that the wall represents a triangle with vertices A, B,...
Definition: TriangleWall.cc:165
void writeVTK(VTKContainer &vtk) const override
Definition: TriangleWall.cc:149
void moveVertex(unsigned index, const Vec3D &dP)
Updates the indexed vertex by a given change in position.
Definition: TriangleWall.cc:265
std::array< Vec3D, 3 > vertexInLabFrame_
Definition: TriangleWall.h:162
std::array< Vec3D, 3 > edgeNormal_
Definition: TriangleWall.h:178
void write(std::ostream &os) const override
Writes an TriangleWall to an output stream, for example a restart file.
Definition: TriangleWall.cc:139
bool isLocal(Vec3D &min, Vec3D &max) const override
Definition: TriangleWall.cc:243
std::array< Vec3D, 3 > vertex_
Definition: TriangleWall.h:167
const Vec3D & getVertex(unsigned i) const
Returns the position of a vertex.
Definition: TriangleWall.h:124
Vec3D vertexMin_
Definition: TriangleWall.h:172
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....
Definition: TriangleWall.cc:57
void setOrientation(const Quaternion &orientation) override
Sets the orientation of this BaseInteractable.
Definition: TriangleWall.cc:196
TriangleWall()=default
Default constructor.
std::array< double, 3 > edgeLength_
Definition: TriangleWall.h:180
~TriangleWall() override=default
Destructor.
std::string getName() const override
Returns the name of the object, here the string "TriangleWall".
Definition: TriangleWall.h:84
std::array< Vec3D, 3 > edge_
Definition: TriangleWall.h:179
TriangleWall * copy() const override
Wall copy method. It calls the copy constructor of this Wall, useful for polymorphism.
Definition: TriangleWall.h:78
void moveVertices(const std::array< Vec3D, 3 > &dPs)
Updates all vertices by the given changes in position.
Definition: TriangleWall.cc:271
void setPosition(const Vec3D &position) override
Sets the position of this BaseInteractable.
Definition: TriangleWall.cc:190
void read(std::istream &is) override
Reads an TriangleWall from an input stream, for example a restart file.
Definition: TriangleWall.cc:123
bool isInsideTriangle(const Vec3D &point) const
Definition: TriangleWall.cc:250
void rotate(const Vec3D &angularVelocity) override
Rotates this BaseInteractable.
Definition: TriangleWall.cc:111
void move(const Vec3D &move) override
Definition: TriangleWall.cc:184
const std::complex< Mdouble > i
Definition: ExtendedMath.h:51
Definition: BaseWall.h:38