|
| 11 Jul 2012 08:32 PM |
I've been working with triangle generation the past few days, and I can't seem to get a reliable method of checking if the space between 3 randomly placed nodes is occupied with a triangle or not.
The methods I've tried haven't worked very well, so does anyone have any suggestions on how I could do this properly? |
|
|
| Report Abuse |
|
|
|
| 11 Jul 2012 08:38 PM |
So it's known,
I've tried ray casting but I think it was set up wrong, It wouldn't always detect properly. |
|
|
| Report Abuse |
|
|
| |
|
|
| 12 Jul 2012 12:04 AM |
| No External Links. if it's an Image, upload it as a Decal. |
|
|
| Report Abuse |
|
|
killjoy37
|
  |
| Joined: 27 Aug 2008 |
| Total Posts: 2821 |
|
|
| 12 Jul 2012 12:33 AM |
Maybe each time you create a triangle add it's coordinates to a table like triangles = {{},{},{}} triangles[1,2, and 3] being the 3 coordinates of a triangle
Also couldn't you run a loop through all the triangles seeing if one happened to have that position? |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2012 12:39 AM |
Yes but they wont always have the same position even if they are in between the same 3 nodes. The way the function creates triangles it places the two triangles at different positions depending on the order you input the node into the function.
So the positions wont always be the same. |
|
|
| Report Abuse |
|
|
killjoy37
|
  |
| Joined: 27 Aug 2008 |
| Total Posts: 2821 |
|
|
| 12 Jul 2012 12:41 AM |
| I don't really understand what you are saying but I'm sure that you're sure that my idea won't work so.. Sorry. Good luck though |
|
|
| Report Abuse |
|
|