The Effect class 效果抽象类
更多...
#include <Effect.h>
The Effect class 效果抽象类
- 提供效果开始、结束API
- 提供通用参数的获取、修改接口
◆ Effect()
RS21::direct_input::Effect::Effect |
( |
Device * |
device | ) |
|
|
protected |
◆ ~Effect()
RS21::direct_input::Effect::~Effect |
( |
| ) |
|
|
protected |
◆ allGeneralEffectInfo()
std::map<std::string, std::string> RS21::direct_input::Effect::allGeneralEffectInfo |
( |
| ) |
|
|
protected |
◆ attackLevel()
unsigned long RS21::direct_input::Effect::attackLevel |
( |
| ) |
const |
◆ attackTime()
unsigned long RS21::direct_input::Effect::attackTime |
( |
| ) |
const |
◆ downloadToDevice()
virtual void RS21::direct_input::Effect::downloadToDevice |
( |
LPDIRECTINPUTDEVICE8 |
device | ) |
|
|
protectedpure virtual |
◆ duration()
unsigned long RS21::direct_input::Effect::duration |
( |
| ) |
const |
duration 获取效果持续时间
- 返回
- 效果持续时间,单位:ms
◆ effectName()
std::string RS21::direct_input::Effect::effectName |
( |
| ) |
const |
获取当前effect的名称
- 返回
- 当前effect的名称
◆ fadeLevel()
unsigned long RS21::direct_input::Effect::fadeLevel |
( |
| ) |
const |
◆ fadeTime()
unsigned long RS21::direct_input::Effect::fadeTime |
( |
| ) |
const |
fadeTime 获取衰减时间,单位:ms
- 返回
- 衰减时间
◆ gain()
unsigned long RS21::direct_input::Effect::gain |
( |
| ) |
const |
获取增益
- 返回
- 增益值(根据报告描述符:0~10000)
◆ index()
int RS21::direct_input::Effect::index |
( |
| ) |
const |
获取当前effect的index
- 返回
- 当前effect的index
◆ rgdAxes()
unsigned long* RS21::direct_input::Effect::rgdAxes |
( |
| ) |
|
◆ rgdAxesCount()
unsigned long RS21::direct_input::Effect::rgdAxesCount |
( |
| ) |
|
◆ samplePeriod()
unsigned long RS21::direct_input::Effect::samplePeriod |
( |
| ) |
const |
◆ setAttackLevel()
void RS21::direct_input::Effect::setAttackLevel |
( |
const unsigned long |
newAttackLevel = 0 | ) |
|
◆ setAttackTime()
void RS21::direct_input::Effect::setAttackTime |
( |
const unsigned long |
newAttackTime = 500 | ) |
|
◆ setDuration()
void RS21::direct_input::Effect::setDuration |
( |
const unsigned long |
newDuration = 2000 | ) |
|
◆ setEffectName()
void RS21::direct_input::Effect::setEffectName |
( |
const std::string & |
newEffectName | ) |
|
◆ setFadeLevel()
void RS21::direct_input::Effect::setFadeLevel |
( |
const unsigned long |
newFadeLevel = 0 | ) |
|
◆ setFadeTime()
void RS21::direct_input::Effect::setFadeTime |
( |
const unsigned long |
newFadeTime = 1000 | ) |
|
◆ setGain()
void RS21::direct_input::Effect::setGain |
( |
const unsigned long |
newGain = DI_FFNOMINALMAX | ) |
|
设置增益值
- 参数
-
newGain | 增益值(根据报告描述符:0~10000) |
◆ setIndex()
void RS21::direct_input::Effect::setIndex |
( |
unsigned int |
newIndex | ) |
|
设置当前effect的index
- 参数
-
newIndex | 当前effect的index,index >= 0 |
◆ setRgdAxes()
void RS21::direct_input::Effect::setRgdAxes |
( |
unsigned long * |
axes, |
|
|
unsigned long |
size |
|
) |
| |
◆ setSamplePeriod()
void RS21::direct_input::Effect::setSamplePeriod |
( |
const unsigned long |
newSamplePeriod = 0 | ) |
|
setSamplePeriod 设置采样周期
- 参数
-
newSamplePeriod | 采样周期值,单位:ms |
◆ setTriggerButton()
void RS21::direct_input::Effect::setTriggerButton |
( |
const unsigned long |
newButtonIndex = DIEB_NOTRIGGER | ) |
|
◆ setTriggerRepeatInterval()
void RS21::direct_input::Effect::setTriggerRepeatInterval |
( |
const unsigned long |
newRepeatInterval = 0 | ) |
|
◆ setXDirection()
void RS21::direct_input::Effect::setXDirection |
( |
long |
newDegree = 1 | ) |
|
◆ start()
void RS21::direct_input::Effect::start |
( |
| ) |
|
◆ stop()
void RS21::direct_input::Effect::stop |
( |
| ) |
|
◆ triggerButton()
unsigned long RS21::direct_input::Effect::triggerButton |
( |
| ) |
const |
◆ triggerRepeatInterval()
unsigned long RS21::direct_input::Effect::triggerRepeatInterval |
( |
| ) |
const |
◆ xDirection()
long RS21::direct_input::Effect::xDirection |
( |
| ) |
|
获取effect在x轴向的角度
- 返回
- effect在x轴的角度
◆ m_device
Device* RS21::direct_input::Effect::m_device = nullptr |
|
protected |
◆ m_diEffect
DIEFFECT RS21::direct_input::Effect::m_diEffect |
|
protected |
◆ m_diEnvelope
DIENVELOPE RS21::direct_input::Effect::m_diEnvelope |
|
protected |
◆ m_dwAxes
DWORD* RS21::direct_input::Effect::m_dwAxes = nullptr |
|
protected |
◆ m_effect
LPDIRECTINPUTEFFECT RS21::direct_input::Effect::m_effect = NULL |
|
protected |
◆ m_effectId
uint16_t RS21::direct_input::Effect::m_effectId |
|
protected |
◆ m_effectName
std::string RS21::direct_input::Effect::m_effectName |
|
protected |
◆ m_index
unsigned int RS21::direct_input::Effect::m_index = 0 |
|
protected |
◆ m_isRunning
bool RS21::direct_input::Effect::m_isRunning = false |
◆ m_lDirection
LONG* RS21::direct_input::Effect::m_lDirection = nullptr |
|
protected |