-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathNode.h
More file actions
executable file
·62 lines (48 loc) · 1.15 KB
/
Node.h
File metadata and controls
executable file
·62 lines (48 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//
// Node.h
//
//
// Created by Ling Zou on 5/27/13.
//
//
#ifndef _Node_h
#define _Node_h
#include "Point.h"
#include "FluentTwoDMesh.h"
class Face;
class FluentTwoDMesh;
class Node
{
public:
// FIXME: consturct without id given?
Node(Point p) :
_point(p),
_id(-1) // an invalid id to initialize
{
_connected_faces.clear();
}
Node(double x, double y, double z)
{
_point.x() = x;
_point.y() = y;
_point.z() = z;
}
const long int id() const { return _id; }
long int& id() { return _id; }
inline const Point & point() const { return _point; }
const double x() const { return _point.x(); }
const double y() const { return _point.y(); }
const double z() const { return _point.z(); }
void addConnectedFace(Face * face) { _connected_faces.push_back(face); }
std::vector<Face*> & getConnectedFace() { return _connected_faces; }
void setParentMesh(FluentTwoDMesh * ptr) { _ptr_mesh = ptr; }
bool isMarked() { return _is_marked; }
void mark_node_and_its_neighbor_nodes();
protected:
Point _point;
long int _id;
std::vector<Face*> _connected_faces;
bool _is_marked;
FluentTwoDMesh * _ptr_mesh;
};
#endif