diff --git a/src/otbullet/discrete_dynamics_world.cpp b/src/otbullet/discrete_dynamics_world.cpp index 64dcd7ea21..d888fd2e09 100644 --- a/src/otbullet/discrete_dynamics_world.cpp +++ b/src/otbullet/discrete_dynamics_world.cpp @@ -314,8 +314,7 @@ namespace ot { get_obb(internal_obj_wrapper.getCollisionShape(), internal_obj_wrapper.getWorldTransform(), _from, _basis); - //if(!_sphere_intersect(_context, _from , _rad , _lod_dim, _triangles, _trees)) { - _relocation_offset = _tb_cache.get_array().ptr(); + //_relocation_offset = _tb_cache.get_array().ptr(); bool is_above_tm = false; @@ -323,14 +322,14 @@ namespace ot { DASSERT(_tree_batches.size() == 0); continue; } - +/* if (_relocation_offset != _tb_cache.get_array().ptr()) { coidlog_warning("discrete_dynamics_world", "Tree baches slot allocator rebased. Tree batches count: " << _tb_cache.count()); repair_tree_batches(); repair_tree_collision_pairs(); - } + }*/ - tri_count += _triangles.size(); + tri_count += uint(_triangles.size()); if (_triangles.size() > 0) { @@ -549,7 +548,7 @@ namespace ot { aabb_half[1] = dst_basis[1].dot(src_basis[0]) + dst_basis[0].dot(src_basis[1]) + dst_basis[0].dot(src_basis[2]); aabb_half[2] = dst_basis[2].dot(src_basis[0]) + dst_basis[0].dot(src_basis[1]) + dst_basis[0].dot(src_basis[2]); } - +/* void discrete_dynamics_world::repair_tree_collision_pairs() { _tree_collision_pairs.for_each([&](tree_collision_pair& tcp) { @@ -572,7 +571,7 @@ namespace ot { } } }); - } + }*/ bt::tree_collision_info * discrete_dynamics_world::get_tree_collision_info(const tree_collision_pair& tcp) { @@ -667,7 +666,7 @@ namespace ot { , _debug_terrain_triangles(1024) , _debug_trees(1024) , _tb_cache(1024) - , _relocation_offset(0) + //, _relocation_offset(0) { btTriangleShape * ts = new btTriangleShape(); ts->setMargin(0.0f); diff --git a/src/otbullet/discrete_dynamics_world.h b/src/otbullet/discrete_dynamics_world.h index f6bf874c97..89f32d126f 100644 --- a/src/otbullet/discrete_dynamics_world.h +++ b/src/otbullet/discrete_dynamics_world.h @@ -155,7 +155,7 @@ class discrete_dynamics_world : public btDiscreteDynamicsWorld coid::dynarray _triangles; coid::slotalloc _tb_cache; - void * _relocation_offset; + //void * _relocation_offset; coid::dynarray _tree_batches;