Thanks for all the feedback, everyone.
I think this is what you were referring to in Renegades:
Function PlaneIntersection(planeNormal As Vector3D, planeD As Double,
p0 As Vector3D, p1 As Vector3D) As Vector3D
// Find the intersection of the line from p0 to p1 with the given plane.
// See Lengyel p. 85.
Dim t As Double
Dim V As Vector3D
V = p1.Minus(p0)
t = -(planeNormal.dot(p0) + planeD) / (planeNormal.Dot(V))
return p0.Plus(V.Times(t))
End Function
This looks like the right thing, but what does planeD refer to? ...I
assume it is plane Depth or something like that, but then what do I
measure the depth from? How would I set up the plane?
thanks,
Joe Raffanti
At 4:14 PM -0700 8/18/05, Joe Raffanti wrote:
Has anyone written a RB line segment / triangle intersection detection test?
I think there's one in Renegades, or in its precursor, the FPS demo
described in RB Developer issue 1.3.
If so, could I use it?
Sure, help yourself. If that doesn't do what you need, then do a
search for "Paul Bourke Geometry" -- Paul is an astronomer in
Australia who has a ton of amazingly useful tutorials for this sort
of thing.
Best,
- Joe
--
Joe Strout REAL Software, Inc.
Vote for REALbasic (twice!) in the LinuxWorld Reader's Choice Awards:
http://linux.sys-con.com/general/readerschoice.htm
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|