# Mpoint class

back to menu
This class describes mesh points

class Mpoint {
private:
Pt _coord; current coordinates
const int _no; number of the point
public:
~Mpoint(void); destructor
Mpoint(double x, double y, double z, int counter); constructor. x, y, z are the cordinates, counter is the number of the point
Mpoint(const Pt p, int counter); constructor. Counter is the number of the point
Mpoint (Mpoint & m); Declared but undefined : prevents from using it
Mpoint operator=(Mpoint & m); Declared but undefined : prevents from using it
Pt _update_coord; new coordinates
list<Triangle*> _triangles; list of adjacent triangles
const Pt get_coord() const {return _coord;}; accessor for coordinates
const int get_no() const {return _no;}; accessor for numero
list<Mpoint *> _neighbours; list of neighbour points
list<double> data; structure to store extra data
void translation(const double x,const double y,const double z); translates the coordinates of the point
void rescale(const double t, const double x, const double y, const double z); apply an homothety with scale t, and center (x, y, z)
void update(); set new coordinates as current coordinates
const Vec local_normal() const; computes local normal to this point in the mesh
const Pt medium_neighbours() const; compute the medium of the neighbours of the point
const Vec difference_vector() const; this point minus the medium of the neighbours
const Vec orthogonal() const; normal component of orthogonal vector
const Vec tangential() const; tangential component of orthogonal vector
const double medium_distance_of_neighbours() const; gives the medium of the distances between this point and its neighbours
};
const bool operator ==(const Mpoint &p2, const Mpoint &p1); comparaison operator (test on coordinates)
const Vec operator -(const Mpoint&p1, const Mpoint &p2); return the vector from p2 to p1
const bool operator <(const Mpoint &p1, const Mpoint &p2); test if two points are adjacent
const Vec operator -(const Pt&p1, const Mpoint &p2); return the vector from p2 to p1
const Vec operator -(const Mpoint&p1, const Pt &p2); return the vector from p2 to p1

back to menu