UdonLibrary 1.0.0
機械システム研究部 C++ ライブラリ
読み取り中…
検索中…
一致する文字列を見つけられません
Udon::PadPS5< Reader > クラステンプレート

通信経由PS5コントローラークラス [詳解]

#include <Udon/Com/Pad/PadPS5.hpp>

Udon::PadPS5< Reader > の継承関係図

公開型

using MessageType = Message::PadPS5
 受信メッセージ型
 
using ReaderType = Reader<MessageType>
 受信クラス型
 

公開メンバ関数

 operator bool () const noexcept
 コントローラーが接続されているか
 
bool isEmergencyStop () const noexcept
 非常停止を行うべきかを取得
 
bool isOperable () const noexcept
 動作可能であるか
 
Input getTriangle () const noexcept
 ▵ボタン
 
Input getCircle () const noexcept
 ○ボタン
 
Input getCross () const noexcept
 ×ボタン
 
Input getSquare () const noexcept
 □ボタン
 
Input getUp () const noexcept
 十字キー上
 
Input getRight () const noexcept
 十字キー右
 
Input getDown () const noexcept
 十字キー下
 
Input getLeft () const noexcept
 十字キー左
 
Input getL1 () const noexcept
 L1ボタン
 
Input getR1 () const noexcept
 R1ボタン
 
Input getL2 () const noexcept
 L2ボタン
 
Input getR2 () const noexcept
 R2ボタン
 
Input getL3 () const noexcept
 左スティック押し込み
 
Input getR3 () const noexcept
 右スティック押し込み
 
Input getCreate () const noexcept
 クリエイトボタン(左上ボタン)
 
Input getOption () const noexcept
 オプションボタン(右上ボタン)
 
Input getTouch () const noexcept
 タッチパッドボタン
 
Input getMic () const noexcept
 マイクボタン
 
Input getPs () const noexcept
 PSボタン
 
Vec2 getLeftStick () const noexcept
 左スティック [x,y: -255~255]
 
Vec2 getRightStick () const noexcept
 右スティック [x,y: -255~255]
 
Stick getMoveInfo () const noexcept
 ロボットの移動に必要なスティックの情報 Udon::Stick オブジェクト {{x,y},turn} を取得
 
void update (int deadZone=20) noexcept
 更新
 
MessageType getMessage () const
 メッセージ構造体に変換
 

詳解

template<template< typename > class Reader>
class Udon::PadPS5< Reader >

通信経由PS5コントローラークラス

テンプレート引数
Reader受信クラス

型定義メンバ詳解

◆ MessageType

template<template< typename > class Reader>
using Udon::PadPS5< Reader >::MessageType = Message::PadPS5

受信メッセージ型

◆ ReaderType

template<template< typename > class Reader>
using Udon::PadPS5< Reader >::ReaderType = Reader<MessageType>

受信クラス型

関数詳解

◆ getCircle()

template<template< typename > class Reader>
Input Udon::PadPS5< Reader >::getCircle ( ) const
inlinenoexcept

○ボタン

◆ getCreate()

template<template< typename > class Reader>
Input Udon::PadPS5< Reader >::getCreate ( ) const
inlinenoexcept

クリエイトボタン(左上ボタン)

◆ getCross()

template<template< typename > class Reader>
Input Udon::PadPS5< Reader >::getCross ( ) const
inlinenoexcept

×ボタン

◆ getDown()

template<template< typename > class Reader>
Input Udon::PadPS5< Reader >::getDown ( ) const
inlinenoexcept

十字キー下

◆ getL1()

template<template< typename > class Reader>
Input Udon::PadPS5< Reader >::getL1 ( ) const
inlinenoexcept

L1ボタン

◆ getL2()

template<template< typename > class Reader>
Input Udon::PadPS5< Reader >::getL2 ( ) const
inlinenoexcept

L2ボタン

◆ getL3()

template<template< typename > class Reader>
Input Udon::PadPS5< Reader >::getL3 ( ) const
inlinenoexcept

左スティック押し込み

◆ getLeft()

