|
#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, Mdouble interactionRadius) 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.
computes the signed distance to the face in normal direction
References Vec3D::dot(), normal, and vertex.
bool TriangulatedWall::Face::getDistanceAndNormal | ( | const BaseParticle & | p, |
Mdouble & | distance, | ||
Vec3D & | normal_return, | ||
Mdouble | interactionRadius | ||
) | 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
References Vec3D::dot(), Vec3D::getLength(), Vec3D::getLengthSquared(), BaseInteractable::getPosition(), and constants::i.
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).
std::array<Face*, 3> TriangulatedWall::Face::neighbor = {{nullptr}} |
For each edge, stores the neighboring face (nullptr if none)
Vec3D TriangulatedWall::Face::normal |
face normal (vertices are ordered anticlockwise direction around the normal)
Referenced by getDistance().
std::array<Vec3D*, 3> TriangulatedWall::Face::vertex |
defines the three vertices (anticlockwise direction around the normal)
Referenced by getDistance(), TriangulatedWall::readVTK(), and TriangulatedWall::set().