OpenCOVER
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
vrui::coJoystickManager Class Reference

Manages the joystick as input device. More...

#include <coJoystickManager.h>

Collaboration diagram for vrui::coJoystickManager:
Collaboration graph
[legend]

Public Member Functions

 ~coJoystickManager ()
 
void setActive (bool a)
 activate the selectionmode via joystick More...
 
bool getActive ()
 
void setSelectOnRelease (bool b)
 set select on release More...
 
bool getSelectOnRelease ()
 
void setBarrierXValue (float f)
 set barrier value for x value of slider More...
 
void setBarrierYValue (float f)
 set barrier value for y value of slider More...
 
float getBarrierXValue ()
 
float getBarrierYValue ()
 
void setBarrierMilliSeconds (int sec)
 set milliseconds to wait until a action is called (release action) More...
 
int getBarrierMilliSeconds ()
 
void setDeltaSlider (long delta)
 set milliseconds after a slider updates its value More...
 
long getDeltaSlider ()
 
void setAccuracyFloatSlider (int accuracy)
 set accuracy of float-slider (one step is maxValue-minValue/accuracy) More...
 
int getAccuracyFloatSlider ()
 
long getLastTime ()
 get time of the last update More...
 
long getActualTime ()
 get time of the actual update More...
 
void registerMenu (coMenu *, bool force=false)
 register a rootMenu More...
 
void unregisterMenu (coMenu *)
 unregister a rootMenu More...
 
void closedMenu (coMenu *oldMenu, coMenu *newMenu)
 a submenu has been closed select the parentMenu More...
 
void selectItem (coMenuItem *item, coMenu *parentMenu)
 a item has been selected via ray More...
 
void openedSubMenu (coGenericSubMenuItem *item, coMenu *subMenu)
 opend a submenu via pickray More...
 
void update (float x, float y, long timeStamp=-1)
 set the values of the valuator (new flystick) More...
 
void update (int x, int y, long timeStamp=-1)
 set the values of the valuator (old flystick) More...
 
void newUpdate (float x, float y, int button, long timeStamp=-1)
 set the values More...
 
void newUpdate (int x, int y, int button, long timeStamp=-1)
 set the values More...
 
void setAttachment (int att)
 

Static Public Member Functions

static coJoystickManagerinstance ()
 get the singleton instance of coJoystickManager More...
 

Protected Member Functions

 coJoystickManager ()
 
void setMenuActive (coMenu *m)
 
void setItemActive (bool b)
 
void pressActiveItem (int action)
 
void selectAction (int action)
 
void selectActionButton (int action)
 
std::vector< coMenuItem * > getGoodItems (coMenu *m)
 
bool isDocument (coMenu *m)
 
void selectNextMenu (bool forward)
 

Protected Attributes

coMenuactiveMenu
 the selected menu More...
 
coMenuoldActiveMenu
 selected menu before More...
 
std::map< coMenu *, int > activeItem
 list of the selected items in menu and in parent menus More...
 
std::list< coMenu * > menus
 
coMenurootMenu
 root menu More...
 
bool active
 flag if the joystick manager is active More...
 
bool selectOnRelease
 
int oldX
 save old value of x valuator More...
 
int oldY
 save old value of y valuator More...
 
int oldButton
 
float barrierXValue
 
float barrierYValue
 
int barrierMilliSeconds
 
long firstPressed
 
long actualTime
 
long lastTime
 
long deltaSlider
 
int accuracyFloatSlider
 
int attachment
 
bool actionRelease
 
bool actionPress
 
bool secondActionRelease
 
bool secondActionPress
 
bool menuTypeChanged
 

Static Protected Attributes

static coJoystickManagerjoystickManager
 static singleton variable More...
 

Detailed Description

Manages the joystick as input device.

This class manages the selection of the menu via joystick

Constructor & Destructor Documentation

vrui::coJoystickManager::~coJoystickManager ( )
vrui::coJoystickManager::coJoystickManager ( )
protected

Member Function Documentation

void vrui::coJoystickManager::closedMenu ( coMenu oldMenu,
coMenu newMenu 
)

a submenu has been closed select the parentMenu

int vrui::coJoystickManager::getAccuracyFloatSlider ( )
inline
bool vrui::coJoystickManager::getActive ( )
inline
long vrui::coJoystickManager::getActualTime ( )
inline

get time of the actual update

int vrui::coJoystickManager::getBarrierMilliSeconds ( )
inline
float vrui::coJoystickManager::getBarrierXValue ( )
inline
float vrui::coJoystickManager::getBarrierYValue ( )
inline
long vrui::coJoystickManager::getDeltaSlider ( )
inline
std::vector<coMenuItem *> vrui::coJoystickManager::getGoodItems ( coMenu m)
protected
long vrui::coJoystickManager::getLastTime ( )
inline

