VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
shapeInfluenceRectangle.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1998 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 
6 #ifndef SHAPEINFLUENCERECTANGLE_H
7 #define SHAPEINFLUENCERECTANGLE_H
8 
9 #include "shape/shapeDefines.h"
10 #include <vlutil/vlList.h>
11 #include "geometry/point.h"
12 #include "gdb/vertexManager.h"
13 
14 class DtShapeReader;
15 class DtGroup;
16 class DtVertexManager;
17 
18 // class DtShapeInfluenceRectangle
19 //
20 
22 {
23 
24 public:
25 
26  // default constructor.
28 
30  long index,
31  DtPoint& min,
32  DtPoint& max,
33  bool Border,
34  bool corner,
35  bool isReal = true);
36 
38 
39  // destructor
40  virtual ~DtShapeInfluenceRectangle();
41 
42  virtual void setPoint(DtPoint& p, long index);
43  virtual DtPoint& point();
44  virtual long index();
45  virtual void setMin(DtPoint& min);
46  virtual DtPoint& minPoint();
47 
48  virtual void setMax(DtPoint& max);
49  virtual DtPoint& maxPoint();
50 
51  virtual void setAsBorder(bool isBorder);
52  virtual bool isBorder();
53 
54  virtual bool isProcessed();
55 
56  virtual void setIsReal(bool isBorder);
57  virtual bool isReal();
58 
59  virtual void setAsCorner(bool isCorner);
60  virtual bool isCorner();
61 
62  virtual bool onTheXEdge(double val);
63  virtual bool onTheYEdge(double val);
64  virtual bool isAdjacent(DtShapeInfluenceRectangle* adjacent);
65 
66  virtual void addAdjacent(DtShapeInfluenceRectangle* adjacent);
67  virtual void removeAdjacent(DtShapeInfluenceRectangle* adjacent);
68 
69  virtual DtList& adjacents();
70 
71  virtual bool include(DtPoint& p);
72 
73  virtual bool divideIfInclude(DtList& influenceRectanglesList,
74  DtPoint& p,
75  long index,
76  double dist,
77  bool isReal = true);
78 
79  virtual DtGroup* import(DtShapeReader* db,
80  int border);
81 
82  virtual DtGroup* importBorder(DtShapeReader* db,
84  double thresholdForSeaLevel,
85  int border);
86 
87  virtual bool checkForNice(DtPoint &p);
88 
89 // virtual void status();
90 
91  static void setMinMax(DtPoint& p1, DtPoint& p2);
92 
93 protected:
94 
95  virtual void reviewAdjacents(DtShapeInfluenceRectangle* theNew);
96  virtual DtShapeInfluenceRectangle* findNext();
97 
99  DtVertexID myAdditionalIndex[3];
100 
101  DtList myAdjacents;
109  bool myIsReal;
110  int myWho;
111 
112  static int who;
113  static double myXMin;
114  static double myXMax;
115  static double myYMin;
116  static double myYMax;
117 };
118 
119 #endif

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)