dxMeshesIntersect%(mesh_a%,mesh_b%)

Parameters

mesh_a - mesh_a handle
mesh_b - mesh_b handle

Description

Returns true if the specified meshes are currently intersecting.

This is a fairly slow routine - use with discretion...

This command is currently the only polygon->polygon collision checking routine available in Blitz3D.

Example

; dxMeshesIntersect Example
; -----------------------

dxGraphics3D 640,480
dxSetBuffer dxBackBuffer()

camera=dxCreateCamera()

light=dxCreateLight()
dxRotateEntity light,90,0,0

drum=dxLoadMesh("media/oil-drum/oildrum.3ds")
dxPositionEntity drum,-20,0,100

crate=dxLoadMesh("media/wood-crate/wcrate1.3ds")
dxPositionEntity crate,20,0,100

While Not dxKeyDown( 1 )

dxTurnEntity drum,1,1,1
dxTurnEntity crate,-1,-1,-1

dxRenderWorld

; Test to see if drum and crate meshes are intersecting; if so then display message to confirm this
If dxMeshesIntersect(drum,crate)=True Then dxText 0,0,"Meshes are intersecting!"

dxFlip

Wend

End

Index