ESyS-Particle  4.0.1
Public Member Functions | Friends | List of all members
Edge Class Reference

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

#include <Edge.h>

Inheritance diagram for Edge:
Inheritance graph
[legend]
Collaboration diagram for Edge:
Collaboration graph
[legend]

Public Member Functions

 Edge (int, int, const Vec3 &, const Vec3 &)
 Edge (int, int, const Vec3 &, const Vec3 &, Triangle *)
 Edge (int, int, const Vec3 &, const Vec3 &, Triangle *, Triangle *)
bool isValidContact (const Vec3 &) const
Vec3 getBoundingBoxMin () const
Vec3 getBoundingBoxMax () const
Vec3 getDirectionFromPoint (const Vec3 &) const
void moveNode (int, const Vec3 &)
void move (const Vec3 &)
void applyForce (const Vec3 &f)
pair< int, int > getIDs () const
- Public Member Functions inherited from AEdge
 AEdge (const Vec3 &, const Vec3 &)
double sep (const Vec3 &) const
pair< bool, double > dist (const Vec3 &) const

Friends

ostream & operator<< (ostream &, const Edge &)

Additional Inherited Members

- Protected Attributes inherited from AEdge
Vec3 m_p0
Vec3 m_p1

Detailed Description

Class representing the edge of a polygon.

Author
Steffen Abe $Revision$ $Date$

Constructor & Destructor Documentation

Edge::Edge ( int  id1,
int  id2,
const Vec3 p1,
const Vec3 p2 
)

Construct edge from 2 points. Set triangle pointers to NULL

Parameters
id1the id of p1
id2the id of p2
p1
p2
Edge::Edge ( int  id1,
int  id2,
const Vec3 p1,
const Vec3 p2,
Triangle t1 
)

Construct edge from 2 points and 1 triangle pointer. Set other triangle pointer to NULL

Parameters
id1the id of p1
id2the id of p2
p1
p2
t1
Edge::Edge ( int  id1,
int  id2,
const Vec3 p1,
const Vec3 p2,
Triangle t1,
Triangle t2 
)

Construct edge from 2 points and 2 triangle pointers.

Parameters
id1the id of p1
id2the id of p2
p1
p2
t1
t2

Member Function Documentation

Vec3 Edge::getBoundingBoxMax ( ) const

Get min. corner of axis-aligned bounding box.

Reimplemented from AEdge.

Vec3 Edge::getBoundingBoxMin ( ) const

Get min. corner of axis-aligned bounding box.

Reimplemented from AEdge.

Vec3 Edge::getDirectionFromPoint ( const Vec3 p) const

get unit direction vector between a point and the closest point along the supporting line of the edge (pointing away from the edge).

Parameters
pthe point
Warning
does not check if the closest point is actually within the edge or that the point is not on the line (potential div by 0)

Referenced by EEdgeInteraction::calcForces().

Here is the caller graph for this function:

bool Edge::isValidContact ( const Vec3 P) const

Check if any of the adjacent triangles (if there are any) has contact, i.e the perpendicular line from the supporting plane to the point hits the triangle, an thus makes the edge contact invalid

Parameters
Pthe point

References Triangle::dist().

Referenced by EEdgeInteraction::calcForces().

Here is the call graph for this function:

Here is the caller graph for this function:

void Edge::move ( const Vec3 d)

Translate whole edge

Parameters
dthe amount of movement
void Edge::moveNode ( int  id,
const Vec3 d 
)

Move one of the corners. The identifier for the corner is the global node id. If the edge doesn't contain the node with the id , do nothing.

Parameters
idthe global id of the node to be moved
dthe amount of movement

Friends And Related Function Documentation

ostream& operator<< ( ostream &  ost,
const Edge E 
)
friend

output Edge to ostream


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