Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

again. This question is strictly related to this one so, what is the technology that makes physics engines suitable for raycasting? It is a particular data structure? Has it to do with the engine's internal representation of the objects? If so, how do they represent objects so to be able to make polygon-precise raycasting? Do they hold the whole information about a mesh?

share|improve this question
up vote 7 down vote accepted

Good physics engines:

  • Use algorithms and data structures with good theoretical ("big-O") properties.
  • Use specific memory allocators and data layouts for improved cache efficiency.
  • Use microoptimized code, that not just has good big-O runtime but is also known to generate efficient code on real compilers / machines (e.g. SIMD and specialized instructions like fsel).
  • Use a variety of good spatial subdivision techniques (octrees, BSP trees, spatial hashes).
  • Use different levels of checks of various costs (e.g. first AABB, then tri-tri).
share|improve this answer

I don't think there are specific technologies that are exlusive to physics engines which makes them so good for Ray Casting. It's more the fact that in general they have very good ray casting capabilities because that's what they use to determine collisions between objects in the simulation. These have generally been optimised and tested pretty well as they're a fundamental component to a physics simulation.

Why re-invent the wheel if you can leverage existing, fast and well tested libraries?

share|improve this answer
So which technologies do they use? – tunnuz Sep 16 '10 at 9:35
Joe has mentioned specific types of algorithms used, if that's what you mean by technology. – Muttley Sep 16 '10 at 12:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.