WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-19-2011, 06:22 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You can create a for loop to iterate through the positions in your m_pos list. Each position is itself a list of X,Y values. For example, the following checks to see if a position is in the top right quadrant:
Code:
m_pos1=[0.3,0.3]
m_pos2=[0.8,0.2]
m_pos3=[0.8,0.8]
m_pos = [m_pos1,m_pos2,m_pos3]

for pos in m_pos:
	if pos[0] > 0.5 and pos[1] > 0.5:
		print pos,'is in the top right quadrant'
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 10:32 AM.


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