MercuryDPM
Alpha
|
Struct used to store the properties of a face needed for contact detection. More...
#include <TriangulatedWall.h>
Public Member Functions | |
Mdouble | getDistance (const Vec3D &otherPosition) const |
computes the signed distance to the face in normal direction More... | |
bool | getDistanceAndNormal (const BaseParticle &p, Mdouble &distance, Vec3D &normal_return) const |
Returns true if contact with the face exists, false if not. If contact exists, then the distance and normal is returned as well. More... | |
Public Attributes | |
std::array< Vec3D *, 3 > | vertex |
defines the three vertices (anticlockwise direction around the normal) More... | |
std::array< Face *, 3 > | neighbor = {{nullptr}} |
For each edge, stores the neighboring face (nullptr if none) More... | |
std::array< Vec3D, 3 > | edgeNormal |
For each edge, stores the vector normal to the face normal and the edge direction (vector between the vertices). More... | |
Vec3D | normal |
face normal (vertices are ordered anticlockwise direction around the normal) More... | |
Struct used to store the properties of a face needed for contact detection.
Definition at line 59 of file TriangulatedWall.h.
computes the signed distance to the face in normal direction
Definition at line 318 of file TriangulatedWall.cc.
References Vec3D::dot(), normal, and vertex.
bool TriangulatedWall::Face::getDistanceAndNormal | ( | const BaseParticle & | p, |
Mdouble & | distance, | ||
Vec3D & | normal_return | ||
) | const |
Returns true if contact with the face exists, false if not. If contact exists, then the distance and normal is returned as well.
check if there is contact with the face, determine if contact is with face, edge, vertex, return distance and normal; only return edge, vertex contact if neighbor face pointer is higher to avoid doubles
Definition at line 327 of file TriangulatedWall.cc.
References Vec3D::dot(), Vec3D::getLength(), Vec3D::getLengthSquared(), BaseInteractable::getPosition(), and BaseParticle::getWallInteractionRadius().
std::array<Vec3D,3> TriangulatedWall::Face::edgeNormal |
For each edge, stores the vector normal to the face normal and the edge direction (vector between the vertices).
Definition at line 66 of file TriangulatedWall.h.
std::array<Face*,3> TriangulatedWall::Face::neighbor = {{nullptr}} |
For each edge, stores the neighboring face (nullptr if none)
Definition at line 64 of file TriangulatedWall.h.
Vec3D TriangulatedWall::Face::normal |
face normal (vertices are ordered anticlockwise direction around the normal)
Definition at line 68 of file TriangulatedWall.h.
Referenced by getDistance().
std::array<Vec3D*,3> TriangulatedWall::Face::vertex |
defines the three vertices (anticlockwise direction around the normal)
Definition at line 62 of file TriangulatedWall.h.
Referenced by getDistance(), and TriangulatedWall::readVTK().