get time of the last update

bool vrui::coJoystickManager::getSelectOnRelease ( )
inline
static coJoystickManager* vrui::coJoystickManager::instance ( )
static

get the singleton instance of coJoystickManager

bool vrui::coJoystickManager::isDocument ( coMenu m)
protected
void vrui::coJoystickManager::newUpdate ( float  x,
float  y,
int  button,
long  timeStamp = -1 
)

set the values

void vrui::coJoystickManager::newUpdate ( int  x,
int  y,
int  button,
long  timeStamp = -1 
)

set the values

void vrui::coJoystickManager::openedSubMenu ( coGenericSubMenuItem item,
coMenu subMenu 
)

opend a submenu via pickray

void vrui::coJoystickManager::pressActiveItem ( int  action)
protected
void vrui::coJoystickManager::registerMenu ( coMenu ,
bool  force = false 
)

register a rootMenu

void vrui::coJoystickManager::selectAction ( int  action)
protected
void vrui::coJoystickManager::selectActionButton ( int  action)
protected
void vrui::coJoystickManager::selectItem ( coMenuItem item,
coMenu parentMenu 
)

a item has been selected via ray

void vrui::coJoystickManager::selectNextMenu ( bool  forward)
protected
void vrui::coJoystickManager::setAccuracyFloatSlider ( int  accuracy)
inline

set accuracy of float-slider (one step is maxValue-minValue/accuracy)

void vrui::coJoystickManager::setActive ( bool  a)

activate the selectionmode via joystick

void vrui::coJoystickManager::setAttachment ( int  att)
inline
void vrui::coJoystickManager::setBarrierMilliSeconds ( int  sec)
inline

set milliseconds to wait until a action is called (release action)

void vrui::coJoystickManager::setBarrierXValue ( float  f)
inline

set barrier value for x value of slider

void vrui::coJoystickManager::setBarrierYValue ( float  f)
inline

set barrier value for y value of slider

void vrui::coJoystickManager::setDeltaSlider ( long  delta)
inline

set milliseconds after a slider updates its value

void vrui::coJoystickManager::setItemActive ( bool  b)
protected
void vrui::coJoystickManager::setMenuActive ( coMenu m)
protected
void vrui::coJoystickManager::setSelectOnRelease ( bool  b)
inline

set select on release

void vrui::coJoystickManager::unregisterMenu ( coMenu )

unregister a rootMenu

void vrui::coJoystickManager::update ( float  x,
float  y,
long  timeStamp = -1 
)

set the values of the valuator (new flystick)

void vrui::coJoystickManager::update ( int  x,
int  y,
long  timeStamp = -1 
)

set the values of the valuator (old flystick)

Member Data Documentation

int vrui::coJoystickManager::accuracyFloatSlider
protected
bool vrui::coJoystickManager::actionPress
protected
bool vrui::coJoystickManager::actionRelease
protected
bool vrui::coJoystickManager::active
protected

flag if the joystick manager is active

std::map<coMenu *, int> vrui::coJoystickManager::activeItem
protected

list of the selected items in menu and in parent menus

coMenu* vrui::coJoystickManager::activeMenu
protected

the selected menu

long vrui::coJoystickManager::actualTime
protected
int vrui::coJoystickManager::attachment
protected
int vrui::coJoystickManager::barrierMilliSeconds
protected
float vrui::coJoystickManager::barrierXValue
protected
float vrui::coJoystickManager::barrierYValue
protected
long vrui::coJoystickManager::deltaSlider
protected
long vrui::coJoystickManager::firstPressed
protected
coJoystickManager* vrui::coJoystickManager::joystickManager
staticprotected

static singleton variable

long vrui::coJoystickManager::lastTime
protected
std::list<coMenu *> vrui::coJoystickManager::menus
protected
bool vrui::coJoystickManager::menuTypeChanged
protected
coMenu* vrui::coJoystickManager::oldActiveMenu
protected

selected menu before

int vrui::coJoystickManager::oldButton
protected
int vrui::coJoystickManager::oldX
protected

save old value of x valuator

int vrui::coJoystickManager::oldY
protected

save old value of y valuator

coMenu* vrui::coJoystickManager::rootMenu
protected

root menu

bool vrui::coJoystickManager::secondActionPress
protected
bool vrui::coJoystickManager::secondActionRelease
protected
bool vrui::coJoystickManager::selectOnRelease
protected

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