WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-19-2007, 07:24 PM
v-Salik v-Salik is offline
Member
 
Join Date: Sep 2007
Posts: 20
Transforming coordinate systems.

I have a problem, I can solve this using some linear algebra but I'm a little lazy (actually we have already solved it but it was long and cumbersome to implement) and want to know how to do this with viz.functionality

I have a hierarchical skeleton I want to calculate the position of the end effector in global space when a parent joint is moved. I don't want to actually move the skeleton. I know the lengths of each bone, and I know the coordinates of each bone, getting the angles is also trivial.
What's the best way to accomplish this calculation?
It is easy to calculate these in local space, but the problem is transforming it back into world space ... does viz have functionality for this.

I had an idea of using a temp object then setting it's transform to the same as the bone, rotating it to the new angle then measuring it's global coordinates... is there any object that would be suitable for this type of intermediate calculation?
Thanks
-Salik
Reply With Quote
  #2  
Old 09-19-2007, 07:45 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
You can get the position of a bone in world coordinates using the following code:
Code:
bone.getPosition(viz.AVATAR_WORLD)
Does this give you what you want?
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 04:44 PM.


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