WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 10-24-2007, 11:07 AM
arielasso arielasso is offline
Join Date: Sep 2007
Posts: 8
Question data glove navigation

Hi, im trying to use 5dt data glove to navigate the 3D environment. i try to use the cameraHandler function, but in that function i cannot call the gesture method. below i try to show what is my idea. anyone can help me how can i navigate the 3D space. i need help as soon as possible.
the main objective that is i want try to do is if i use the data glove and i give the instruction by using index finger point the view can move forward.

any one can help me?!
may god bless you.

import viz
import hand

#Identify the data glove's port.
PORT_5DT = 1

#Add the 5DT sensor
sensor = viz.add('5dt.dls')

##Create a hand object from the data glove
glove = hand.add(sensor,hand.GLOVE_5DT)

##Place the hand in front of the user
glove.setPosition( 0.03, 0.09, 0.5 )

#Initialize world
viz.clearcolor( viz.GRAY )
ground = viz.add( 'tut_ground.wrl' )

#Add an array with all the gesture names from the 5DT user's manual.
gestureName = ['Fist', 'Index finger point', 'Middle finger point', 
'Two finger point', 'Ring finger point', 'Ring-Index finger point', 
'Ring-middle finger point', 'Three finger point', 'Little finger point', 
'Index and little finger point', 'Little-middle finger point', 
'Not ring finger point', 'Little-ring finger point', 
'Not middle finger point', 'Not index finger point', 
'Flat hand', 'Undefined']

def mytimer(num):
	gesture = int(sensor.get()[-1])
	if gesture == 1:
		#Index finger point
		ground.view.move( 0, 0, 1)
	if gesture == 0:
		ground.view.move( 0, 0, -1)
Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -7. The time now is 01:45 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC