WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-18-2013, 01:19 AM
mape2k mape2k is offline
Member
 
Join Date: Mar 2013
Posts: 60
Getting position of a group of objects

Hello all,

I am trying to get the position of a group of objects (a tent composed out of small objects) in Vizard. I have read through the Hierarchical model tutorial and all is well, but it only explains how to get positions of single child objects. Here, a handle is grabbed to the object GEODE.
But for a group of object, I cannot create that handle because there is no geode. How can I export the model so that Vizard can grab a handle to the whole object and not just its lowest nodes? Below is an image of the coordinates I got in the Inspector. I need to get the position of the object 'tent' that is composed out of different smaller objects. Ironically, the inspector displays the right coordinates (marked with the red error)! Now I just need to be able to get them with the viz.getPosition() command. Any ideas?


Last edited by mape2k; 10-18-2013 at 01:22 AM.
Reply With Quote
  #2  
Old 10-24-2013, 11:51 PM
mape2k mape2k is offline
Member
 
Join Date: Mar 2013
Posts: 60
For each group of objects, I create a small sphere in the center of the group of objects. I grabbed the sphere handle in Vizard and could get their position.

However, this is very tedious with a lot of objects. Is there no other way?
Reply With Quote
  #3  
Old 10-31-2013, 08:33 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
You can use the node.getMatrix command to get the transform of a sub-node. In your specific example, you could retrieve the tent position displayed in Inspector using the following code:
Code:
pos =  model.getMatrix(viz.ABS_GLOBAL,node='tent').getPosition()
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Grouping Objects javadi Vizard 3 09-17-2013 07:14 AM
create group of objects Veronika Vizard 4 04-02-2012 11:45 PM
Semi-circle array containing target and distractor objects ptjt255 Vizard 3 08-04-2009 03:09 AM
Lightwave objects rotation problem hosier Vizard 6 02-13-2009 12:04 PM
Could not find plugin to load objects... halley Vizard 1 05-30-2006 11:01 AM


All times are GMT -7. The time now is 07:32 AM.


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