Jump to content

angle of mesh intersection


Ghostdog
 Share

Recommended Posts

http://www.babylonjs-playground.com/#WOFCL#6

A little green box is set at the first facet location.. the first facet found in the local mesh octree block where the red ball is currently located

In this example, the octree is 10 x 10 x 10 blocks and has a very simple and naive implementation. This could be improved easily.

Moreover, the octree number of subdivisions could be automaticaly computed from some ratio between the mesh total facet number and its size or the facet average area...

(maybe it's still buggy, it's only a prototype coded Q&D)

 

[EDIT] http://www.babylonjs-playground.com/#WOFCL#7

the octree number of subdivision is now pow(nbFacets, 1/3) so it automatically scales to the mesh geometry. I just hope it's a good value :-D

 

[EDIT] maybe a better number sqrt(nbFacets / 6)  ... for 6 sides on a box 

http://www.babylonjs-playground.com/#WOFCL#8

 

works sometimes well : http://www.babylonjs-playground.com/#WOFCL#9

but not that well with the cylinder mesh. Still buggy

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...