Mailing List
Home
Forum Home
MUD Dev - Discussion of MUD system design, development, and implementation
Mac Game - Mac game development
Rivers of MUD - a Diku and Merc based multiuser dungeon
SMAUG
Subjects
Getting UDP through NAT/firewalls/whatever for a game
Getting UDP through NAT/firewalls/whatever for a game
QuickTime errors
Python script as stand alone MUD server
Various sound problems
Fragment Shaders & GL TEXTURE RECTANGLE EXT
Timers and global variables
Re: Language and platform for Text MUD server
Apparent acquisition of Yantis (mysupersales) by IDE
HID keyboard
Getting UDP through NAT/firewalls/whatever for a game
Microsoft Sparkle
Director MX
Congratulations Horizons
Yet more problems fullscreen mode
Apple Dev Kitchen Them 's tasty vittles, Maw!
NSOpenGLContext, Pbuffers, and drawables
More DCR "theft " naughtiness
dynamic sprite creation and imaging lingo
Re: Find stuff in Flash array?
Effects of skill imbalances?
QuickTime errors
Rom 2 4/Quickmud Enhancement/Bug fix
Working with XML files/CFURL
smooth scrolling/subpixel tweening
RE: (Ron help me?) Flash text
Flash Racing
MudDev FAQ 2
Browser based games
Installing GLUT
Special character in Flash XML
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
Point Inside a triangle

Point Inside a triangle

2003-12-14       - By Alexx

 Back
Reply:     1     2     3     4     5     6  


Hi

I got a function to test if point lies in or out a polygon :

on isInside(pt,pt1,pt2,pt3)
  x=pt[1]
  y=pt[2]
  x1=pt1[1]
  y1=pt1[2]
  x2=pt2[1]
  y2=pt2[2]
  x3=pt3[1]
  y3=pt3[2]

  fAB = (y-y1)*(x2-x1) - (x-x1)*(y2-y1)
  fCA = (y-y3)*(x1-x3) - (x-x3)*(y1-y3)
  fBC = (y-y2)*(x3-x2) - (x-x2)*(y3-y2)

  if (fAB*fBC>0 and fBC*fCA>0) then
    return true
  else
    return false
  end if
end

my problem is that I want a function to return true
when the point lies exactly on the edge of the polygon..
for now it return false :(

could someone help me please ?

bye

Alexx

__ ____ ____ ____ ____ ____ ____ ____ ____ ____
dirGames-L mailing list  -  dirGames-L@(protected)
http://nuttybar.drama.uga.edu/mailman/listinfo/dirgames-l

Earn $52 per hosting referral at Lunarpages.