template<template< typename > class Reader>
Input Udon::PadPS5< Reader >::getLeft ( ) const
inlinenoexcept

十字キー左

◆ getLeftStick()

template<template< typename > class Reader>
Vec2 Udon::PadPS5< Reader >::getLeftStick ( ) const
inlinenoexcept

左スティック [x,y: -255~255]

◆ getMessage()

template<template< typename > class Reader>
MessageType Udon::PadPS5< Reader >::getMessage ( ) const
inline

メッセージ構造体に変換

◆ getMic()

template<template< typename > class Reader>
Input Udon::PadPS5< Reader >::getMic ( ) const
inlinenoexcept

マイクボタン

◆ getMoveInfo()

template<template< typename > class Reader>
Stick Udon::PadPS5< Reader >::getMoveInfo ( ) const
inlinenoexcept

ロボットの移動に必要なスティックの情報 Udon::Stick オブジェクト {{x,y},turn} を取得

覚え書き
左スティックから移動成分、右スティックX軸から旋回成分を取得

◆ getOption()

template<template< typename > class Reader>
Input Udon::PadPS5< Reader >::getOption ( ) const
inlinenoexcept

オプションボタン(右上ボタン)

◆ getPs()

template<template< typename > class Reader>
Input Udon::PadPS5< Reader >::getPs ( ) const
inlinenoexcept

PSボタン

◆ getR1()

template<template< typename > class Reader>
Input Udon::PadPS5< Reader >::getR1 ( ) const
inlinenoexcept

R1ボタン

◆ getR2()

template<template< typename > class Reader>
Input Udon::PadPS5< Reader >::getR2 ( ) const
inlinenoexcept

R2ボタン

◆ getR3()

template<template< typename > class Reader>
Input Udon::PadPS5< Reader >::getR3 ( ) const
inlinenoexcept

右スティック押し込み

◆ getRight()

template<template< typename > class Reader>
Input Udon::PadPS5< Reader >::getRight ( ) const
inlinenoexcept

十字キー右

◆ getRightStick()

template<template< typename > class Reader>
Vec2 Udon::PadPS5< Reader >::getRightStick ( ) const
inlinenoexcept

右スティック [x,y: -255~255]

◆ getSquare()

template<template< typename > class Reader>
Input Udon::PadPS5< Reader >::getSquare ( ) const
inlinenoexcept

□ボタン

◆ getTouch()

template<template< typename > class Reader>
Input Udon::PadPS5< Reader >::getTouch ( ) const
inlinenoexcept

タッチパッドボタン

◆ getTriangle()

template<template< typename > class Reader>
Input Udon::PadPS5< Reader >::getTriangle ( ) const
inlinenoexcept

▵ボタン

◆ getUp()

template<template< typename > class Reader>
Input Udon::PadPS5< Reader >::getUp ( ) const
inlinenoexcept

十字キー上

◆ isEmergencyStop()

template<template< typename > class Reader>
bool Udon::PadPS5< Reader >::isEmergencyStop ( ) const
inlinenoexcept

非常停止を行うべきかを取得

覚え書き
クロスボタンで非常停止/非常解除を切り替え
コントローラーが接続されていない場合は非常停止、起動時は非常停止
戻り値

◆ isOperable()

template<template< typename > class Reader>
bool Udon::PadPS5< Reader >::isOperable ( ) const
inlinenoexcept

動作可能であるか

覚え書き
非常停止中は動作不可能 非常停止はクロスボタンで切り替え
コントローラーが接続されていない場合は動作不可能
起動時は動作不可能
戻り値
動作可能であるときtrue

◆ operator bool()

template<template< typename > class Reader>
Udon::PadPS5< Reader >::operator bool ( ) const
inlineexplicitnoexcept

コントローラーが接続されているか

◆ update()

template<template< typename > class Reader>
void Udon::PadPS5< Reader >::update ( int deadZone = 20)
inlinenoexcept

更新

引数
deadZoneスティックのデッドゾーンの範囲 負方向にも適用されます (0~255)

このクラス詳解は次のファイルから抽出されました: