メインページ | ネームスペース一覧 | クラス階層 | 構成 | Directories | ファイル一覧 | ネームスペースメンバ | 構成メンバ | ファイルメンバ | 関連ページ

HIOrientation.h

00001 #ifndef HIORIENTATION_H
00002 #define HIORIENTATION_H
00003 
00004 #include "HIHapticDevice.h"
00005 #include <Device/DVDeviceManager.h>
00006 #include <Device/DVOrientationBase.h>
00007 
00008 namespace Spr {;
00009 
00010 class SPR_DLL HIOrientation: public HIForceDevice6D{
00011 public:
00012     /// デバイスのタイプ
00013     HIOBJECTDEFABST(HIOrientation);
00014 
00015     DVOrientationBase* dev;
00016     /// 
00017     HIOrientation(){ bGood = false; }
00018     virtual ~HIOrientation(){}
00019 
00020     bool IsGood(){return bGood;}
00021 
00022     bool Init(DVDeviceManager& devMan);
00023 
00024     void Update(float dt);
00025 
00026     /// 位置の取得
00027     Vec3f GetPos(){ return pos; }
00028     /// 力の取得
00029     Vec3f GetForce(){ return force; }
00030     /// トルクの取得
00031     Vec3f GetTorque(){ return torque; }
00032     /// 角度の取得
00033     Quaternionf GetOri(){ return ori; }
00034 
00035     /// 位置の設定
00036     void SetPos(Vec3f p){ pos = p; }
00037     /// 姿勢の設定
00038     void SetOri(Quaternionf o){ ori = o; }
00039     /// 並進力・回転力の設定
00040     void SetForce(const Vec3f& f, const Vec3f& t){ force = f; torque = t; }
00041     void SetForce(const Vec3f& f){ force = f; }
00042     /// 最低の力を設定する
00043     void SetMinForce(){ force = torque = Vec3f(); } 
00044 
00045 
00046     /// キャリブレーション(特に何もしない)
00047     bool Calib(){ return true; }
00048 
00049 protected:
00050     // マウスがアクティブかどうかのフラグ
00051     bool bGood;
00052     // ポインタにかかる並進力
00053     Vec3f force;
00054     // ポインタにかかる回転力
00055     Vec3f torque;
00056     // ポインタの位置。Update()で更新される
00057     Vec3f pos;
00058     // ポインタの姿勢。Update()で更新される
00059     Quaternionf ori;
00060 };
00061 
00062 }   //  namespace Spr
00063 #endif

Springheadに対してSun Apr 16 01:57:52 2006に生成されました。  doxygen 1.4.1