00001
00002
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
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00080
00081 #define HandPose_hpp
00082
00083 #include "Math/CoordinateVector.h"
00084 #include "Math/Orientation.h"
00085 #include "Math/SpatialXform.h"
00086 #include "Math/Vector3.h"
00087 #include "Math/Xform.h"
00088
00090 namespace OSCAR {
00106 class HandPose : public CoordinateVector
00107 {
00108 public:
00109
00116 HandPose();
00117
00125 explicit HandPose(Orientation::OrientationType oType);
00126
00140 HandPose(double x, double y, double z, double o1, double o2, double o3, Orientation::OrientationType oType = Orientation::FixedXYZ);
00141
00159 HandPose(double x, double y, double z, double o1, double o2, double o3,
00160 const CoordinateStatusArray& statArray,
00161 Orientation::OrientationType oType = Orientation::FixedXYZ,
00162 OSCARError& err = DUMMY_ERROR(noError));
00163
00173 HandPose(double *array, Orientation::OrientationType oType = Orientation::FixedXYZ);
00174
00188 HandPose(double *array, const CoordinateStatusArray& statArray, Orientation::OrientationType oType = Orientation::FixedXYZ,
00189 OSCARError& err = DUMMY_ERROR(noError));
00190
00201 HandPose(const CoordinateStatusArray& statArray, OSCARError& err = DUMMY_ERROR(noError));
00202
00209 HandPose(const HandPose& rhs);
00210
00216 virtual ~HandPose();
00217
00224 double& X();
00225
00232 double& Y();
00233
00240 double& Z();
00241
00248 double& O1();
00249
00256 double& O2();
00257
00264 double& O3();
00265
00272 double GetX() const;
00273
00280 double GetY() const;
00281
00288 double GetZ() const;
00289
00296 double GetO1() const;
00297
00304 double GetO2() const;
00305
00312 double GetO3() const;
00313
00321 bool Get(Vector3& position) const;
00322
00330 bool Get(Orientation& orientation) const;
00331
00339 bool Get(Rot3by3& rotation) const;
00340
00348 bool Get(Quaternion& quat) const;
00349
00357 bool Get(Xform& xform) const;
00358
00366 bool Get(SpatialXform& spatial) const;
00367
00378 bool Get(Vector3& axis, double& angle, AngleUnits angUnits = Radians) const;
00379
00380
00388 bool Set(const Vector3& position);
00389
00397 bool Set(const Orientation& orientation);
00398
00407 bool Set(const Rot3by3& rotation);
00408
00417 bool Set(const Quaternion& quat);
00418
00426 bool Set(const Xform& xform);
00427
00436 bool Set(const SpatialXform& spatial);
00437
00447 bool Set(const Vector3& axis, double angle, AngleUnits angUnits = Radians);
00448
00449
00456 Orientation:: OrientationType GetOrientationType() const;
00457
00465 bool SetOrientationType(Orientation::OrientationType oType);
00466
00475 bool ConvertType(Orientation::OrientationType oType);
00476
00487 bool Subtract(const HandPose& rhs, HandPose& result) const;
00488
00498 HandPose operator-(const HandPose& rhs) const;
00499
00507 HandPose& operator=(const HandPose& rhs);
00508
00517 HandPose& operator=(const Vector& rhs);
00518
00531 HandPose& operator()(double x,double y,double z,double o1,double o2,double o3);
00532
00533 protected:
00534 Orientation::OrientationType oType;
00535 };
00536
00537
00538 #include "HandPose.ipp"
00539 }
00540
00541 #endif // HandPose_hpp