mozaSdk
Public 成员函数 | Public 属性 | Protected 成员函数 | Protected 属性 | 所有成员列表
RS21::direct_input::Effect类 参考abstract

Effect Abstract Class 更多...

#include <Effect.h>

类 RS21::direct_input::Effect 继承关系图:
RS21::direct_input::ETConstantForce RS21::direct_input::ETDamper RS21::direct_input::ETFriction RS21::direct_input::ETInertia RS21::direct_input::ETSine RS21::direct_input::ETSpring

Public 成员函数

void start ()
 start Force effect 更多...
 
void stop ()
 stop Force effect 更多...
 
void setAttackLevel (const unsigned long newAttackLevel=0)
 Set the power level 更多...
 
unsigned long attackLevel () const
 Obtain Power Level 更多...
 
unsigned long attackTime () const
 Obtain Power time 更多...
 
void setAttackTime (const unsigned long newAttackTime=500)
 set Power time 更多...
 
unsigned long fadeLevel () const
 Obtain attenuation level 更多...
 
void setFadeLevel (const unsigned long newFadeLevel=0)
 Set attenuation level 更多...
 
unsigned long fadeTime () const
 Obtain attenuation time 更多...
 
void setFadeTime (const unsigned long newFadeTime=1000)
 Set attenuation time 更多...
 
unsigned long duration () const
 Obtain attenuation duration 更多...
 
void setDuration (const unsigned long newDuration=2000)
 set attenuation duration 更多...
 
unsigned long samplePeriod () const
 Obtain sampling period 更多...
 
void setSamplePeriod (const unsigned long newSamplePeriod=0)
 set sampling period 更多...
 
unsigned long gain () const
 Obtain Gain 更多...
 
void setGain (const unsigned long newGain=DI_FFNOMINALMAX)
 set Gain 更多...
 
unsigned long triggerButton () const
 Obtain departure effect button 更多...
 
void setTriggerButton (const unsigned long newButtonIndex=DIEB_NOTRIGGER)
 set departure effect button 更多...
 
unsigned long triggerRepeatInterval () const
 Obtain trigger effect repetition interval 更多...
 
void setTriggerRepeatInterval (const unsigned long newRepeatInterval=0)
 Set trigger effect repetition interval 更多...
 
unsigned long rgdAxesCount ()
 Number of effect related axes 更多...
 
unsigned long * rgdAxes ()
 Obtain relevant axis array 更多...
 
void setRgdAxes (unsigned long *axes, unsigned long size)
 Set related axes 更多...
 
long xDirection ()
 Obtain the angle of the effect in the x-axis 更多...
 
void setXDirection (long newDegree=1)
 Set the angle of the effect in the x-axis 更多...
 
std::string effectName () const
 Obtain the name of the current effect 更多...
 
void setEffectName (const std::string &newEffectName)
 set the name of the current effect 更多...
 
int index () const
 Obtain the index of the current effect 更多...
 
void setIndex (unsigned int newIndex)
 set the index of the current effect 更多...
 

Public 属性

bool m_isRunning = false
 

Protected 成员函数

 Effect (Device *device)
 
 ~Effect ()
 
virtual void downloadToDevice (LPDIRECTINPUTDEVICE8 device)=0
 
std::map< std::string, std::string > allGeneralEffectInfo ()
 

Protected 属性

uint16_t m_effectId
 
std::string m_effectName
 
LPDIRECTINPUTEFFECT m_effect = NULL
 
DIEFFECT m_diEffect
 
DIENVELOPE m_diEnvelope
 
LONG * m_lDirection = nullptr
 
DWORD * m_dwAxes = nullptr
 
Device * m_device = nullptr
 
unsigned int m_index = 0
 

详细描述

Effect Abstract Class

  1. Provide API for effect start and end
  2. Provide interfaces for obtaining and modifying general parameters

构造及析构函数说明

◆ 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

Obtain Power Level

返回
Power level

◆ attackTime()

unsigned long RS21::direct_input::Effect::attackTime ( ) const

Obtain Power time

返回
Power time,Unit: ms

◆ downloadToDevice()

virtual void RS21::direct_input::Effect::downloadToDevice ( LPDIRECTINPUTDEVICE8  device)
protectedpure virtual

◆ duration()

unsigned long RS21::direct_input::Effect::duration ( ) const

Obtain attenuation duration

返回
attenuation duration,Unit: ms

◆ effectName()

std::string RS21::direct_input::Effect::effectName ( ) const

