|
ESyS-Particle
2.3.4
|
Class representing a Triangle. More...
#include <Triangle.h>

Public Types | |
| typedef Vec3(Triangle::* | VectorFieldFunction) () const |
| typedef double(Triangle::* | ScalarFieldFunction) () const |
Public Member Functions | |
| Triangle (int, int, int, const Vec3 &, const Vec3 &, const Vec3 &, int, int) | |
| double | sep (const Vec3 &) const |
| pair< bool, double > | dist (const Vec3 &) const |
| Vec3 | getBoundingBoxMin () const |
| Vec3 | getBoundingBoxMax () const |
| Vec3 | getNormal () const |
| Vec3 | toGlobal (const Vec3 &) |
| Vec3 | toLocal (const Vec3 &) |
| bool | containsEdge (const Vec3 &, const Vec3 &) const |
| void | moveNode (int, const Vec3 &) |
| void | move (const Vec3 &) |
| int | getID () const |
| int | getTag () const |
| void | applyForce (const Vec3 &f) |
| void | zeroForce () |
| pair< int, Vec3 > | getP0 () const |
| pair< int, Vec3 > | getP1 () const |
| pair< int, Vec3 > | getP2 () const |
| Vec3 | getForce () const |
| double | getPressure () const |
Static Public Member Functions | |
| static VectorFieldFunction | getVectorFieldFunction (const string &) |
| static ScalarFieldFunction | getScalarFieldFunction (const string &) |
Private Member Functions | |
| double | EdgeSep (const Vec3 &, const Vec3 &, const Vec3 &) const |
Private Attributes | |
| Matrix3 | m_invtrans |
| Matrix3 | m_trans |
| Vec3 | m_p0 |
| Vec3 | m_p1 |
| Vec3 | m_p2 |
| Vec3 | m_normal |
| Vec3 | m_force |
| int | m_id0 |
| int | m_id1 |
| int | m_id2 |
| int | m_tri_id |
| int | m_tag |
Friends | |
| ostream & | operator<< (ostream &, const Triangle &) |
| output for debugging purposes More... | |
Class representing a Triangle.
| typedef double(Triangle::* Triangle::ScalarFieldFunction) () const |
| typedef Vec3(Triangle::* Triangle::VectorFieldFunction) () const |
| Triangle::Triangle | ( | int | id0, |
| int | id1, | ||
| int | id2, | ||
| const Vec3 & | v0, | ||
| const Vec3 & | v1, | ||
| const Vec3 & | v2, | ||
| int | tri_id, | ||
| int | tag | ||
| ) |
Construct triangle from the corner coordinates. It is assumed that the corners are given anticlockwise and the normal is calculated accordingly.
| id0 | id of the first corner |
| id1 | id of the 2nd corner |
| id2 | id of the 3rd corner |
| v0 | first corner |
| v1 | second corner |
| v2 | third corner |
| tri_id | triangle id |
| tag | triangle tag |
References cross(), Matrix3::inv(), m_force, m_id0, m_id1, m_id2, m_invtrans, m_normal, m_p0, m_p1, m_p2, m_tag, m_trans, m_tri_id, and Vec3::unit_s().

|
inline |
References m_force.
Referenced by Edge::applyForce(), BTriangleInteraction::calcForces(), and ETriangleInteraction::calcForces().

| pair< bool, double > Triangle::dist | ( | const Vec3 & | p | ) | const |
Get the signed distance between a point and the triangle. If the closest point on the supporting plane is outside the triangle, the first component of the return value is "false", otherwise "true"
| p | the point |
References m_invtrans, m_normal, m_p0, Vec3::X(), and Vec3::Y().
Referenced by ETriangleInteraction::calcForces(), and Edge::isValidContact().


calculate distance between an edge and a point
| p0 | point 1 of the edge |
| p1 | point 2 of the edge |
| p | the point |
References Vec3::norm(), sep(), and Vec3::unit().
Referenced by sep().


| Vec3 Triangle::getBoundingBoxMax | ( | ) | const |
Get max. corner of axis-aligned bounding box of the triangle.
References cmax(), m_p0, m_p1, and m_p2.
Referenced by NeighborTable< T >::getParticlesNearTriangle().


