![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /********************************************************************* 00002 ** Copyright (c) 2006 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: singleIntersectionNodeMetric.h,v $ $Revision: 1.3 $ $State: Exp $ 00007 *********************************************************************/ 00008 #ifndef singleIntersectionNodeMetric_H_ 00009 #define singleIntersectionNodeMetric_H_ 00010 00011 // 00012 // \file singleIntersectionNodeMetric.h 00013 // \brief This file contains the DtSingleIntersectNetworkSegmentMetric class declaration. 00014 // 00015 00016 #include "gdb/gdbDefines.h" 00017 #include "gdb/netwrkSegMet.h" 00018 #include "geometry/chord.h" 00019 00020 class DtNetworkSegment; 00021 class DtNetworkEdge; 00022 00027 class DT_DLL_gdb DtSingleIntersectNetworkSegmentMetric : public DtNetworkSegmentMetric 00028 { 00029 public: 00030 00031 // default constructor 00032 DtSingleIntersectNetworkSegmentMetric(); 00033 00034 // destructor 00035 virtual ~DtSingleIntersectNetworkSegmentMetric(); 00036 00037 // copy constructor 00038 //DtSingleIntersectNetworkSegmentMetric(const DtSingleIntersectNetworkSegmentMetric& orig); 00039 00040 // assignment operator 00041 //DtSingleIntersectNetworkSegmentMetric& operator=(const DtSingleIntersectNetworkSegmentMetric& orig); 00042 00043 public: 00044 00046 virtual double measure(const DtNetworkSegment& seg) const; 00047 00050 virtual double measure(const DtNetworkSegment& seg, DtPoint &p) const; 00051 00053 virtual bool valid(const DtNetworkSegment& seg) const; 00054 00056 virtual bool validSW(double xx, double yy) const; 00057 00059 virtual bool validSE(double xx, double yy) const; 00060 00062 virtual bool validNE(double xx, double yy) const; 00063 00065 virtual bool validNW(double xx, double yy) const; 00066 00068 virtual const DtNetworkSegment* segmentOfInterest() const; 00069 virtual void setSegmentOfInterest(const DtNetworkSegment& segOfInterest); 00070 00072 virtual double tolerance() const; 00073 virtual void setTolerance(double val); 00074 00076 void setIntersectX(double newX); 00077 double intersectX() const; 00078 00080 void setIntersectY(double newY); 00081 double intersectY() const; 00082 00084 void setFoundIntersection(bool yesOrNo); 00085 bool foundIntersection() const; 00086 00088 virtual void initialize( Coordinate_System* cs ); 00089 00090 protected: 00091 00095 bool endpointsCoincidentAtXY(const DtNetworkEdge& edge1, 00096 const DtNetworkEdge& edge2, DtReal xValue, DtReal yValue) const; 00097 00098 bool pointsCoincidentAtXY(const DtPoint& p1, const DtPoint& p2, 00099 DtReal xValue, DtReal yValue) const; 00100 00101 const DtNetworkSegment* mySegmentOfInterest; 00102 DtChord myTopoSegmentOfInterest; 00103 double myTolerance; 00104 00105 mutable bool myFoundIntersection; 00106 mutable double myIntersectX; 00107 mutable double myIntersectY; 00108 00109 double myMaxX; 00110 double myMaxY; 00111 double myMinX; 00112 double myMinY; 00113 DtCoordTransform myTopoToLocal; 00114 }; 00115 00116 #endif