00001
00020 #ifndef INC_MI32_SPOVLN_H
00021 #define INC_MI32_SPOVLN_H
00022
00023 #ifndef INC_MI32_LINERAST_H
00024 #include <mi32/linerast.h>
00025 #endif
00026
00027 #ifndef INC_MI32_FILLPOLY_H
00028 #include <mi32/fillpoly.h>
00029 #endif
00030
00031 #ifndef INC_MI32_STATUNIVAR_H
00032 #include <mi32/statunivar.h>
00033 #endif
00034
00035 #ifndef INC_RVC_NULLMASK_H
00036 #include <rvc/nullmask.h>
00037 #endif
00038
00039
00040 #ifndef GENERATING_DOXYGEN_OUTPUT
00041 class POLYLINE;
00042 #endif
00043
00044
00046 class SURFACE_LINE_PROP_CALC {
00047 public:
00048
00049 struct PROPERTIES {
00050 double m_Length;
00051 double m_MinZ;
00052 double m_MaxZ;
00053 double m_MinSlope;
00054 double m_MaxSlope;
00055 bool m_Full;
00056
00057 PROPERTIES (
00058 ) :
00059 m_Length(0.0),
00060 m_MinZ(DBL_MAX),
00061 m_MaxZ(-DBL_MAX),
00062 m_MinSlope(DBL_MAX),
00063 m_MaxSlope(-DBL_MAX),
00064 m_Full(true)
00065 { }
00066
00067 void Clear (
00068 ) {
00069 m_Length = 0.0;
00070 m_MinZ = DBL_MAX;
00071 m_MaxZ = -DBL_MAX;
00072 m_MinSlope = DBL_MAX;
00073 m_MaxSlope = -DBL_MAX;
00074 m_Full = true;
00075 }
00076
00077 };
00078
00079 SURFACE_LINE_PROP_CALC ();
00080
00081 ~SURFACE_LINE_PROP_CALC ();
00082
00083 void Clear ();
00084
00085 bool Initialize (
00086 RVC::OBJITEM& objitem
00087 );
00088
00089 bool IsInitialized () { return m_Initialized; };
00090
00091 ERRVALUE Compute (
00092 const POLYLINE& polyline,
00093 PROPERTIES& properties
00094 );
00095
00096 private:
00097 #ifndef GENERATING_DOXYGEN_OUTPUT
00098
00099 RVC::RASTER m_Surface;
00100 RVC::NULLMASK m_NullMask;
00101 bool m_Initialized;
00102 RVC::RASTER::IMAGESCALE m_Scale;
00103 DPOINT2D m_NRScale;
00104 DRECT2D m_Extents;
00105 PROPERTIES* m_Properties;
00106
00107 void ControlProcess (const double xa, const double ya, const double xb, const double yb, const int mode);
00108 void SplitProcess (const double xa, const double ya, const double xb, const double yb, const int mode);
00109 void Process (const double xa, const double ya, const double xb, const double yb);
00110 bool CalculatePlane (const INT32 column, const INT32 line, const int status, DPOINT3D& plane);
00111 bool GetElevation(const INT32 column, const INT32 line, double& z);
00112
00113 #endif
00114 };
00115
00116 #endif // INC_MI32_SPOVLN_H