直接使用ID3DX10Mesh::Intersect函数
DX9中Mesh的相交检测
由于DX9中的Mesh类没有Intersect函数,所以首先使用D3DXComputeBoundingBox或者D3DXComputeBoundingSphere计算出BoundingBox或者BoundingSphere,然后再使用函数D3DXBoxBoundProbe或者D3DXSphereBoundProbe来判断是否相交。
直接使用ID3DX10Mesh::Intersect函数
由于DX9中的Mesh类没有Intersect函数,所以首先使用D3DXComputeBoundingBox或者D3DXComputeBoundingSphere计算出BoundingBox或者BoundingSphere,然后再使用函数D3DXBoxBoundProbe或者D3DXSphereBoundProbe来判断是否相交。
相关文章: