is within ... polygon shape?

Eric Chatonet eric.chatonet at sosmartsoftware.com
Fri Jun 24 10:49:04 EDT 2005


Re Steve,

Another funny approach:

function WhichObject pLoc,pObj
   local tCurLoc, tColor
   -----
   put the screenMouseLoc into tCurLoc
   lock screen
   hide pObj
   set the screenMouseloc to globalLoc(pLoc)
   put the mouseColor into tColor
   set the screenMouseloc to tCurLoc
   show pObj
   unlock screen
   return WhatKindOfObject(tColor)
end WhichObject

WhatKindOfObject function would return the right object according to  
the passed  color  :-)
Not tested... but should work.
Ah, there are so many ways to do a job with Rev!

Le 24 juin 05 à 16:30, Steve Bonham a écrit :

> Intersect doesn't work after all. It appears that one object will  
> intersect with another irregular object's rect and NOT the objects  
> true shape (polygon points).
> See illustration... at:
>     http://academics.georgiasouthern.edu/cet/SB/ball_fairway.jpg
>
> Is there a way to get Rev to:
> 1. evaluate IF the loc of an object is within the shape (defined by  
> a series of coordinates) of an object?
>
> OR
> 2. evaluate IF the loc of an object intersects with the shape  
> (defined by a series of coordinates) of an object?


Best Regards from Paris,

Eric Chatonet.
----------------------------------------------------------------
So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Free plugins and tutorials on my website
----------------------------------------------------------------
Web site        http://www.sosmartsoftware.com/
Email        eric.chatonet at sosmartsoftware.com/
Phone        33 (0)1 43 31 77 62
Mobile        33 (0)6 20 74 50 86
----------------------------------------------------------------



More information about the use-livecode mailing list