|
ESyS-Particle
2.3.4
|
Class representing the corner in a 2D "mesh". More...
#include <Corner2D.h>

Public Member Functions | |
| Corner2D (const Vec3 &, int) | |
| void | addEdge (Edge2D *) |
| double | sep (const Vec3 &) const |
| bool | isValidContact (const Vec3 &) const |
| Vec3 | getDirectionFromPoint (const Vec3 &) const |
| void | move (const Vec3 &) |
| Vec3 | getPos () const |
| int | getID () const |
| int | getNEdges () const |
| Vec3 | getEdgeNormal (int) const |
| void | applyForceToEdge (int, const Vec3 &) |
Private Attributes | |
| Vec3 | m_p |
| vector< Edge2D * > | m_edges |
| int | m_id |
Class representing the corner in a 2D "mesh".
| Corner2D::Corner2D | ( | const Vec3 & | pos, |
| int | id | ||
| ) |
| void Corner2D::addEdge | ( | Edge2D * | edge | ) |
| void Corner2D::applyForceToEdge | ( | int | idx, |
| const Vec3 & | f | ||
| ) |
apply force to one of the attached edges
| idx | which egde (1,2) |
| F | the force |
References console, Console::Error(), and m_edges.
Referenced by BCorner2DInteraction::calcForces().


get the unit direction vector between a point and the corner
| p | the point |
References m_p, and Vec3::unit().
Referenced by ECorner2DInteraction::calcForces().


| Vec3 Corner2D::getEdgeNormal | ( | int | idx | ) | const |
get normal of an edge
| idx | which egde (1,2) to get |
References console, Console::Error(), and m_edges.
Referenced by BCorner2DInteraction::BCorner2DInteraction(), and BCorner2DInteraction::calcForces().


|
inline |
References m_id.
Referenced by BCorner2DInteraction::BCorner2DInteraction().

|
inline |
References m_edges.
Referenced by BCorner2DInteraction::BCorner2DInteraction(), and BCorner2DInteraction::calcForces().

|
inline |
References m_p.
Referenced by BCorner2DInteraction::BCorner2DInteraction(), and BCorner2DInteraction::calcForces().

| bool Corner2D::isValidContact | ( | const Vec3 & | p | ) | const |
check if the contact between a particle at a point and the corner is valid or if there is a contact between the particle and any of the adjacent edges or triangles
| p | the center of the particle |
References m_edges.
Referenced by ECorner2DInteraction::calcForces().

| void Corner2D::move | ( | const Vec3 & | d | ) |
move the corner, make sure Z=0;
| d | the displacement |
References m_p, and Vec3::Z().
Referenced by Mesh2D::moveNode().


| double Corner2D::sep | ( | const Vec3 & | p | ) | const |
get distance between corner and point
| p | the point |
References m_p.
Referenced by ECorner2DInteraction::calcForces().

|
private |
Referenced by addEdge(), applyForceToEdge(), getEdgeNormal(), getNEdges(), and isValidContact().
|
private |
Referenced by Corner2D(), and getID().
|
private |
Referenced by Corner2D(), getDirectionFromPoint(), getPos(), move(), and sep().