WorldViz User Forum A point in avatar's coordinate system
 User Name Remember Me? Password
 Register FAQ Search Today's Posts Mark Forums Read

 Thread Tools Rating: Display Modes
#1
05-14-2009, 05:23 AM
 omidbrb Member Join Date: Dec 2008 Posts: 27
A point in avatar's coordinate system

Hi,

This is probably a very simple question but I couldn't find a simple function to calculate that in vizard. How can I find the position of a point that we have it in global coordinate system with respect to some object's coordinate system (specifically an Avatar's local coordinate system) ?

Thanks a lot,
Omid
#2
05-14-2009, 11:34 AM
 Gladsomebeast Member Join Date: Mar 2005 Location: Isla Vizta, CA Posts: 397
Code:
```#easy way
target = viz.addGroup(pos=[1,0,1])
root = viz.addGroup(pos=[6,1,3])
helper = viz.addGroup(parent=root)
helper.setPosition(target.getPosition(), viz.ABS_GLOBAL)
print helper.getPosition() #mode defaults to viz.ABS_PARENT

#mathy way
#T=OR so T(1/R)=0
T = target.getMatrix()
R = root.getMatrix()
O = T * R.inverse()
print O.getTrans()```
__________________
Paul Elliott
WorldViz LLC
#3
05-15-2009, 05:39 AM
 omidbrb Member Join Date: Dec 2008 Posts: 27
Thanks a lot. I'll try the solutions.

I'm wondering why it wasn't written in the documentation that the viz.addGroup function accepts the "pos" parameter.

 Thread Tools Display Modes Rate This Thread Linear Mode Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Getting Vizard Help with AI Announcements Vizard Precision Position Tracker (PPT) Plug-in development

 Similar Threads Thread Thread Starter Forum Replies Last Post jalvarez Vizard 1 02-27-2009 12:36 PM reedev Plug-in development 4 12-10-2008 08:43 AM Karla Vizard 4 08-22-2008 12:14 PM dig Vizard 4 09-20-2007 03:29 PM betancourtb82 Vizard 7 09-05-2006 04:06 PM

All times are GMT -7. The time now is 03:55 PM.

 Contact Us - WorldViz Home - Archive - Top

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