VR-Forces 4.0.4 Class Documentation
include/gdb/vecNwrkIntRec.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1998 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: vecNwrkIntRec.h,v $ $Revision: 1.8 $ $State: Exp $
00007 *********************************************************************/
00008 #ifndef vecNwrkIntRec_H_
00009 #define vecNwrkIntRec_H_
00010 
00011 #include "gdb/gdbDefines.h"
00012 #include "geometry/point.h"
00013 #include "geometry/surface.h"
00014 #include "gdb/specMgr.h"
00015 
00016 
00017 
00018 class DtNetworkSpecElement;
00019 
00020 // class DtVectorNetworkIntersectionRecord:
00021 //
00022 // Instances of DtVectorNetworkIntersectionRecord are used to record the 
00023 // results of chord/primitive intersection attempts.
00024 
00025 class DT_DLL_gdb DtVectorNetworkIntersectionRecord 
00026 {
00027 public:
00028 
00029    // default constructor
00030    DtVectorNetworkIntersectionRecord();
00031 
00032    //additional constructor 
00033    DtVectorNetworkIntersectionRecord(const DtPoint& intersectionPoint, 
00034                                      double intersectionTime,
00035                                      DtNetworkSpecElement* element);
00036 
00037    // destructor
00038    virtual ~DtVectorNetworkIntersectionRecord();
00039 
00040    // copy constructor
00041    DtVectorNetworkIntersectionRecord(const DtVectorNetworkIntersectionRecord& orig);
00042 
00043    // assignment operator
00044    DtVectorNetworkIntersectionRecord& operator=(const DtVectorNetworkIntersectionRecord& orig);
00045 
00046    // clone this object
00047    virtual DtVectorNetworkIntersectionRecord* clone() const;
00048 
00049    bool intersectionFound() const;
00050    void setIntersectionFound(bool arg);
00051 
00052    double intersectionTime() const;
00053    void setIntersectionTime(double arg);
00054 
00055    //set/get intersectionPoint
00056    DtPoint intersectionPoint() const;
00057    void setIntersectionPoint(const DtPoint& pt);
00058 
00059    int elevation() const;
00060    int featureType() const;
00061    unsigned specificationID() const;
00062 
00063    // Get a pointer to the intersecting feature.
00064    DtNetworkSpecElement* element() const;
00065    void setElement(DtNetworkSpecElement* element);
00066 
00067    DtSurface &surface();
00068    void setSurface(const DtSurface &surf);
00069 
00070 protected:
00071 
00072    void calculateSurface();
00073 
00074    bool                    myIntersectionFound;
00075    DtPoint                 myIntersectionPoint;
00076    double                  myIntersectionTime;
00077    int                     myElevation;
00078    DtNetworkSpecElement*   myElement;
00079    int                     myFeatureType;
00080    DtSpecificationID       mySpecificationID;
00081    DtSurface               mySurface;
00082 };
00083 
00084 
00085 inline bool DtVectorNetworkIntersectionRecord::intersectionFound() const
00086 {
00087    return myIntersectionFound;
00088 }
00089 
00090 
00091 inline void DtVectorNetworkIntersectionRecord::setIntersectionFound(bool arg)
00092 {
00093    myIntersectionFound = arg;
00094 }
00095 
00096 
00097 inline DtPoint DtVectorNetworkIntersectionRecord::intersectionPoint() const
00098 {
00099    return myIntersectionPoint;
00100 }
00101 
00102 
00103 inline void DtVectorNetworkIntersectionRecord::setIntersectionPoint(const DtPoint& pt)
00104 {
00105    myIntersectionPoint = pt;
00106 }
00107 
00108 
00109 inline double DtVectorNetworkIntersectionRecord::intersectionTime() const
00110 {
00111    return myIntersectionTime;
00112 }
00113 
00114 
00115 inline void DtVectorNetworkIntersectionRecord::setIntersectionTime(double t)
00116 {
00117    myIntersectionTime = t;
00118 }
00119 
00120 
00121 inline int DtVectorNetworkIntersectionRecord::elevation() const
00122 {
00123    return myElevation;
00124 }
00125 
00126 
00127 inline int DtVectorNetworkIntersectionRecord::featureType() const
00128 {
00129    return myFeatureType;
00130 }
00131 
00132 
00133 inline unsigned DtVectorNetworkIntersectionRecord::specificationID() const
00134 {
00135    return mySpecificationID;
00136 }
00137 
00138 
00139 inline DtNetworkSpecElement* DtVectorNetworkIntersectionRecord::element() const
00140 {
00141    return myElement;
00142 }
00143 
00144 
00145 inline DtSurface& DtVectorNetworkIntersectionRecord::surface() 
00146 {
00147    return mySurface;
00148 }
00149 
00150 
00151 inline void DtVectorNetworkIntersectionRecord::setSurface(const DtSurface &surf)
00152 {
00153    mySurface = surf;
00154 }
00155 
00156 #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)