Obtain the name of the current effect

返回
The name of the current effect

◆ fadeLevel()

unsigned long RS21::direct_input::Effect::fadeLevel ( ) const

Obtain attenuation level

返回
attenuation level

◆ fadeTime()

unsigned long RS21::direct_input::Effect::fadeTime ( ) const

Obtain attenuation time

返回
attenuation time,Unit: ms

◆ gain()

unsigned long RS21::direct_input::Effect::gain ( ) const

Obtain Gain

返回
Gain value (according to report descriptor: 0-10000)

◆ index()

int RS21::direct_input::Effect::index ( ) const

Obtain the index of the current effect

返回
The index of the current effect

◆ rgdAxes()

unsigned long* RS21::direct_input::Effect::rgdAxes ( )

Obtain relevant axis array

返回
Related Axis Array

◆ rgdAxesCount()

unsigned long RS21::direct_input::Effect::rgdAxesCount ( )

Number of effect related axes

返回
number of axles

◆ samplePeriod()

unsigned long RS21::direct_input::Effect::samplePeriod ( ) const

Obtain sampling period

返回
sampling period,Unit: ms

◆ setAttackLevel()

void RS21::direct_input::Effect::setAttackLevel ( const unsigned long  newAttackLevel = 0)

Set the power level

参数
newAttackLevelPower level

◆ setAttackTime()

void RS21::direct_input::Effect::setAttackTime ( const unsigned long  newAttackTime = 500)

set Power time

参数
newAttackTimePower time,Unit: ms

◆ setDuration()

void RS21::direct_input::Effect::setDuration ( const unsigned long  newDuration = 2000)

set attenuation duration

参数
newDurationattenuation duration,Unit: ms

◆ setEffectName()

void RS21::direct_input::Effect::setEffectName ( const std::string &  newEffectName)

set the name of the current effect

参数
newEffectNameThe name of the effect

◆ setFadeLevel()

void RS21::direct_input::Effect::setFadeLevel ( const unsigned long  newFadeLevel = 0)

Set attenuation level

参数
newFadeLevelattenuation level

◆ setFadeTime()

void RS21::direct_input::Effect::setFadeTime ( const unsigned long  newFadeTime = 1000)

Set attenuation time

参数
newFadeLevelattenuation time,Unit: ms

◆ setGain()

void RS21::direct_input::Effect::setGain ( const unsigned long  newGain = DI_FFNOMINALMAX)

set Gain

返回
newGain Gain value (according to report descriptor: 0-10000)

◆ setIndex()

void RS21::direct_input::Effect::setIndex ( unsigned int  newIndex)

set the index of the current effect

参数
Theindex of the current effect,index >= 0

◆ setRgdAxes()

void RS21::direct_input::Effect::setRgdAxes ( unsigned long *  axes,
unsigned long  size 
)

Set related axes

参数
axesRelated axis array pointer
sizeLength of related axis array

◆ setSamplePeriod()

void RS21::direct_input::Effect::setSamplePeriod ( const unsigned long  newSamplePeriod = 0)

set sampling period

参数
newSamplePeriodsampling period,Unit: ms

◆ setTriggerButton()

void RS21::direct_input::Effect::setTriggerButton ( const unsigned long  newButtonIndex = DIEB_NOTRIGGER)

set departure effect button

参数
newButtonIndexdeparture effect button

◆ setTriggerRepeatInterval()

void RS21::direct_input::Effect::setTriggerRepeatInterval ( const unsigned long  newRepeatInterval = 0)

Set trigger effect repetition interval

参数
newRepeatIntervalTrigger effect interval

◆ setXDirection()

void RS21::direct_input::Effect::setXDirection ( long  newDegree = 1)

Set the angle of the effect in the x-axis

参数
newDegreeThe angle of the effect on the x-axis

◆ start()

void RS21::direct_input::Effect::start ( )

start Force effect

◆ stop()

void RS21::direct_input::Effect::stop ( )

stop Force effect

◆ triggerButton()

unsigned long RS21::direct_input::Effect::triggerButton ( ) const

Obtain departure effect button

返回
departure effect button

◆ triggerRepeatInterval()

unsigned long RS21::direct_input::Effect::triggerRepeatInterval ( ) const

Obtain trigger effect repetition interval

返回
Trigger effect repetition interval

◆ xDirection()

long RS21::direct_input::Effect::xDirection ( )

Obtain the angle of the effect in the x-axis

返回
The angle of the effect on the x-axis

类成员变量说明

◆ 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