Jump to content

mesh in a mesh intersection


Ghostdog
 Share

Recommended Posts

Hi,

regarding a sphere in a sphere scenario, I would like to ask ..

 

1) Is intersection possible for an inner intersection event of the spheres?

- If I take  BABYLON.ActionManager.OnIntersectionExitTrigger  this state will be reached if the small inner sphere is more than the half out of the outer sphere

- If I take  BABYLON.ActionManager.OnIntersectionEnterTrigger this state will be reached direct the scene is started

..  and I need exact the intersection if a small inner sphere touches the inner wall of the outer sphere :) How to do?

 

2) How can a given sphere segment have materials on both sides of the mesh? At the moment I can give some material & color to the segment but if the segments turns around it is not to see anymore.

My first thought was going in direction of backface culling or the DOUBLESIDE option 

var sphere = BABYLON.MeshBuilder.CreateSphere("sphere", {segments: 25, diameter: 5, arc: 1.0, slice: 0.2}, scene, false, BABYLON.Mesh.DOUBLESIDE);

but it not seems to help.

How to bring on some color to the inner side of the mesh, without having an inverse second mesh?

 

Thanks and with best regards,

Stefan

Link to comment
Share on other sites

Mesh intersection is computed according to the bounding boxes and bouding spheres... so when a mesh is "inside" another mesh, its bounding boxes and spheres necesseraly intersect. Consider the term "intersection" not like crossing each other, but more like sharing a common part of their bounding box and bouding sphere. So when one is fully included in the other, it intersects it.

 

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...