VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties 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
Definition: group.h:28
bool myBorderProcessed
Definition: shapeInfluenceRectangle.h:107
DtList myAdjacents
Definition: shapeInfluenceRectangle.h:101
static double myXMax
Definition: shapeInfluenceRectangle.h:114
bool myIsBorder
Definition: shapeInfluenceRectangle.h:105
static double myYMin
Definition: shapeInfluenceRectangle.h:115
DtPoint myMax
Definition: shapeInfluenceRectangle.h:104
bool myIsCorner
Definition: shapeInfluenceRectangle.h:106
Definition: vertexManager.h:26
Definition: shapeInfluenceRectangle.h:21
int myWho
Definition: shapeInfluenceRectangle.h:110
DtPoint myMin
Definition: shapeInfluenceRectangle.h:103
static double myXMin
Definition: shapeInfluenceRectangle.h:113
static double myYMax
Definition: shapeInfluenceRectangle.h:116
DtPoint myPoint
Definition: shapeInfluenceRectangle.h:102
DtVertexID myIndex
Definition: shapeInfluenceRectangle.h:98
Definition: shapeReader.h:30
bool myProcessed
Definition: shapeInfluenceRectangle.h:108
bool myIsReal
Definition: shapeInfluenceRectangle.h:109
#define DT_DLL_shape
Definition: shapeDefines.h:23
static int who
Definition: shapeInfluenceRectangle.h:112
Definition: point.h:34

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)