| Vec3 Triangle::getBoundingBoxMin | ( | ) | const |
Get min. corner of axis-aligned bounding box of the triangle.
References cmin(), m_p0, m_p1, and m_p2.
Referenced by NeighborTable< T >::getParticlesNearTriangle().


|
inline |
References m_force.
Referenced by TSubLattice< T >::getTriMeshForce(), and getVectorFieldFunction().

|
inline |
References m_tri_id.
Referenced by BTriangleInteraction::BTriangleInteraction().

|
inline |
References m_normal.
Referenced by ETriangleInteraction::calcForces().

| double Triangle::getPressure | ( | ) | const |
Get pressure on the triangle from interaction forces
References m_force, m_normal, m_p1, and m_p2.
Referenced by getScalarFieldFunction().

|
static |
Get the triangle member function which returns a scalar field of a given name. Returns NULL if a field with that name doesn't exist.
| name | the name of the field |
References getPressure(), and NULL.
Referenced by TSubLattice< T >::addScalarTriangleField().


|
inline |
References m_tag.
|
static |
Get the triangle member function which returns a vector field of a given name. Returns NULL if a field with that name doesn't exist.
| name | the name of the field |
References getForce(), and NULL.
Referenced by TSubLattice< T >::addVectorTriangleField().


| void Triangle::move | ( | const Vec3 & | d | ) |
| void Triangle::moveNode | ( | int | id, |
| const Vec3 & | d | ||
| ) |
Move one of the corners. The identifier for the corner is the global node id. If the node with the id is not in the triangle, do nothing.
| id | the global id of the node to be moved |
| d | the amount of movement |
References cross(), Matrix3::inv(), m_id0, m_id1, m_id2, m_invtrans, m_normal, m_p0, m_p1, m_p2, m_trans, and Vec3::unit_s().

| double Triangle::sep | ( | const Vec3 & | p | ) | const |
Get distance between point and the triangle.
| p | the point |
References EdgeSep(), m_invtrans, m_normal, m_p0, m_p1, m_p2, Vec3::X(), and Vec3::Y().
Referenced by EdgeSep(), and NeighborTable< T >::getParticlesNearTriangle().


Transform a point in local coordinates into global coordiantes. The local coordinate systems is formed by (P1-P0,P2-P0,N).
| p | the point to be transformed |
Referenced by BTriangleInteraction::calcForces(), and BTriangleInteraction::getAP().

Transform a point in global coordinates into local coordiantes. The local coordinate systems is formed by (P1-P0,P2-P0,N).
| p | the point to be transformed |
References m_invtrans, and m_p0.
Referenced by BTriangleInteraction::BTriangleInteraction().

|
inline |
References m_force.
|
friend |
output for debugging purposes
output Triangle to ostream
|
private |
Referenced by applyForce(), getForce(), getPressure(), Triangle(), and zeroForce().
|
private |
Referenced by getP0(), moveNode(), and Triangle().
|
private |
Referenced by getP1(), moveNode(), and Triangle().
|
private |
Referenced by getP2(), moveNode(), and Triangle().
|
private |
Referenced by dist(), moveNode(), sep(), toLocal(), and Triangle().
|
private |
Referenced by dist(), getNormal(), getPressure(), moveNode(), operator<<(), sep(), and Triangle().
|
private |
Referenced by containsEdge(), dist(), getBoundingBoxMax(), getBoundingBoxMin(), getP0(), getP1(), getP2(), move(), moveNode(), operator<<(), sep(), toGlobal(), toLocal(), and Triangle().
|
private |
Referenced by containsEdge(), getBoundingBoxMax(), getBoundingBoxMin(), getP1(), getPressure(), moveNode(), operator<<(), sep(), and Triangle().
|
private |
Referenced by containsEdge(), getBoundingBoxMax(), getBoundingBoxMin(), getP2(), getPressure(), moveNode(), operator<<(), sep(), and Triangle().
|
private |
Referenced by getTag(), and Triangle().
|
private |
Referenced by moveNode(), toGlobal(), and Triangle().
|
private |
Referenced by getID(), and Triangle().