ESyS-Particle  2.3.4
Corner Class Reference

Class representing the corner of a polygon. More...

#include <Corner.h>

Collaboration diagram for Corner:

Public Member Functions

 Corner (const Vec3 &, int, int)
 
void addEdge (Edge *)
 
void addTriangle (Triangle *)
 
double sep (const Vec3 &) const
 
bool isValidContact (const Vec3 &) const
 
Vec3 getDirectionFromPoint (const Vec3 &) const
 
void move (const Vec3 &)
 
Vec3 getPos () const
 
void setPos (const Vec3 &p)
 
void applyForce (const Vec3 &f)
 
int getID () const
 
int getTag () const
 
double getDistMoved ()
 
void resetOldPos ()
 

Private Attributes

Vec3 m_p
 
Vec3 m_old_pos
 
vector< Edge * > m_edges
 
vector< Triangle * > m_triangles
 
int m_id
 
int m_tag
 

Detailed Description

Class representing the corner of a polygon.

Author
Steffen Abe $Revision$ $Date$

Constructor & Destructor Documentation

◆ Corner()

Corner::Corner ( const Vec3 pos,
int  id,
int  tag 
)

constructor

Parameters
posthe position of the corner
idthe node id
tagthe node tag

References m_id, m_old_pos, m_p, and m_tag.

Member Function Documentation

◆ addEdge()

void Corner::addEdge ( Edge edge)

add Edge to corner

Parameters
edgea pointer to the edge

References m_edges.

◆ addTriangle()

void Corner::addTriangle ( Triangle triangle)

add Triangle to Corner

Parameters
trianglea pointer to the triangle

References m_triangles.

◆ applyForce()

void Corner::applyForce ( const Vec3 f)

References m_triangles.

Referenced by ECornerInteraction::calcForces().

Here is the caller graph for this function:

◆ getDirectionFromPoint()

Vec3 Corner::getDirectionFromPoint ( const Vec3 p) const

get the unit direction vector between a point and the corner

Parameters
pthe point

References m_p, and Vec3::unit().

Referenced by ECornerInteraction::calcForces().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDistMoved()

double Corner::getDistMoved ( )
inline

References m_old_pos, and m_p.

◆ getID()

int Corner::getID ( ) const
inline

References m_id.

◆ getPos()

Vec3 Corner::getPos ( ) const
inline

References m_p.

◆ getTag()

int Corner::getTag ( ) const
inline

References m_tag.

◆ isValidContact()

bool Corner::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

Parameters
pthe center of the particle

References m_edges, and m_triangles.

Referenced by ECornerInteraction::calcForces().

Here is the caller graph for this function:

◆ move()

void Corner::move ( const Vec3 d)

move the corner

Parameters
dthe displacement

References m_p.

◆ resetOldPos()

void Corner::resetOldPos ( )
inline

References m_old_pos, and m_p.

◆ sep()

double Corner::sep ( const Vec3 p) const

get distance between corner and point

Parameters
pthe point

References m_p.

Referenced by ECornerInteraction::calcForces().

Here is the caller graph for this function:

◆ setPos()

void Corner::setPos ( const Vec3 p)
inline

References m_p.

Member Data Documentation

◆ m_edges

vector<Edge*> Corner::m_edges
private

Referenced by addEdge(), and isValidContact().

◆ m_id

int Corner::m_id
private

Referenced by Corner(), and getID().

◆ m_old_pos

Vec3 Corner::m_old_pos
private

Referenced by Corner(), getDistMoved(), and resetOldPos().

◆ m_p

◆ m_tag

int Corner::m_tag
private

Referenced by Corner(), and getTag().

◆ m_triangles

vector<Triangle*> Corner::m_triangles
private

The documentation for this class was generated from the following files: