troubleshooting Question

Z-index of point on a polygon

Avatar of InteractiveMind
InteractiveMindFlag for United Kingdom of Great Britain and Northern Ireland asked on
Math / Science
12 Comments1 Solution300 ViewsLast Modified:
I've got a polygon defined by an array of vectors:

  Vector3 [] v ;

Given the x and y coordinates of a point on the surface, I need to find the corresponding z coordinate.

Perhaps cast a vector from (x,y,0) in the direction of (0,0,-1), and then find how far it travels prior to hitting the surface.

I need the fastest solution - with as little overhead as possible, as I'm likely to be performing this operation potentially tens of thousands of times per second (if not more)..

Thanks very much.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 12 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros