-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnodeinfo.h
executable file
·119 lines (100 loc) · 3.68 KB
/
nodeinfo.h
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#ifndef NODEINFO_H
#define NODEINFO_H
// ************************************************************************* //
// File: nodeinfo.h
// ************************************************************************* //
// ****************************************************************************
// Struct: stCellIndex
//
// Purpose: holds the list of the cells of which the node is part of
//
// Programmer: Rohini Pangrikar
// Creation: Wed May 28 2008
// ****************************************************************************//
struct stCellIndex
{
unsigned long index;
struct stCellIndex *next;
};
// ****************************************************************************
// Struct: ObjIndex
//
// Purpose: holds the list of the cells of which the node is part of
//
// Programmer: Sedat OZER
// Creation: July 20 2010
// ****************************************************************************//
struct ObjIndex
{
unsigned long objNumber;
struct ObjIndex *next;
};
// ****************************************************************************
// Struct: stPacket
//
// Purpose: holds the list of the cells of which the node is part of
//
// Programmer: Sedat OZER
// Creation: July 20 2010
// ****************************************************************************//
struct stPacket
{
ObjIndex *ObjList; // this is the list for the objects in the current packet
unsigned long P_ID; // this is the current packet's ID
unsigned long numObjs; // total number of objects
float PacketCx; // whole packet's centroid X
float PacketCy; // whole packet's centroid Y
float PacketCz; // whole packet's centroid Z
float PacketMass; // whole packet's centroid Z
long PacketVolume; // whole packet's Volume
float minX; // packet extends: min X,Y,Z and Max X,Y,Z values
float minY;
float minZ;
float maxX;
float maxY;
float maxZ;
struct stPacket *next;
};
// ****************************************************************************
// Struct: stNodePos
//
// Purpose: holds the information of a node of the input data
//
// Programmer: Rohini Pangrikar
// Creation: Wed May 28 2008
// ****************************************************************************//
struct stNodePos
{
float x;
float y;
float z;
long flag;
stCellIndex *list; //loop delete
unsigned long *adjPosList; // store only the points who have the different sign other then this point. It should better be array because binary search and quick sort will be used on it.
unsigned long numOfAdjPos;
};
// ****************************************************************************
// Struct: stNodeData
//
// Purpose: holds the data value at the node of input data
//
// Programmer: Rohini Pangrikar
// Creation: Wed May 28 2008
//
// ****************************************************************************//
struct stNodeData
{
float val0;
float val1;
float val2;
};
stNodePos* CreateNodeArray( unsigned long numItems);
stNodePos* GetCurNode( stNodePos nodeList[], unsigned long index );
int AddCellToNodeList( stNodePos nodeList[], unsigned long index, unsigned long cellId);
stCellIndex* GetIncidentCells( stNodePos nodeList[], unsigned long index );
stNodeData* CreateDataArray(unsigned long numItems);
stNodeData* GetCurNodeData(stNodeData dataList[],unsigned long index);
// ************************************************************************* //
// END: nodeinfo.h
// ************************************************************************* //
#endif