WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 10-18-2013, 02:19 AM
mape2k mape2k is offline
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 02:22 AM.
Reply With Quote
Old 10-25-2013, 12:51 AM
mape2k mape2k is offline
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
Old 10-31-2013, 09: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:
pos =  model.getMatrix(viz.ABS_GLOBAL,node='tent').getPosition()
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

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

All times are GMT -7. The time now is 06:58 AM.

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