VR Juggler
Open Source
Virtual Reality


VRJ Wiki . Juggler . DigitalDeviceToggles VRJ Wiki webs:
Juggler | VRJPlanning | Main | TWiki | Test
Juggler . { Home | Changes | Index | Search | Go }

Wiki

· Home
· Frequently Asked Questions
· Development
· Team Guide
· Direction
· Status
· Task Tracking
· Compiling VR Juggler
· Building from SVN
· SVN Branches
· Compiler Status

edit menu


Main
· About
· Documentation
· Publications
· Download
· HOWTO
· FAQ
· Discussion Area (Wiki)
· Status
· Contact

Projects
· VR Juggler
· Gadgeteer
· VPR
· Sonix
· JCCL
· Tweek
· PyJuggler
· VRJ.NET

Events
· SIGGRAPH 2004 BoF?
· SIGGRAPH 2003 BoF?
· Virtual Reality Course
· IEEE VR 2003 Course
· SC 2002 Exhibit

Site Search

Google

Sponsors
· Infiscape
· VRAC
· Iowa State University
· SourceForge

Link To Us


Q: How do I get just one click (state toggle) from a digital device?

When mouse/wand clicks are setup to register as digital button presses it is hard to get just one click.

A: Use edge triggering on vjDigital or on gadget::Digital devices.

You will want to look at edge triggering on vjDigital or on gadget::Digital devices. An edge trigger gives you 4 states: on, off, just-on, or just-off. VR Juggler digital devices do edge triggering for you automatically. You will want to test for just-on so that your presses do not keep retriggering. For example, you can test it in the following way to see when the button is first pressed:

if ( vjDigital::TOGGLE_ON == digital_dev->getData() )
{
   // Button just pressed
}

For VR Juggler 1.1 and beyond, test against gadget::Digital::TOGGLE_ON.

Back to: LiveFaq

FaqForm
FaqTopic: Applications
ShortQuestion: How do I get just one click from a digital device?


Topic DigitalDeviceToggles . { Edit | Attach | Ref-By | Printable | Diffs | r1.1 | More }

Copyright © 1999-2008 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding VRJ Wiki? Send feedback
Revision r1.1 - 02 Jan 2004 - 16:27 - PatrickHartling Copyright © 1999-2008 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding VRJ Wiki? Send feedback




VR Juggler Logo
Site contents © Copyright 1998–2005 Iowa State University and released under the GPL.
Harvesting email addresses from this page for commercial activities is prohibited.
Contact: Webmaster | Write Us
SOURCE REPOSITORY,
BUGS, FORUMS
HOSTED BY:
SourceForge Home