Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Lamp::JoystickState Class Reference

ジョイスティックステート More...

`#include <JoystickState.h>`

List of all members.

## Public Member Functions
| JoystickState ()
| コンストラクタ
virtual | ~JoystickState ()
| デストラクタ
virtual void | clear ()
| クリア
virtual void | setXAxis (int xAxis)
| X軸の設定.
virtual int | getXAxis () const
| X軸の取得.
virtual void | setYAxis (int yAxis)
| Y軸の設定.
virtual int | getYAxis () const
| Y軸の取得.
virtual void | setZAxis (int zAxis)
| Z軸の設定.
virtual int | getZAxis () const
| Z軸の取得.
virtual void | setXRotation (int xRotation)
| X回転の設定.
virtual int | getXRotation () const
| X回転の取得.
virtual void | setYRotation (int yRotation)
| Y回転の設定.
virtual int | getYRotation () const
| Y回転の取得.
virtual void | setZRotation (int zRotation)
| Z回転の設定.
virtual int | getZRotation () const
| Z回転の取得.
virtual void | setPOV (int id, int pov)
| 視点コントローラ値の設定
virtual int | getPOV (int id) const
| 視点コントローラ値の取得
virtual void | setSlider (int id, int slider)
| スライダ値の設定
virtual int | getSlider (int id) const
| スライダ値の取得
virtual void | setButtonPressed (int id, bool pressed)
| ボタンの設定
virtual bool | buttonPressed (int id) const
| ボタンが押されているか
virtual String | toString () const
| 文字列への変換
virtual void | writeBinary (BinaryWriter *binaryWriter) const
| バイナリ書き出し
virtual void | readBinary (BinaryReader *binaryReader)
| バイナリ読み込み
## Static Public Attributes
const int | maxPOVCount = 4
| 最大視点コントローラ数
const int | maxSliderCount = 2
| 最大スライダ数
const int | maxButtonCount = 32
| 最大ボタン数
const int | maxAxisValue = 10000
| 軸データ最大値
const int | minAxisValue = -10000
| 軸データ最小値
const int | maxPOVValue = 36000
| 視点コントローラ最大値

## Detailed Description

ジョイスティックステート

Definition at line 37 of file JoystickState.h.

## Member Function Documentation

virtual bool Lamp::JoystickState::buttonPressed | ( | int | id | ) | const`[inline, virtual]`

  | ボタンが押されているか Parameters:
  id | 対象ボタンID
Returns: ボタンが押されていればtrue Definition at line 211 of file JoystickState.h. References Assert, and maxButtonCount. Referenced by Lamp::Joystick::buttonDown(), Lamp::Joystick::buttonPressed(), Lamp::Joystick::buttonUp(), toString(), and writeBinary().

virtual int Lamp::JoystickState::getPOV | ( | int | id | ) | const`[inline, virtual]`

  | 視点コントローラ値の取得 Parameters:
  id | 視点コントローラID
Returns: 視点コントローラ値 Definition at line 169 of file JoystickState.h. References Assert, and maxPOVCount. Referenced by Lamp::Joystick::getPOV(), Lamp::Joystick::getPrePOV(), Lamp::Joystick::isPOVCenter(), toString(), and writeBinary().

virtual int Lamp::JoystickState::getSlider | ( | int | id | ) | const`[inline, virtual]`

  | スライダ値の取得 Parameters:
  id | スライダID
Returns: スライダ値 Definition at line 190 of file JoystickState.h. References Assert, and maxSliderCount. Referenced by Lamp::Joystick::getSlider(), toString(), and writeBinary().

virtual int Lamp::JoystickState::getXAxis | ( |  | ) | const`[inline, virtual]`

| X軸の取得. Returns: X軸 Definition at line 90 of file JoystickState.h. Referenced by Lamp::Joystick::getPreXAxis(), Lamp::Joystick::getXAxis(), toString(), and writeBinary().

virtual int Lamp::JoystickState::getXRotation | ( |  | ) | const`[inline, virtual]`

| X回転の取得. Returns: X回転 Definition at line 127 of file JoystickState.h. Referenced by Lamp::Joystick::getPreXRotation(), Lamp::Joystick::getXRotation(), toString(), and writeBinary().

virtual int Lamp::JoystickState::getYAxis | ( |  | ) | const`[inline, virtual]`

| Y軸の取得. Returns: Y軸 Definition at line 102 of file JoystickState.h. Referenced by Lamp::Joystick::getPreYAxis(), Lamp::Joystick::getYAxis(), toString(), and writeBinary().

virtual int Lamp::JoystickState::getYRotation | ( |  | ) | const`[inline, virtual]`

| Y回転の取得. Returns: Y回転 Definition at line 139 of file JoystickState.h. Referenced by Lamp::Joystick::getPreYRotation(), Lamp::Joystick::getYRotation(), toString(), and writeBinary().

virtual int Lamp::JoystickState::getZAxis | ( |  | ) | const`[inline, virtual]`

| Z軸の取得. Returns: Z軸 Definition at line 114 of file JoystickState.h. Referenced by Lamp::Joystick::getPreZAxis(), Lamp::Joystick::getZAxis(), toString(), and writeBinary().

