Sorting triangles inside BEPU.
Posted: Thu Apr 09, 2015 11:25 am
Hello everyone, especially Norbo.
Does the physics engine some ordering of the triangles? I mean the vertices and indices. Take a look at the attached picture.
For example, we have one platform and two cubes on it. Each object has 8 vertices and 36 indices (3 index per 12 triangles). The whole scene is imported into a physics engine as a single static object, i.e. an array of vectors from 24 vertices and an array of integers from 108 indexes. So, does the physics engine reordering the elements of these arrays to optimize collision detection? In other words, sorting the vertices by their three-dimensional position to make it easier to find other nearest vertex. When faced with a red cube, may I know is near the black platform, and not a blue cube?
Does the physics engine some ordering of the triangles? I mean the vertices and indices. Take a look at the attached picture.
For example, we have one platform and two cubes on it. Each object has 8 vertices and 36 indices (3 index per 12 triangles). The whole scene is imported into a physics engine as a single static object, i.e. an array of vectors from 24 vertices and an array of integers from 108 indexes. So, does the physics engine reordering the elements of these arrays to optimize collision detection? In other words, sorting the vertices by their three-dimensional position to make it easier to find other nearest vertex. When faced with a red cube, may I know is near the black platform, and not a blue cube?