public void Build(StridingMeshInterface triangles) { NodeTriangleCallback callback = new NodeTriangleCallback(_leafNodes); Vector3 aabbMin = new Vector3(-1e30f, -1e30f, -1e30f); Vector3 aabbMax = new Vector3(1e30f, 1e30f, 1e30f); triangles.InternalProcessAllTriangles(callback, aabbMin, aabbMax); //now we have an array of leafnodes in m_leafNodes _contiguousNodes = new OptimizedBvhNode[2 * _leafNodes.Count]; for (int i = 0; i < _contiguousNodes.Length; i++) _contiguousNodes[i] = new OptimizedBvhNode(); _curNodeIndex = 0; _rootNode = BuildTree(_leafNodes, 0, _leafNodes.Count); }
public void Build(StridingMeshInterface triangles) { NodeTriangleCallback callback = new NodeTriangleCallback(_leafNodes); Vector3 aabbMin = new Vector3(-1e30f, -1e30f, -1e30f); Vector3 aabbMax = new Vector3(1e30f, 1e30f, 1e30f); triangles.InternalProcessAllTriangles(callback, aabbMin, aabbMax); //now we have an array of leafnodes in m_leafNodes _contiguousNodes = new OptimizedBvhNode[2 * _leafNodes.Count]; for (int i = 0; i < _contiguousNodes.Length; i++) { _contiguousNodes[i] = new OptimizedBvhNode(); } _curNodeIndex = 0; _rootNode = BuildTree(_leafNodes, 0, _leafNodes.Count); }
public TriangleMeshShape(StridingMeshInterface meshInterface) { this._meshInterface = meshInterface; RecalcLocalAabb(); }
public ConvexTriangleMeshShape(StridingMeshInterface meshInterface) { _stridingMesh = meshInterface; }
public BvhTriangleMeshShape(StridingMeshInterface meshInterface) : base(meshInterface) { _bvh.Build(meshInterface); }
public MyNodeOverlapCallback(ITriangleCallback callback, StridingMeshInterface meshInterface) { _meshInterface = meshInterface; _callback = callback; }