ParMooN
 All Classes Functions Variables Friends Pages
ShapeDesc.h
1 // =======================================================================
2 // @(#)ShapeDesc.h 1.5 11/15/99
3 //
4 // Class: TShapeDesc
5 // Purpose: super class of all shape descriptors
6 //
7 // Author: Volker Behns 09.07.97
8 //
9 // =======================================================================
10 
11 #ifndef __SHAPEDESC__
12 #define __SHAPEDESC__
13 
14 #include <Constants.h>
15 #include <Vertex.h>
16 
17 #define N_SHAPES 8
18 enum Shapes {S_Line, Triangle, Quadrangle, Parallelogram, Rectangle,
19  Tetrahedron, Hexahedron, Brick};
20 
21 #ifndef __3D__
22  #define MAXN_JOINTS 4
23 #else
24  #define MAXN_JOINTS 6
25  #define MAXN_EDGES 12
26 #endif
27 
30 {
31  protected:
33  Shapes Type;
34 
38  int N_Edges;
40  int MaxN_EpV;
41 
42  #ifdef __3D__
43 
44  int N_Faces;
46  int MaxN_VpF;
48  int MaxN_FpV;
50  int MaxN_EpF;
52  int MaxN_FpE;
53  #endif
54 
56  int N_Joints;
57 
59  const int *EdgeVertex;
61  const int *VertexEdge;
62 
63  #ifdef __3D__
64 
65  const int *FaceVertex;
67  const int *FaceVertexLen;
69  const int *FaceEdge;
71  const int *FaceEdgeLen;
73  const Shapes *FaceType;
75  const int *VertexFace;
77  const int *EdgeFace;
78  #endif
79 
80  public:
81  // Constructor
82 
83  // Methods
86  { return N_Vertices; }
88  int GetN_Edges()
89  { return N_Edges; }
92  { return N_Joints; }
93 
94  #ifdef __3D__
95 
96  int GetN_Faces()
97  { return N_Faces; }
98  #endif
99 
101  Shapes GetType()
102  { return Type; }
103 
105  int GetEdgeVertex(const int *&TmpEV)
106  {
107  TmpEV = EdgeVertex;
108  return 0;
109  }
110 
113  { return MaxN_EpV; }
114 
116  int GetVertexEdge(const int *&TmpVE)
117  {
118  TmpVE = VertexEdge;
119  return 0;
120  }
121 
122  #ifdef __3D__
123 
124  int GetFaceVertex(const int *&TmpFV, const int *&TmpLen, int &MaxLen)
125  {
126  TmpFV = FaceVertex;
127  TmpLen = FaceVertexLen;
128  MaxLen = MaxN_VpF;
129  return 0;
130  }
132  int GetFaceEdge(const int *&TmpFV, const int *&TmpLen, int &MaxLen)
133  {
134  TmpFV = FaceEdge;
135  TmpLen = FaceEdgeLen;
136  MaxLen = MaxN_EpF;
137  return 0;
138  }
139 
141  int GetEdgeFace(const int *&TmpEF, int &MaxLen)
142  {
143  TmpEF = EdgeFace;
144  MaxLen = MaxN_FpE;
145  return 0;
146  }
147 
149  int GetFaceType(const Shapes *&TmpFT)
150  {
151  TmpFT = FaceType;
152  return 0;
153  }
154  #endif
155 
156  virtual double GetDiameter(TVertex **Verts) = 0;
157 
159  virtual double GetShortestEdge(TVertex **Verts) = 0;
160 
162  virtual double GetLengthWithReferenceMap(TVertex **Verts) = 0;
163 
165  virtual double GetMeasure(TVertex **Verts) = 0;
166 };
167 
168 #endif
virtual double GetMeasure(TVertex **Verts)=0
int GetFaceType(const Shapes *&TmpFT)
Definition: ShapeDesc.h:149
int N_Joints
Definition: ShapeDesc.h:56
int GetN_Edges()
Definition: ShapeDesc.h:88
Shapes Type
Definition: ShapeDesc.h:33
const int * VertexEdge
Definition: ShapeDesc.h:61
int GetFaceVertex(const int *&TmpFV, const int *&TmpLen, int &MaxLen)
Definition: ShapeDesc.h:124
int N_Vertices
Definition: ShapeDesc.h:36
int MaxN_FpE
Definition: ShapeDesc.h:52
int GetMaxN_EpV()
Definition: ShapeDesc.h:112
int GetN_Joints()
Definition: ShapeDesc.h:91
virtual double GetShortestEdge(TVertex **Verts)=0
virtual double GetLengthWithReferenceMap(TVertex **Verts)=0
const int * FaceVertexLen
Definition: ShapeDesc.h:67
const int * FaceEdge
Definition: ShapeDesc.h:69
Definition: ShapeDesc.h:29
int GetN_Vertices()
Definition: ShapeDesc.h:85
const int * FaceEdgeLen
Definition: ShapeDesc.h:71
const int * VertexFace
Definition: ShapeDesc.h:75
const int * EdgeFace
Definition: ShapeDesc.h:77
const int * EdgeVertex
Definition: ShapeDesc.h:59
const Shapes * FaceType
Definition: ShapeDesc.h:73
virtual double GetDiameter(TVertex **Verts)=0
int GetN_Faces()
Definition: ShapeDesc.h:96
int GetVertexEdge(const int *&TmpVE)
Definition: ShapeDesc.h:116
int GetEdgeFace(const int *&TmpEF, int &MaxLen)
Definition: ShapeDesc.h:141
Definition: Vertex.h:19
int GetEdgeVertex(const int *&TmpEV)
Definition: ShapeDesc.h:105
int N_Faces
Definition: ShapeDesc.h:44
int GetFaceEdge(const int *&TmpFV, const int *&TmpLen, int &MaxLen)
Definition: ShapeDesc.h:132
int MaxN_FpV
Definition: ShapeDesc.h:48
Shapes GetType()
Definition: ShapeDesc.h:101
int MaxN_EpV
Definition: ShapeDesc.h:40
int MaxN_EpF
Definition: ShapeDesc.h:50
const int * FaceVertex
Definition: ShapeDesc.h:65
int MaxN_VpF
Definition: ShapeDesc.h:46
int N_Edges
Definition: ShapeDesc.h:38