|
ESyS-Particle
4.0.1
|
class for a triangle mesh More...
#include <TriMesh.h>
Public Types | |
|
typedef vector< Triangle > ::iterator | triangle_iterator |
| typedef vector< Edge >::iterator | edge_iterator |
| typedef vector< Corner >::iterator | corner_iterator |
Public Member Functions | |
| TriMesh () | |
| void | LoadMesh (const vector< MeshNodeData > &, const vector< MeshTriData > &) |
| void | moveNode (int, const Vec3 &) |
| void | translateBy (const Vec3 &translation) |
| triangle_iterator | triangles_begin () |
| triangle_iterator | triangles_end () |
| edge_iterator | edges_begin () |
| edge_iterator | edges_end () |
| corner_iterator | corners_begin () |
| corner_iterator | corners_end () |
| Triangle * | getTriangleById (int) |
| bool | hasMovedBy (double) |
| void | resetCurrentDisplacement () |
| void | zeroForces () |
| virtual void | writeCheckPoint (ostream &, const string &) const |
| virtual void | loadCheckPoint (istream &) |
| template<typename P > | |
| void | forAllTrianglesGet (P &, typename P::value_type(Triangle::*rdf)() const) |
| template<typename P > | |
| vector< pair< int, P > > | forAllTrianglesGetIndexed (P(Triangle::*rdf)() const) |
class for a triangle mesh
| TriMesh::TriMesh | ( | ) |
Constructor
| void TriMesh::forAllTrianglesGet | ( | P & | cont, |
| typename P::value_type(Triangle::*)() const | rdf | ||
| ) |
Call a constant member function of Triangle taking no argument and returning a value for all Triangles and collect the return values in a container. The container has to be an STL sequence container (vector,list...) or something with the same interface. The template parameter P is a type of container of the return type of the particle member function, not the return type itself.
| cont | the container |
| rdf | the particle member function |
| vector< pair< int, P > > TriMesh::forAllTrianglesGetIndexed | ( | P(Triangle::*)() const | rdf | ) |
| rdf | the particle member function |
Referenced by VectorTriangleFieldSlave::SendDataFull(), and ScalarTriangleFieldSlave::SendDataFull().

| Triangle * TriMesh::getTriangleById | ( | int | id | ) |
Get a pointer to a triangle with a given ID. If the ID doesn't exist, return NULL
| id | the id |
| bool TriMesh::hasMovedBy | ( | double | dist | ) |
check if any point in the mesh has moved by at least the given distance
| dist | the distance |
| void TriMesh::LoadMesh | ( | const vector< MeshNodeData > & | node_vec, |
| const vector< MeshTriData > & | tri_vec | ||
| ) |
setup the triangle mesh from node,edge and triangle data
| node_vec | the node data |
| tri_vec | the triangle data |
References BasicCon::Error(), and BasicCon::XDebug().
Referenced by TSubLattice< T >::addTriMesh().


| void TriMesh::moveNode | ( | int | id, |
| const Vec3 & | d | ||
| ) |
Move a node in the mesh. If the node with the given Id isn't in the mesh, nothing happens
| id | the id of the node |
| d | the displacement |
| void TriMesh::resetCurrentDisplacement | ( | ) |
reset displacement since last neighbor search
| void TriMesh::writeCheckPoint | ( | ostream & | ost, |
| const string & | delim | ||
| ) | const [virtual] |
Write checkpoint data to stream. The mesh data is written in the original mesh file format -> can reuse meshreader to read in checkpointed meshes
| ost | the output stream |
| delim | the delimiter |
| void TriMesh::zeroForces | ( | ) |
zero all forces on the mesh. Currently forces are only on triangles
References BasicCon::XDebug().

1.7.6.1