![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /********************************************************************* 00002 ** Copyright (c) 2005 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: rangeDirNetSegMet.h,v $ $Revision: 1.3 $ $State: Exp $ 00007 *********************************************************************/ 00008 00009 #pragma once 00010 00011 #include "gdb/gdbDefines.h" 00012 #include "gdb/rangeNetSegMet.h" 00013 00014 // class DtRangeAndDirectionNetworkSegmentMetric: 00015 // 00016 // DtRangeAndDirectionNetworkSegmentMetric is a metric for segments in an 00017 // mx-cif quadtree. This metric extends DtRangeNetworkSegmentMetric 00018 // to to additionally match a specified direction of the segment to within 00019 // a specified tolerance. 00020 // @see DtRangeNetworkSegmentMetric 00021 class DT_DLL_gdb DtRangeAndDirectionNetworkSegmentMetric : public DtRangeNetworkSegmentMetric 00022 { 00023 00024 public: 00025 00027 DtRangeAndDirectionNetworkSegmentMetric(); 00028 00030 DtRangeAndDirectionNetworkSegmentMetric(const DtRangeAndDirectionNetworkSegmentMetric& orig); 00031 00033 DtRangeAndDirectionNetworkSegmentMetric& operator=(const DtRangeAndDirectionNetworkSegmentMetric& orig); 00034 00036 virtual ~DtRangeAndDirectionNetworkSegmentMetric(); 00037 00039 virtual bool valid(const DtNetworkSegment& seg) const; 00040 00043 virtual bool testDirection(const DtPoint& p1, const DtPoint& p2) const; 00044 00049 virtual void setDirectionOfInterest(double direction); 00050 virtual double directionOfInterest() const; 00052 00057 virtual void setDirectionTolerance(double tolerance); 00058 virtual double directionTolerance() const; 00060 00061 // @{ 00062 // Get/set whether segments should be considered bidirectional 00063 // when testing for direction. 00064 // Default is true. 00065 virtual void setSearchBidirectional(bool bidi); 00066 virtual bool searchBidirectional() const; 00067 // @} 00068 00069 // Returns the direction of the segment defined by point0 and 00070 // point1 in local coordinate radians. 00071 virtual double directionOfSegment(const DtPoint& point0, 00072 const DtPoint& point1) const; 00073 00074 protected: 00075 00076 double myDirection; 00077 double myDirectionTolerance; 00078 bool mySearchBidirectional; 00079 }; 00080