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 in triangle

point in triangle

2003-12-17       - By Wouter Visser

 Back
Hi peolpe,

had a simple handler for testing point in triangle wich i wanted to share
with you.
I don't know if it fits the needs as i didn't follow the discussion much.
I hope this contributes.


Kind regards,
Wouter
nuvorm.nl

on point_in_triangle me, x0, y0,x1,y1,x2,y2,x3,y3

 --x0,y0 = point to be tested
 --x1,y1 en x2,y2 en x3,y3 = points of triangle
 --if b0 = 0 dan all points are on one line, call a quit

 b0 = ((x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1))
 b1 = (((x2 - x0) * (y3 - y0) - (x3 - x0) * (y2 - y0)) / (b0*1.0))
 b2 = (((x3 - x0) * (y1 - y0) - (x1 - x0) * (y3 - y0)) / (b0*1.0))
 b3 = 1 - b1 - b2

 If b1 > 0 And b2 > 0 And b3 > 0 Then

   return "inside"

 Else
   return "outside"

 End If
end

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

Earn $52 per hosting referral at Lunarpages.