WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-04-2003, 10:14 AM
sled sled is offline
Member
 
Join Date: Jun 2003
Posts: 31
Smile Do you have some idea about the bicycle and wheel

hi, in our applications, we need to use a bicycle to get the speed and direction of the subjects, these data are sent in my computer from the serial port, do I need to make a plug-in like the flock of birds to use these data.

another problem is about wheel, the game wheel with the accelerator and brake, how can I use it to move in the vizard environment instead of the mouse.

Good wishes!
Reply With Quote
  #2  
Old 07-07-2003, 10:29 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

To get data from the serial port within your script you will want to create a Sensor Plug-in. You will need to program in C/C++. If you are interested in this we can give you the appropriate header files and an example.

Vizard supports joysticks through a library called sid. You would probably want to create a timer that checks the current state of the joystick and updates the view. Here's is some sample code for using the joystick.

Code:
import sid
.
.
.

def mytimer(num):

    buttons = sid.buttons()
    if buttons & 1:
        print 'Button 1 is down'
    if buttons & 2:
        print 'Button 2 is down'
    if buttons & 4:
        print 'Button 3 is down'
    

    data = sid.get()
    print 'X axis of joystick at', data[0]
    print 'Y axis of joystick at', data[1]

    slider = sid.slider()
    print 'Joystick slider at', slider
If you have any more questions I'll be happy to help you.
Reply With Quote
  #3  
Old 07-07-2003, 11:15 AM
sled sled is offline
Member
 
Join Date: Jun 2003
Posts: 31
Thanks, I found the plug_in API in your help document. if you have some real examples, it's great.

by the way, in your help document ,under Avatar object,it shows
"The avatar library also includes tools to integrate custom heads made with 3DMeNow Professional software by www.biovirtual.com. This software let you create a realistic head of a person from a front and profile photograph."

but I cannot find the tools( to integrate my file made with 3DMeNow )
Reply With Quote
  #4  
Old 07-07-2003, 11:49 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

I'm going to post an example of a plug-in in the "Plug-in Development" section. I'll also be posting the tools and instructions on creating custom heads for the Avatars.
Reply With Quote
  #5  
Old 07-08-2003, 06:29 AM
sled sled is offline
Member
 
Join Date: Jun 2003
Posts: 31
Thanks a lot
Reply With Quote
  #6  
Old 07-30-2003, 02:47 PM
jrodman jrodman is offline
Member
 
Join Date: Jun 2003
Posts: 21
Is there any more documentation on how to use the sid library to get joystick input?

If not, could you post the header files for the dll so I can see what functions are available?

Does it support an "8-way POV Switch"?

Thanks
Reply With Quote
  #7  
Old 08-01-2003, 10:03 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

Here is a list of the available commands in the sid library, I believe the hat command is what you are looking for.

get
This returns a list of three values. The first value is the x position of the joystick. The second value is the y position of the joystick. The third value is a number where each bit represents whether a certain button is down.

trigger
This returns whether the trigger button has been pressed

buttons
This returns a number where each bit represents whether a button is down

angle
This is a helper function that returns the angle the joystick is pointed at.

slider
This returns the position of the slider

hat
This returns the value of the hat switch

aux
This returns some auxillary values

set
This sets the value for force feedback
Reply With Quote
Reply

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 05:36 AM.


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