WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 08-25-2009, 03:58 PM
omidbrb omidbrb is offline
Member
 
Join Date: Dec 2008
Posts: 27
Hi Jeff,

Thanks a lot for the reply. Pick works exactly as I expected. Unfortunately it doesn't return an id for unnamed objects.

Apart from that, I want to have a function similar to pick, but with arbitrary point in the screen (not bound to the mouse pointer). I wrote the following code, but it's far slower than the pick function. It takes about 5 seconds on each call, but the pick functions looks to be very fast. My question is, how can I implemnet "pick" function with arbitrary coordinate on the 2D screen to be as fast as pick?

Code:
def fireLineAtPointAndReturnIntersectingPoint(normX, normY):
    line = viz.screentoworld([normX, normY])
    dir = viz.Vector(line.dir)
    dir.setLength(200)
    begin = line.begin
    end = line.begin + dir
    info = viz.phys.intersectLine(begin,end)
    return info.point
By the way, I appreciate your instant replies in the forum.

Best,
Omid
Reply With Quote
 


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
Internal nodes of loaded model files? dtidrow Vizard 2 05-12-2009 08:55 AM
Creating occluder nodes in .ive file dtidrow Vizard 1 12-09-2008 10:40 AM
Collision with child nodes rubberpimple Vizard 4 09-17-2008 04:27 PM
Pickling Nodes Vygreif Vizard 3 02-23-2006 10:03 AM


All times are GMT -7. The time now is 07:21 PM.


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