WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
GridBox.h
1#ifndef _WINC_GRIDBOX
2#define _WINC_GRIDBOX
3
4#include <WXP/Domain.h>
5#include <WXP/Grid.h>
6#include <WXP/Point.h>
7
8namespace WXP {
9 class GridBox {
10 float val[4];
11 float level;
12 int proj;
13 int span; // Does box span the sides of the domain
14 Point pt[4];
15 Point cpt[4];
16 float side[4];
17 int numside;
18 int cross[4];
19 float tsides;
20 float min, max;
21 float tweak;
22 int equal;
23 int setCrossPoint( int ind, Point &opt );
24
25 public:
26 GridBox();
27 int init();
28 int set( Grid &grid, Domain &domain, int x, int y );
29 int set( Grid &grid, Domain &domain, int x, int y, float level );
30 int initLevel();
31 int setLevel( float level );
32 inline int setTweak( float t ){ tweak = t; return 1; };
33 inline float getLevel(){ return level; };
34 inline float getMin(){ return min; };
35 inline float getMax(){ return max; };
36 inline float getTotalDsides(){ return tsides; };
37 inline int getCross( int rside ){
38 return rside < 0 || rside > 3 ? -1: cross[rside]; };
39 float getVal( int rside );
40 float getSide( int rside );
41 int setCross( int ind, int val );
42 Point getCrossPoint( int rside );
43 inline Point getCrossPoint1( int rside ){ return cpt[rside]; };
44 Point getPoint( int corner );
45 inline Point getPoint1( int corner ){ return pt[corner]; };
46 inline int setNumSide( int val ){ numside = val; return 1; };
47 inline int getNumSide(){ return numside; };
48 inline int getEqual(){ return equal; };
49 inline int getSpan(){ return span; };
50 bool isDataValid();
51 bool isLocateValid();
52 int printVals();
53 int printStats();
54 int print();
55
56 static const int TOP = 0;
57 static const int RIGHT = 1;
58 static const int BOTTOM = 2;
59 static const int LEFT = 3;
60
61 static const int UL = 0;
62 static const int UR = 1;
63 static const int LL = 2;
64 static const int LR = 3;
65 };
66}
67#endif
This class stores and manipulates domain data.
Definition Domain.h:19
This class sets up a grid box for use with contouring.
Definition GridBox.h:9
int set(Grid &grid, Domain &domain, int x, int y)
Definition GridBox.cc:38
This class defines a grid.
Definition Grid.h:20
All WXP classes fall under the WXP namespace.
Definition Angle.h:4
This struct sets a 3D point (x, y, z)
Definition Point.h:5