virtual int Lamp::JoystickState::getZRotation | ( |  | ) | const`[inline, virtual]`

| Z回転の取得. Returns: Z回転 Definition at line 151 of file JoystickState.h. Referenced by Lamp::Joystick::getPreZRotation(), Lamp::Joystick::getZRotation(), toString(), and writeBinary().

void Lamp::JoystickState::readBinary | ( | BinaryReader * | binaryReader | ) | `[virtual]`

  | バイナリ読み込み Parameters:
  binaryReader | バイナリリーダ
Definition at line 61 of file JoystickState.cpp. References Lamp::BitSet< Type >::getIndexedBit(), maxButtonCount, maxPOVCount, maxSliderCount, Lamp::BinaryReader::readInt(), Lamp::BinaryReader::readShort(), Lamp::BinaryReader::readUInt(), setButtonPressed(), setPOV(), setSlider(), setXAxis(), setXRotation(), setYAxis(), setYRotation(), setZAxis(), and setZRotation().

virtual void Lamp::JoystickState::setButtonPressed | ( | int | id,
|  | bool | pressed
| ) | `[inline, virtual]`

  | ボタンの設定 Parameters:
  id | 対象ボタンID
  pressed | trueなら押されている
Definition at line 201 of file JoystickState.h. References Assert, and maxButtonCount. Referenced by Lamp::JoystickDevice::polling(), and readBinary().

virtual void Lamp::JoystickState::setPOV | ( | int | id,
|  | int | pov
| ) | `[inline, virtual]`

  | 視点コントローラ値の設定 Parameters:
  id | 視点コントローラID
  pov | 視点コントローラ値
Definition at line 159 of file JoystickState.h. References Assert, and maxPOVCount. Referenced by Lamp::JoystickDevice::polling(), and readBinary().

virtual void Lamp::JoystickState::setSlider | ( | int | id,
|  | int | slider
| ) | `[inline, virtual]`

  | スライダ値の設定 Parameters:
  id | スライダID
  slider | スライダ値
Definition at line 180 of file JoystickState.h. References Assert, and maxSliderCount. Referenced by Lamp::JoystickDevice::polling(), and readBinary().

virtual void Lamp::JoystickState::setXAxis | ( | int | xAxis | ) | `[inline, virtual]`

  | X軸の設定. Parameters:
  xAxis | X軸
Definition at line 84 of file JoystickState.h. Referenced by Lamp::JoystickDevice::polling(), and readBinary().

virtual void Lamp::JoystickState::setXRotation | ( | int | xRotation | ) | `[inline, virtual]`

  | X回転の設定. Parameters:
  xRotation | X回転
Definition at line 121 of file JoystickState.h. Referenced by Lamp::JoystickDevice::polling(), and readBinary().

virtual void Lamp::JoystickState::setYAxis | ( | int | yAxis | ) | `[inline, virtual]`

  | Y軸の設定. Parameters:
  yAxis | Y軸
Definition at line 96 of file JoystickState.h. Referenced by Lamp::JoystickDevice::polling(), and readBinary().

virtual void Lamp::JoystickState::setYRotation | ( | int | yRotation | ) | `[inline, virtual]`

  | Y回転の設定. Parameters:
  yRotation | Y回転
Definition at line 133 of file JoystickState.h. Referenced by Lamp::JoystickDevice::polling(), and readBinary().

virtual void Lamp::JoystickState::setZAxis | ( | int | zAxis | ) | `[inline, virtual]`

  | Z軸の設定. Parameters:
  zAxis | Z軸
Definition at line 108 of file JoystickState.h. Referenced by Lamp::JoystickDevice::polling(), and readBinary().

virtual void Lamp::JoystickState::setZRotation | ( | int | zRotation | ) | `[inline, virtual]`

  | Z回転の設定. Parameters:
  zRotation | Z回転
Definition at line 145 of file JoystickState.h. Referenced by Lamp::JoystickDevice::polling(), and readBinary().

virtual String Lamp::JoystickState::toString | ( |  | ) | const`[inline, virtual]`

| 文字列への変換 Returns: 文字列 Definition at line 221 of file JoystickState.h. References buttonPressed(), Lamp::String::format(), getPOV(), getSlider(), getXAxis(), getXRotation(), getYAxis(), getYRotation(), getZAxis(), and getZRotation(). Referenced by Lamp::JoystickDevice::toString().

void Lamp::JoystickState::writeBinary | ( | BinaryWriter * | binaryWriter | ) | const`[virtual]`

  | バイナリ書き出し Parameters:
  binaryWriter | バイナリライタ
Definition at line 34 of file JoystickState.cpp. References Assert, buttonPressed(), Lamp::BitSet< Type >::getBits(), getPOV(), getSlider(), getXAxis(), getXRotation(), getYAxis(), getYRotation(), getZAxis(), getZRotation(), maxButtonCount, maxPOVCount, maxSliderCount, Lamp::BitSet< Type >::setIndexedBit(), Lamp::BinaryWriter::writeInt(), Lamp::BinaryWriter::writeShort(), and Lamp::BinaryWriter::writeUInt().

The documentation for this class was generated from the following files:

- JoystickState.h
- JoystickState.cpp