+ // Plane position
+ double X;
+ double Y;
+ double Z;
+
+ // Orientation type
+ int OrientationType;
+
+ // Plane orientation (depends on mode)
+ union
+ {
+ struct
+ {
+ bool IsInvert;
+ double Dx;
+ double Dy;
+ double Dz;
+ } AbsoluteOrientation;
+
+ struct
+ {
+ double Rotation1;
+ double Rotation2;
+ } RelativeOrientation;
+ };
+
+// Tools
+public:
+
+ // Converts defined orientation to direction.
+ void OrientationToXYZ( double& theDx, double& theDy, double& theDz ) const;
+
+ // Converts absoulte orientation to relative equivalent.
+ static void DXYZToRelative( const double theDx,
+ const double theDy,
+ const double theDz,
+ const int theRelativeType,
+ double& theRotation1,
+ double& theRotation2 );
+
+ // Converts relative orientation to absolute equivalent.
+ static void RelativeToDXYZ( const int theRelativeType,
+ const double theRotation1,
+ const double theRotation2,
+ double& theDx,
+ double& theDy,
+ double& theDz );