Cube inside to mesh

Blitz3D Forums/Blitz3D Programming/Cube inside to mesh

Azaratur(Posted 2007) [#1]
I need to check if a cube is inside of a mesh.
How i can do?
Aza


D4NM4N(Posted 2007) [#2]
look up meshesintersect()

The another good idea is to create textlabels that print at the mesh's axis location on the screen using cameraprojectX / Y which returns a 3d position in screen coords, so you can use the text command at that location. I find this a very useful way of finding things. Even if the mesh is off the screen it still prints on that edge, giving you a clue where its gone.


jfk EO-11110(Posted 2007) [#3]
MeshesIntersect will not tell you if the cube is completely encapsuled inside the outer mesh. There is one method that relative reliably checks this: do a linepick in all 6 directions, then FLipMesh the outer mesh, do the 6 linepicks again and OR it with the prev. results. Now, if the outer mesh was picked at every side at least once then the cube is inside, encapsuled.


Leon Drake(Posted 2007) [#4]
if your doing simply cube vs cube you can use this func i wrote to check whether cubes intersect or are in each other here

http://open-web-page.info/index.php?q=aHR0cDovL3d3dy5ibGl0emJhc2ljLmNvbS9jb2RlYXJjcy9jb2RlYXJjcy5waHA%2FY29kZT0yMTM2


Azaratur(Posted 2007) [#5]
I need for a pathfinding, if a cube (node) is in a building mesh then donět use that cube (node).
Something like this..
Aza