次の方法で共有


GameInputMotionState (v0)

モーションが有効になっている入力デバイスからのモーション入力の状態について説明します。

構文

typedef struct GameInputMotionState {  
    float accelerationX;  
    float accelerationY;  
    float accelerationZ;  
    float angularVelocityX;  
    float angularVelocityY;  
    float angularVelocityZ;  
    float magneticFieldX;  
    float magneticFieldY;  
    float magneticFieldZ;  
    float orientationW;  
    float orientationX;  
    float orientationY;  
    float orientationZ;  
    GameInputMotionAccuracy accelerometerAccuracy;
    GameInputMotionAccuracy gyroscopeAccuracy;
    GameInputMotionAccuracy magnetometerAccuracy;  
    GameInputMotionAccuracy orientationAccuracy;  
} GameInputMotionState  

メンバー

accelerationX
型: float

X 軸に沿った重力の線形加速度。

accelerationY
型: float

Y 軸に沿った重力の線形加速度。

accelerationZ
型: float

Z 軸に沿った重力の線形加速度。

angularVelocityX
型: float

x 軸に対する角速度 (1 秒あたりのラジアン単位)。

angularVelocityY
型: float

y 軸に対する角速度 (1 秒あたりのラジアン単位)。

angularVelocityZ
型: float

z 軸に対する角速度 (1 秒あたりのラジアン単位)。

magneticFieldX
型: float

x 軸方向の磁場。

magneticFieldY
型: float

y 軸方向の磁場。

magneticFieldZ
型: float

z 軸方向の磁場。

orientationW
型: float

デバイスの向きを表す四元数の w 要素。

orientationX
型: float

デバイスの向きを表す四元数の x 要素。

orientationY
型: float

デバイスの向きを表す四元数の y 要素。

orientationZ
型: float

デバイスの向きを表す四元数の z 要素。

accelerometerAccuracy
型: GameInputMotionAccuracy

実装されていません。

gyroscopeAccuracy
型: GameInputMotionAccuracy

実装されていません。

magnetometerAccuracy
型: GameInputMotionAccuracy

磁力計の値の精度レベル。

orientationAccuracy
型: GameInputMotionAccuracy

実装されていません。

解説

この構造体は、IGameInputReading::GetArcadeStickState メソッドによって使用されます。

詳細については、「GameInput の読み取り値」の「読み取り値からのデータの取得」セクションを参照してください。 関連するコードの例については、「 単純なゲームパッド入力ループ」を参照してください。

要件

ヘッダー: GameInput.h

サポートされているプラットフォーム: Windows、Xbox One ファミリー本体、Xbox Series 本体

関連項目

入力 API の概要
GameInput