VR-Forces 4.0.4 Class Documentation
include/shape/shapeInfluenceRectangle.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1998 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 
00006 #ifndef SHAPEINFLUENCERECTANGLE_H
00007 #define SHAPEINFLUENCERECTANGLE_H
00008 
00009 #include "shape/shapeDefines.h"
00010 #include <vlutil/vlList.h>
00011 #include "geometry/point.h"
00012 #include "gdb/vtxMgr.h"
00013 
00014 class DtShapeReader;
00015 class DtGroup;
00016 class DtVertexManager;
00017 
00018 // class DtShapeInfluenceRectangle
00019 //
00020 
00021 class DT_DLL_shape DtShapeInfluenceRectangle
00022 {
00023 
00024 public:
00025 
00026    // default constructor.
00027    DtShapeInfluenceRectangle();
00028 
00029    DtShapeInfluenceRectangle(DtPoint& p, 
00030                              long index, 
00031                              DtPoint& min, 
00032                              DtPoint& max, 
00033                              bool Border, 
00034                              bool corner, 
00035                              bool isReal = true);
00036 
00037    DtShapeInfluenceRectangle& operator=(const DtShapeInfluenceRectangle& orig);
00038 
00039    // destructor
00040    virtual ~DtShapeInfluenceRectangle();
00041 
00042    virtual void     setPoint(DtPoint& p, long index);
00043    virtual DtPoint& point();
00044    virtual long     index();
00045    virtual void     setMin(DtPoint& min);
00046    virtual DtPoint& minPoint();
00047 
00048    virtual void    setMax(DtPoint& max);
00049    virtual DtPoint& maxPoint();
00050 
00051    virtual void setAsBorder(bool isBorder);
00052    virtual bool isBorder();
00053 
00054    virtual bool isProcessed();
00055 
00056    virtual void setIsReal(bool isBorder);
00057    virtual bool isReal();
00058 
00059    virtual void setAsCorner(bool isCorner);
00060    virtual bool isCorner();
00061 
00062    virtual bool onTheXEdge(double val);
00063    virtual bool onTheYEdge(double val);
00064    virtual bool isAdjacent(DtShapeInfluenceRectangle* adjacent);
00065 
00066    virtual void addAdjacent(DtShapeInfluenceRectangle* adjacent);
00067    virtual void removeAdjacent(DtShapeInfluenceRectangle* adjacent);
00068 
00069    virtual DtList& adjacents();
00070 
00071    virtual bool include(DtPoint& p);
00072 
00073    virtual bool divideIfInclude(DtList& influenceRectanglesList, 
00074                                 DtPoint& p, 
00075                                 long index, 
00076                                 double dist, 
00077                                 bool isReal = true);
00078 
00079    virtual DtGroup* import(DtShapeReader* db, 
00080                            int border);
00081 
00082    virtual DtGroup* importBorder(DtShapeReader* db, 
00083                                  DtShapeInfluenceRectangle*& ref, 
00084                                  double thresholdForSeaLevel, 
00085                                  int border);
00086 
00087    virtual bool checkForNice(DtPoint &p);
00088 
00089 //   virtual void status();
00090 
00091    static void setMinMax(DtPoint& p1, DtPoint& p2);
00092 
00093 protected:
00094 
00095    virtual void                        reviewAdjacents(DtShapeInfluenceRectangle* theNew);
00096    virtual DtShapeInfluenceRectangle*  findNext();
00097 
00098    DtVertexID  myIndex;
00099    DtVertexID  myAdditionalIndex[3];
00100 
00101    DtList      myAdjacents;
00102    DtPoint     myPoint;
00103    DtPoint     myMin;
00104    DtPoint     myMax;
00105    bool        myIsBorder;
00106    bool        myIsCorner;
00107    bool        myBorderProcessed;
00108    bool        myProcessed;
00109    bool        myIsReal;
00110    int         myWho;
00111 
00112    static int    who;
00113    static double myXMin;
00114    static double myXMax;
00115    static double myYMin;
00116    static double myYMax;
00117 };
00118 
00119 #endif

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)