00001 #ifndef GeoDescriptorH
00002 #define GeoDescriptorH
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00039
00040
00041 #include "CoreMainHeader.h"
00042 #include "Point.h"
00043 #include "SimpleList.h"
00044
00045
00046
00047 class CSelection;
00048 class CExtObject;
00049
00050
00051
00053
00056 class NEMESIS_CORE_PACKAGE CGeoMeasurement{
00057
00058 public:
00059 static double __fastcall GetDistance(CSelection* selection);
00060 static double __fastcall GetAngle(CSelection* selection);
00061 static double __fastcall GetDihedral(CSelection* selection);
00062
00063 static double __fastcall GetDistance(CSimpleList<CExtObject>& list);
00064 static double __fastcall GetDistance(const CPoint& p1,const CPoint& p2);
00065
00066 static double __fastcall GetAngle(CSimpleList<CExtObject>& list);
00067 static double __fastcall GetAngle(const CPoint& p1,const CPoint& p2,const CPoint& p3);
00068
00069 static double __fastcall GetDihedral(CSimpleList<CExtObject>& list);
00070 static double __fastcall GetDihedral(const CPoint& p1,const CPoint& p2,const CPoint& p3,const CPoint& p4);
00071 };
00072
00073
00074
00076
00079 class NEMESIS_CORE_PACKAGE CGeoDescriptor{
00080 public:
00081 enum EType{
00082 NILL,
00083 ONE_POINT,
00084 TWO_POINT,
00085 TWO_POINT_ORIENTED,
00086 THREE_POINT,
00087 FOUR_POINT,
00088 LINE,
00089 PLANE,
00090 };
00091
00092 inline __fastcall CGeoDescriptor(void){Type=NILL;};
00093 inline __fastcall CGeoDescriptor(EType type);
00094
00095
00096 inline void __fastcall SetType(EType type);
00097 inline void __fastcall SetData(double a,double b,double c,double d);
00098 inline void __fastcall SetPoint1(const CPoint& point);
00099 inline void __fastcall SetPoint2(const CPoint& point);
00100 inline void __fastcall SetPoint3(const CPoint& point);
00101 inline void __fastcall SetPoint4(const CPoint& point);
00102
00103
00104 inline EType __fastcall GetType(void);
00105 inline void __fastcall GetData(double &a,double &b,double &c,double &d);
00106 inline const CPoint& __fastcall GetPoint1(void);
00107 inline const CPoint& __fastcall GetPoint2(void);
00108 inline const CPoint& __fastcall GetPoint3(void);
00109 inline const CPoint& __fastcall GetPoint4(void);
00110
00111
00112 private:
00113 CPoint Point1;
00114 CPoint Point2;
00115 CPoint Point3;
00116 CPoint Point4;
00117 EType Type;
00118 };
00119
00120
00121
00122
00123 inline __fastcall CGeoDescriptor::CGeoDescriptor(EType type)
00124 {
00125 Type = type;
00126 }
00127
00128
00129
00130 inline void __fastcall CGeoDescriptor::SetType(EType type)
00131 {
00132 Type = type;
00133 }
00134
00135 inline void __fastcall CGeoDescriptor::SetData(double a,double b,double c,double d)
00136 {
00137 Point1.x = a;
00138 Point1.y = b;
00139 Point1.z = c;
00140 Point2.x = d;
00141 }
00142
00143 inline void __fastcall CGeoDescriptor::SetPoint1(const CPoint& point)
00144 {
00145 Point1 = point;
00146 }
00147
00148 inline void __fastcall CGeoDescriptor::SetPoint2(const CPoint& point)
00149 {
00150 Point2 = point;
00151 }
00152
00153 inline void __fastcall CGeoDescriptor::SetPoint3(const CPoint& point)
00154 {
00155 Point3 = point;
00156 }
00157
00158 inline void __fastcall CGeoDescriptor::SetPoint4(const CPoint& point)
00159 {
00160 Point4 = point;
00161 }
00162
00163
00164
00165 inline CGeoDescriptor::EType __fastcall CGeoDescriptor::GetType(void)
00166 {
00167 return(Type);
00168 }
00169
00170 inline void __fastcall CGeoDescriptor::GetData(double &a,double &b,double &c,double &d)
00171 {
00172 a = Point1.x;
00173 b = Point1.y;
00174 c = Point1.z;
00175 d = Point2.x;
00176 }
00177
00178 inline const CPoint& __fastcall CGeoDescriptor::GetPoint1(void)
00179 {
00180 return(Point1);
00181 }
00182
00183 inline const CPoint& __fastcall CGeoDescriptor::GetPoint2(void)
00184 {
00185 return(Point2);
00186 }
00187
00188 inline const CPoint& __fastcall CGeoDescriptor::GetPoint3(void)
00189 {
00190 return(Point3);
00191 }
00192
00193 inline const CPoint& __fastcall CGeoDescriptor::GetPoint4(void)
00194 {
00195 return(Point4);
00196 }
00197
00198
00199 #endif