00001
00027 #ifndef INC_MI32_LIDARPOINT32_H
00028 #define INC_MI32_LIDARPOINT32_H
00029
00030 #ifndef INC_MI32_RECORDARRAY_H
00031 #include <mi32/recordarray.h>
00032 #endif
00033
00034 #ifndef INC_MI32_QUANTIZER_H
00035 #include <mi32/quantizer.h>
00036 #endif
00037
00038 #ifdef RVCSYSDLL
00039 #define CLASSLIBEXPORT MI_DLLCLASSEXPORT
00040 #else
00041 #define CLASSLIBEXPORT MI_DLLCLASSIMPORT
00042 #endif
00043
00044 namespace LIDAR {
00045
00046
00047
00049 class CLASSLIBEXPORT POINTARRAY32 : public RECORDARRAY {
00050 public:
00051
00053 POINTARRAY32 ();
00054
00056 ~POINTARRAY32 ();
00057
00059 const QUANTIZER_LPOINT3D& GetQuantizer () const
00060 { return (m_Quantizer); }
00061
00063 void SetQuantizer (
00064 const QUANTIZER_LPOINT3D& quantizer
00065 ) { m_Quantizer = quantizer; }
00066
00067 private:
00068 #ifndef GENERATING_DOXYGEN_OUTPUT
00069 QUANTIZER_LPOINT3D m_Quantizer;
00070
00071
00072 POINTARRAY32 (const POINTARRAY32&);
00073 POINTARRAY32& operator= (const POINTARRAY32&);
00074 #endif
00075 };
00076
00077
00078
00080 class CLASSLIBEXPORT POINTRECORD32 : public RECORDARRAY::RECORD {
00081 public:
00082
00084 POINTRECORD32 (
00085 ) { }
00086
00088 POINTRECORD32 (
00089 const POINTRECORD32& rhs
00090 ) : RECORD(rhs) { }
00091
00093 POINTRECORD32 (
00094 POINTARRAY32& Array
00095 ) : RECORD(Array) { }
00096
00098 POINTRECORD32 (
00099 POINTARRAY32& Array,
00100 UINT32 ArrayIdx
00101 ) : RECORD(Array,ArrayIdx) { }
00102
00104 ~POINTRECORD32 ()
00105 { }
00106
00108 double GetCoordX (
00109 ) const { return (GetQuantizer().GetX().CalcDouble(reinterpret_cast<const INT32*>(GetData())[0])); }
00110
00112 double GetCoordY (
00113 ) const { return (GetQuantizer().GetY().CalcDouble(reinterpret_cast<const INT32*>(GetData())[1])); }
00114
00116 double GetCoordZ (
00117 ) const { return (GetQuantizer().GetZ().CalcDouble(reinterpret_cast<const INT32*>(GetData())[2])); }
00118
00120 DPOINT2D GetCoord2D (
00121 ) const { return (GetQuantizer().CalcDouble2D(*reinterpret_cast<const LPOINT2D*>(GetData()))); }
00122
00124 DPOINT3D GetCoord3D (
00125 ) const { return (GetQuantizer().CalcDouble3D(GetCoordRaw())); }
00126
00128 const LPOINT3D& GetCoordRaw (
00129 ) const { return (*reinterpret_cast<const LPOINT3D*>(GetData())); }
00130
00132 const QUANTIZER_LPOINT3D& GetQuantizer () const
00133 { return (static_cast<const POINTARRAY32&>(GetArray()).GetQuantizer()); }
00134
00136 void SetCoord2D (
00137 const DPOINT2D& pt
00138 ) { GetQuantizer().CalcInt2D(pt,*reinterpret_cast<LPOINT2D*>(GetData())); }
00139
00141 void SetCoord3D (
00142 const DPOINT3D& pt
00143 ) { GetQuantizer().CalcInt3D(pt,*reinterpret_cast<LPOINT3D*>(GetData())); }
00144
00146 void SetCoordZ (
00147 double z
00148 ) { reinterpret_cast<INT32*>(GetData())[2] = GetQuantizer().GetZ().CalcInt(z); }
00149
00150 };
00151
00152
00153
00154 }
00155
00156 #undef CLASSLIBEXPORT
00157
00158 #endif // INC_MI32_LIDARPOINT32_H