Overview | All Modules | Tutorial | User's Guide | Programming Guide
Previous

COVISE Online Documentation

Next

Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
vrui::coJoystickManager Class Reference

This class manages the selection of the menu via joystick. More...

#include <coJoystickManager.h>

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)
 sets the active menu More...
 
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 = 0
 static singleton variable More...
 

Detailed Description

This class manages the selection of the menu via joystick.

Manages the joystick as input device

Constructor & Destructor Documentation

◆ ~coJoystickManager()

vrui::coJoystickManager::~coJoystickManager ( )

◆ coJoystickManager()

vrui::coJoystickManager::coJoystickManager ( )
protected

Member Function Documentation

◆ closedMenu()

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

a submenu has been closed select the parentMenu

is called if a submenu is closed via pick interaction set the parent menu as active

◆ getAccuracyFloatSlider()

int vrui::coJoystickManager::getAccuracyFloatSlider ( )
inline

◆ getActive()

bool vrui::coJoystickManager::getActive ( )
inline

◆ getActualTime()

long vrui::coJoystickManager::getActualTime ( )
inline

get time of the actual update

◆ getBarrierMilliSeconds()

int vrui::coJoystickManager::getBarrierMilliSeconds ( )
inline

◆ getBarrierXValue()

float vrui::coJoystickManager::getBarrierXValue ( )
inline

◆ getBarrierYValue()

float vrui::coJoystickManager::getBarrierYValue ( )
inline

◆ getDeltaSlider()

long vrui::coJoystickManager::getDeltaSlider ( )
inline

◆ getGoodItems()

vector< coMenuItem * > vrui::coJoystickManager::getGoodItems ( coMenu m)
protected

◆ getLastTime()

long vrui::coJoystickManager::getLastTime ( )
inline

get time of the last update

◆ getSelectOnRelease()

bool vrui::coJoystickManager::getSelectOnRelease ( )
inline

◆ instance()

coJoystickManager * vrui::coJoystickManager::instance ( )
static

get the singleton instance of coJoystickManager

for pattern singelton use instead of constructor

◆ isDocument()

bool vrui::coJoystickManager::isDocument ( coMenu m)
protected

◆ newUpdate() [1/2]

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

set the values

takes the values of the valuators of the joystick (Flystick 2) values between -1 and 1 button for selection in menuModus

◆ newUpdate() [2/2]

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

set the values

takes the values of the valuators of the joystick (Flystick 1) values are -1 or 1 button for selection in menuModus

◆ openedSubMenu()

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

opend a submenu via pickray

is called form coSubMenuItem if it opens the submenu activate the submenu and the first item in it

◆ pressActiveItem()

void vrui::coJoystickManager::pressActiveItem ( int  action)
protected

◆ registerMenu()

void vrui::coJoystickManager::registerMenu ( coMenu m,
bool  force = false 
)

register a rootMenu

a root menu of the application has to be registered if it is the first rootMenu it will be the active one

◆ selectAction()

void vrui::coJoystickManager::selectAction ( int  action)
protected

◆ selectActionButton()

void vrui::coJoystickManager::selectActionButton ( int  action)
protected

◆ selectItem()

void vrui::coJoystickManager::selectItem ( coMenuItem item,
coMenu parentMenu 
)

a item has been selected via ray

is called from coMenuItem if it is hit via ray selects the item

◆ selectNextMenu()

void vrui::coJoystickManager::selectNextMenu ( bool  forward)
protected

◆ setAccuracyFloatSlider()

void vrui::coJoystickManager::setAccuracyFloatSlider ( int  accuracy)
inline

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

◆ setActive()

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

activate the selectionmode via joystick

activate or deactivate the joystick interaction

◆ setAttachment()

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

◆ setBarrierMilliSeconds()

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

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

◆ setBarrierXValue()

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

set barrier value for x value of slider

◆ setBarrierYValue()

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

set barrier value for y value of slider

◆ setDeltaSlider()

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

set milliseconds after a slider updates its value

◆ setItemActive()

void vrui::coJoystickManager::setItemActive ( bool  b)
protected

◆ setMenuActive()

void vrui::coJoystickManager::setMenuActive ( coMenu m)
protected

sets the active menu

◆ setSelectOnRelease()

void vrui::coJoystickManager::setSelectOnRelease ( bool  b)
inline

set select on release

◆ unregisterMenu()

void vrui::coJoystickManager::unregisterMenu ( coMenu m)

unregister a rootMenu

a root menu of the application has to be unregistered

◆ update() [1/2]

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

set the values of the valuator (new flystick)

takes the values of the valuators of the joystick (Flystick 2) values between -1 and 1

◆ update() [2/2]

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

set the values of the valuator (old flystick)

takes the values of the valuators of the joystick (Flystick 1) values are -1 or 1

Member Data Documentation

◆ accuracyFloatSlider

int vrui::coJoystickManager::accuracyFloatSlider
protected

◆ actionPress

bool vrui::coJoystickManager::actionPress
protected

◆ actionRelease

bool vrui::coJoystickManager::actionRelease
protected

◆ active

bool vrui::coJoystickManager::active
protected

flag if the joystick manager is active

◆ activeItem

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

list of the selected items in menu and in parent menus

◆ activeMenu

coMenu* vrui::coJoystickManager::activeMenu
protected

the selected menu

◆ actualTime

long vrui::coJoystickManager::actualTime
protected

◆ attachment

int vrui::coJoystickManager::attachment
protected

◆ barrierMilliSeconds

int vrui::coJoystickManager::barrierMilliSeconds
protected

◆ barrierXValue

float vrui::coJoystickManager::barrierXValue
protected

◆ barrierYValue

float vrui::coJoystickManager::barrierYValue
protected

◆ deltaSlider

long vrui::coJoystickManager::deltaSlider
protected

◆ firstPressed

long vrui::coJoystickManager::firstPressed
protected

◆ joystickManager

coJoystickManager * vrui::coJoystickManager::joystickManager = 0
staticprotected

static singleton variable

◆ lastTime

long vrui::coJoystickManager::lastTime
protected

◆ menus

std::list<coMenu *> vrui::coJoystickManager::menus
protected

◆ menuTypeChanged

bool vrui::coJoystickManager::menuTypeChanged
protected

◆ oldActiveMenu

coMenu* vrui::coJoystickManager::oldActiveMenu
protected

selected menu before

◆ oldButton

int vrui::coJoystickManager::oldButton
protected

◆ oldX

int vrui::coJoystickManager::oldX
protected

save old value of x valuator

◆ oldY

int vrui::coJoystickManager::oldY
protected

save old value of y valuator

◆ rootMenu

coMenu* vrui::coJoystickManager::rootMenu
protected

root menu

◆ secondActionPress

bool vrui::coJoystickManager::secondActionPress
protected

◆ secondActionRelease

bool vrui::coJoystickManager::secondActionRelease
protected

◆ selectOnRelease

bool vrui::coJoystickManager::selectOnRelease
protected

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

Authors: Martin Aumüller, Ruth Lang, Daniela Rainer, Jürgen Schulze-Döbold, Andreas Werner, Peter Wolf, Uwe Wössner
Copyright © 1993-2009 HLRS, 2004-2009 RRZK, 2005-2009 Visenso
COVISE Version 6.5 Academic