Bullet Collision Detection & Physics Library
gim_box_set.h
Go to the documentation of this file.
1 #ifndef GIM_BOX_SET_H_INCLUDED
2 #define GIM_BOX_SET_H_INCLUDED
3 
7 /*
8 -----------------------------------------------------------------------------
9 This source file is part of GIMPACT Library.
10 
11 For the latest info, see http://gimpact.sourceforge.net/
12 
13 Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371.
14 email: projectileman@yahoo.com
15 
16  This library is free software; you can redistribute it and/or
17  modify it under the terms of EITHER:
18  (1) The GNU Lesser General Public License as published by the Free
19  Software Foundation; either version 2.1 of the License, or (at
20  your option) any later version. The text of the GNU Lesser
21  General Public License is included with this library in the
22  file GIMPACT-LICENSE-LGPL.TXT.
23  (2) The BSD-style license that is included with this library in
24  the file GIMPACT-LICENSE-BSD.TXT.
25  (3) The zlib/libpng license that is included with this library in
26  the file GIMPACT-LICENSE-ZLIB.TXT.
27 
28  This library is distributed in the hope that it will be useful,
29  but WITHOUT ANY WARRANTY; without even the implied warranty of
30  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
31  GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details.
32 
33 -----------------------------------------------------------------------------
34 */
35 
36 #include "gim_array.h"
37 #include "gim_radixsort.h"
38 #include "gim_box_collision.h"
39 #include "gim_tri_collision.h"
40 
42 struct GIM_PAIR
43 {
47  {
48  }
49 
50  GIM_PAIR(const GIM_PAIR& p)
51  {
52  m_index1 = p.m_index1;
53  m_index2 = p.m_index2;
54  }
55 
56  GIM_PAIR(GUINT index1, GUINT index2)
57  {
58  m_index1 = index1;
59  m_index2 = index2;
60  }
61 };
62 
64 class gim_pair_set : public gim_array<GIM_PAIR>
65 {
66 public:
68  {
69  }
70  inline void push_pair(GUINT index1, GUINT index2)
71  {
72  push_back(GIM_PAIR(index1, index2));
73  }
74 
75  inline void push_pair_inv(GUINT index1, GUINT index2)
76  {
77  push_back(GIM_PAIR(index2, index1));
78  }
79 };
80 
82 
88 {
89 public:
92  virtual bool is_trimesh() = 0;
93  virtual GUINT get_primitive_count() = 0;
94  virtual void get_primitive_box(GUINT prim_index, GIM_AABB& primbox) = 0;
95  virtual void get_primitive_triangle(GUINT prim_index, GIM_TRIANGLE& triangle) = 0;
96 };
97 
99 {
102 };
103 
106 {
112 
114  {
115  m_left = 0;
116  m_right = 0;
117  m_escapeIndex = 0;
118  m_data = 0;
119  }
120 
122  {
123  return (!m_left && !m_right);
124  }
125 };
126 
129 {
130 protected:
133 
134 protected:
136  gim_array<GIM_AABB_DATA>& primitive_boxes,
137  GUINT startIndex, GUINT endIndex, GUINT splitAxis);
138 
139  GUINT _calc_splitting_axis(gim_array<GIM_AABB_DATA>& primitive_boxes, GUINT startIndex, GUINT endIndex);
140 
141  void _build_sub_tree(gim_array<GIM_AABB_DATA>& primitive_boxes, GUINT startIndex, GUINT endIndex);
142 
143 public:
145  {
146  m_num_nodes = 0;
147  }
148 
151  void build_tree(gim_array<GIM_AABB_DATA>& primitive_boxes);
152 
154  {
156  m_num_nodes = 0;
157  }
158 
161  {
162  return m_num_nodes;
163  }
164 
166  SIMD_FORCE_INLINE bool isLeafNode(GUINT nodeindex) const
167  {
168  return m_node_array[nodeindex].is_leaf_node();
169  }
170 
172  {
173  return m_node_array[nodeindex].m_data;
174  }
175 
176  SIMD_FORCE_INLINE void getNodeBound(GUINT nodeindex, GIM_AABB& bound) const
177  {
178  bound = m_node_array[nodeindex].m_bound;
179  }
180 
181  SIMD_FORCE_INLINE void setNodeBound(GUINT nodeindex, const GIM_AABB& bound)
182  {
183  m_node_array[nodeindex].m_bound = bound;
184  }
185 
187  {
188  return m_node_array[nodeindex].m_left;
189  }
190 
192  {
193  return m_node_array[nodeindex].m_right;
194  }
195 
197  {
198  return m_node_array[nodeindex].m_escapeIndex;
199  }
200 
202 };
203 
205 
210 template <typename _GIM_PRIMITIVE_MANAGER_PROTOTYPE, typename _GIM_BOX_TREE_PROTOTYPE>
212 {
213 protected:
214  _GIM_PRIMITIVE_MANAGER_PROTOTYPE m_primitive_manager;
215  _GIM_BOX_TREE_PROTOTYPE m_box_tree;
216 
217 protected:
218  //stackless refit
220  {
221  GUINT nodecount = getNodeCount();
222  while (nodecount--)
223  {
224  if (isLeafNode(nodecount))
225  {
226  GIM_AABB leafbox;
227  m_primitive_manager.get_primitive_box(getNodeData(nodecount), leafbox);
228  setNodeBound(nodecount, leafbox);
229  }
230  else
231  {
232  //get left bound
233  GUINT childindex = getLeftNodeIndex(nodecount);
234  GIM_AABB bound;
235  getNodeBound(childindex, bound);
236  //get right bound
237  childindex = getRightNodeIndex(nodecount);
238  GIM_AABB bound2;
239  getNodeBound(childindex, bound2);
240  bound.merge(bound2);
241 
242  setNodeBound(nodecount, bound);
243  }
244  }
245  }
246 
247 public:
249  {
250  }
251 
253  {
254  GIM_AABB totalbox;
255  getNodeBound(0, totalbox);
256  return totalbox;
257  }
258 
259  SIMD_FORCE_INLINE void setPrimitiveManager(const _GIM_PRIMITIVE_MANAGER_PROTOTYPE& primitive_manager)
260  {
261  m_primitive_manager = primitive_manager;
262  }
263 
264  const _GIM_PRIMITIVE_MANAGER_PROTOTYPE& getPrimitiveManager() const
265  {
266  return m_primitive_manager;
267  }
268 
269  _GIM_PRIMITIVE_MANAGER_PROTOTYPE& getPrimitiveManager()
270  {
271  return m_primitive_manager;
272  }
273 
276 
279  {
280  refit();
281  }
282 
285  {
286  //obtain primitive boxes
287  gim_array<GIM_AABB_DATA> primitive_boxes;
288  primitive_boxes.resize(m_primitive_manager.get_primitive_count(), false);
289 
290  for (GUINT i = 0; i < primitive_boxes.size(); i++)
291  {
292  m_primitive_manager.get_primitive_box(i, primitive_boxes[i].m_bound);
293  primitive_boxes[i].m_data = i;
294  }
295 
296  m_box_tree.build_tree(primitive_boxes);
297  }
298 
300  SIMD_FORCE_INLINE bool boxQuery(const GIM_AABB& box, gim_array<GUINT>& collided_results) const
301  {
302  GUINT curIndex = 0;
303  GUINT numNodes = getNodeCount();
304 
305  while (curIndex < numNodes)
306  {
307  GIM_AABB bound;
308  getNodeBound(curIndex, bound);
309 
310  //catch bugs in tree data
311 
312  bool aabbOverlap = bound.has_collision(box);
313  bool isleafnode = isLeafNode(curIndex);
314 
315  if (isleafnode && aabbOverlap)
316  {
317  collided_results.push_back(getNodeData(curIndex));
318  }
319 
320  if (aabbOverlap || isleafnode)
321  {
322  //next subnode
323  curIndex++;
324  }
325  else
326  {
327  //skip node
328  curIndex += getScapeNodeIndex(curIndex);
329  }
330  }
331  if (collided_results.size() > 0) return true;
332  return false;
333  }
334 
337  const btTransform& transform, gim_array<GUINT>& collided_results) const
338  {
339  GIM_AABB transbox = box;
340  transbox.appy_transform(transform);
341  return boxQuery(transbox, collided_results);
342  }
343 
346  const btVector3& ray_dir, const btVector3& ray_origin,
347  gim_array<GUINT>& collided_results) const
348  {
349  GUINT curIndex = 0;
350  GUINT numNodes = getNodeCount();
351 
352  while (curIndex < numNodes)
353  {
354  GIM_AABB bound;
355  getNodeBound(curIndex, bound);
356 
357  //catch bugs in tree data
358 
359  bool aabbOverlap = bound.collide_ray(ray_origin, ray_dir);
360  bool isleafnode = isLeafNode(curIndex);
361 
362  if (isleafnode && aabbOverlap)
363  {
364  collided_results.push_back(getNodeData(curIndex));
365  }
366 
367  if (aabbOverlap || isleafnode)
368  {
369  //next subnode
370  curIndex++;
371  }
372  else
373  {
374  //skip node
375  curIndex += getScapeNodeIndex(curIndex);
376  }
377  }
378  if (collided_results.size() > 0) return true;
379  return false;
380  }
381 
384  {
385  return true;
386  }
387 
390  {
391  return m_primitive_manager.is_trimesh();
392  }
393 
396  {
397  return m_box_tree.getNodeCount();
398  }
399 
401  SIMD_FORCE_INLINE bool isLeafNode(GUINT nodeindex) const
402  {
403  return m_box_tree.isLeafNode(nodeindex);
404  }
405 
407  {
408  return m_box_tree.getNodeData(nodeindex);
409  }
410 
411  SIMD_FORCE_INLINE void getNodeBound(GUINT nodeindex, GIM_AABB& bound) const
412  {
413  m_box_tree.getNodeBound(nodeindex, bound);
414  }
415 
416  SIMD_FORCE_INLINE void setNodeBound(GUINT nodeindex, const GIM_AABB& bound)
417  {
418  m_box_tree.setNodeBound(nodeindex, bound);
419  }
420 
422  {
423  return m_box_tree.getLeftNodeIndex(nodeindex);
424  }
425 
427  {
428  return m_box_tree.getRightNodeIndex(nodeindex);
429  }
430 
432  {
433  return m_box_tree.getScapeNodeIndex(nodeindex);
434  }
435 
436  SIMD_FORCE_INLINE void getNodeTriangle(GUINT nodeindex, GIM_TRIANGLE& triangle) const
437  {
438  m_primitive_manager.get_primitive_triangle(getNodeData(nodeindex), triangle);
439  }
440 };
441 
443 
446 template <typename _GIM_PRIMITIVE_MANAGER_PROTOTYPE>
447 class GIM_BOX_TREE_SET : public GIM_BOX_TREE_TEMPLATE_SET<_GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE>
448 {
449 public:
450 };
451 
453 template <typename BOX_SET_CLASS0, typename BOX_SET_CLASS1>
455 {
456 public:
458  BOX_SET_CLASS0* m_boxset0;
459  BOX_SET_CLASS1* m_boxset1;
476 
477 public:
479  {
482  }
483 
484 protected:
486  {
487  if (node0_has_triangle) return;
488  m_boxset0->getNodeTriangle(node0, m_tri0);
489  //transform triangle
494 
495  node0_has_triangle = true;
496  }
497 
499  {
500  if (node1_has_triangle) return;
501  m_boxset1->getNodeTriangle(node1, m_tri1);
502  //transform triangle
507 
508  node1_has_triangle = true;
509  }
510 
512  {
513  if (node0 == current_node0) return;
514  m_boxset0->getNodeBound(node0, m_box0);
515  node0_is_leaf = m_boxset0->isLeafNode(node0);
516  node0_has_triangle = false;
517  current_node0 = node0;
518  }
519 
521  {
522  if (node1 == current_node1) return;
523  m_boxset1->getNodeBound(node1, m_box1);
524  node1_is_leaf = m_boxset1->isLeafNode(node1);
525  node1_has_triangle = false;
526  current_node1 = node1;
527  }
528 
530  {
531  retrieve_node0_info(node0);
532  retrieve_node1_info(node1);
534  if (!result) return false;
535 
537  {
538  //perform primitive vs box collision
540  //do triangle vs box collision
542 
545 
547 
548  if (!result) return false;
549  return true;
550  }
551  else if (t1_is_trimesh && node1_is_leaf)
552  {
553  //perform primitive vs box collision
555  //do triangle vs box collision
557 
560 
562 
563  if (!result) return false;
564  return true;
565  }
566  return true;
567  }
568 
569  //stackless collision routine
571  {
572  gim_pair_set stack_collisions;
573  stack_collisions.reserve(32);
574 
575  //add the first pair
576  stack_collisions.push_pair(0, 0);
577 
578  while (stack_collisions.size())
579  {
580  //retrieve the last pair and pop
581  GUINT node0 = stack_collisions.back().m_index1;
582  GUINT node1 = stack_collisions.back().m_index2;
583  stack_collisions.pop_back();
584  if (node_collision(node0, node1)) // a collision is found
585  {
586  if (node0_is_leaf)
587  {
588  if (node1_is_leaf)
589  {
590  m_collision_pairs->push_pair(m_boxset0->getNodeData(node0), m_boxset1->getNodeData(node1));
591  }
592  else
593  {
594  //collide left
595  stack_collisions.push_pair(node0, m_boxset1->getLeftNodeIndex(node1));
596 
597  //collide right
598  stack_collisions.push_pair(node0, m_boxset1->getRightNodeIndex(node1));
599  }
600  }
601  else
602  {
603  if (node1_is_leaf)
604  {
605  //collide left
606  stack_collisions.push_pair(m_boxset0->getLeftNodeIndex(node0), node1);
607  //collide right
608  stack_collisions.push_pair(m_boxset0->getRightNodeIndex(node0), node1);
609  }
610  else
611  {
612  GUINT left0 = m_boxset0->getLeftNodeIndex(node0);
613  GUINT right0 = m_boxset0->getRightNodeIndex(node0);
614  GUINT left1 = m_boxset1->getLeftNodeIndex(node1);
615  GUINT right1 = m_boxset1->getRightNodeIndex(node1);
616  //collide left
617  stack_collisions.push_pair(left0, left1);
618  //collide right
619  stack_collisions.push_pair(left0, right1);
620  //collide left
621  stack_collisions.push_pair(right0, left1);
622  //collide right
623  stack_collisions.push_pair(right0, right1);
624 
625  } // else if node1 is not a leaf
626  } // else if node0 is not a leaf
627 
628  } // if(node_collision(node0,node1))
629  } //while(stack_collisions.size())
630  }
631 
632 public:
633  void find_collision(BOX_SET_CLASS0* boxset1, const btTransform& trans1,
634  BOX_SET_CLASS1* boxset2, const btTransform& trans2,
635  gim_pair_set& collision_pairs, bool complete_primitive_tests = true)
636  {
637  m_collision_pairs = &collision_pairs;
638  m_boxset0 = boxset1;
639  m_boxset1 = boxset2;
640 
641  trans_cache_1to0.calc_from_homogenic(trans1, trans2);
642 
643  trans_cache_0to1 = trans2.inverse();
644  trans_cache_0to1 *= trans1;
645 
646  if (complete_primitive_tests)
647  {
648  t0_is_trimesh = boxset1->getPrimitiveManager().is_trimesh();
649  t1_is_trimesh = boxset2->getPrimitiveManager().is_trimesh();
650  }
651  else
652  {
653  t0_is_trimesh = false;
654  t1_is_trimesh = false;
655  }
656 
658  }
659 };
660 
661 #endif // GIM_BOXPRUNING_H_INCLUDED
void find_collision(BOX_SET_CLASS0 *boxset1, const btTransform &trans1, BOX_SET_CLASS1 *boxset2, const btTransform &trans2, gim_pair_set &collision_pairs, bool complete_primitive_tests=true)
Definition: gim_box_set.h:633
_GIM_PRIMITIVE_MANAGER_PROTOTYPE m_primitive_manager
Definition: gim_box_set.h:214
GUINT m_data
primitive index if apply
Definition: gim_box_set.h:111
BOX_SET_CLASS0 * m_boxset0
Definition: gim_box_set.h:458
void build_tree(gim_array< GIM_AABB_DATA > &primitive_boxes)
prototype functions for box tree management
Class for Box Tree Sets.
Definition: gim_box_set.h:447
GUINT m_right
Right subtree.
Definition: gim_box_set.h:109
bool boxQuery(const GIM_AABB &box, gim_array< GUINT > &collided_results) const
returns the indices of the primitives in the m_primitive_manager
Definition: gim_box_set.h:300
void getNodeBound(GUINT nodeindex, GIM_AABB &bound) const
Definition: gim_box_set.h:176
void push_pair(GUINT index1, GUINT index2)
Definition: gim_box_set.h:70
GUINT getNodeData(GUINT nodeindex) const
Definition: gim_box_set.h:171
bool node_collision(GUINT node0, GUINT node1)
Definition: gim_box_set.h:529
BOX_SET_CLASS1 * m_boxset1
Definition: gim_box_set.h:459
GUINT m_left
Left subtree.
Definition: gim_box_set.h:108
void pop_back()
Definition: gim_array.h:234
void clearNodes()
Definition: gim_box_set.h:153
void calc_from_homogenic(const btTransform &trans0, const btTransform &trans1)
Calc the transformation relative 1 to 0. Inverts matrics by transposing.
GIM_PAIR(GUINT index1, GUINT index2)
Definition: gim_box_set.h:56
#define G_UINT_INFINITY
A very very high value.
Definition: gim_math.h:53
T & back()
Definition: gim_array.h:198
GUINT getScapeNodeIndex(GUINT nodeindex) const
Definition: gim_box_set.h:196
GIM_BOX_SET collision methods.
Definition: gim_box_set.h:454
void buildSet()
this rebuild the entire set
Definition: gim_box_set.h:284
bool rayQuery(const btVector3 &ray_dir, const btVector3 &ray_origin, gim_array< GUINT > &collided_results) const
returns the indices of the primitives in the m_primitive_manager
Definition: gim_box_set.h:345
btVector3 m_vertices[3]
#define SIMD_FORCE_INLINE
Definition: btScalar.h:83
GUINT getRightNodeIndex(GUINT nodeindex) const
Definition: gim_box_set.h:426
const _GIM_PRIMITIVE_MANAGER_PROTOTYPE & getPrimitiveManager() const
Definition: gim_box_set.h:264
void getNodeBound(GUINT nodeindex, GIM_AABB &bound) const
Definition: gim_box_set.h:411
GUINT getNodeCount() const
node count
Definition: gim_box_set.h:395
Axis aligned box.
void resize(GUINT size, bool call_constructor=true, const T &fillData=T())
Definition: gim_array.h:287
void setPrimitiveManager(const _GIM_PRIMITIVE_MANAGER_PROTOTYPE &primitive_manager)
Definition: gim_box_set.h:259
A pairset array.
Definition: gim_box_set.h:64
virtual ~GIM_PRIMITIVE_MANAGER_PROTOTYPE()
Definition: gim_box_set.h:90
void retrieve_node0_triangle(GUINT node0)
Definition: gim_box_set.h:485
_GIM_PRIMITIVE_MANAGER_PROTOTYPE & getPrimitiveManager()
Definition: gim_box_set.h:269
GUINT m_num_nodes
Definition: gim_box_set.h:131
bool collide_ray(const btVector3 &vorigin, const btVector3 &vdir)
Finds the Ray intersection parameter.
void clear()
Definition: gim_array.h:110
T * m_data
properties
Definition: gim_array.h:47
GUINT getNodeCount() const
node count
Definition: gim_box_set.h:160
GUINT getLeftNodeIndex(GUINT nodeindex) const
Definition: gim_box_set.h:421
bool has_collision(const GIM_AABB &other) const
GUINT m_escapeIndex
Scape index for traversing.
Definition: gim_box_set.h:110
virtual GUINT get_primitive_count()=0
_GIM_BOX_TREE_PROTOTYPE m_box_tree
Definition: gim_box_set.h:215
void getNodeTriangle(GUINT nodeindex, GIM_TRIANGLE &triangle) const
Definition: gim_box_set.h:436
Class for colliding triangles.
void update()
node manager prototype functions
Definition: gim_box_set.h:278
void get_plane(btVector4 &plane) const
GUINT getRightNodeIndex(GUINT nodeindex) const
Definition: gim_box_set.h:191
void retrieve_node1_info(GUINT node1)
Definition: gim_box_set.h:520
Very simple array container with fast access and simd memory.
Definition: gim_array.h:42
void setNodeBound(GUINT nodeindex, const GIM_AABB &bound)
Definition: gim_box_set.h:416
bool is_leaf_node() const
Definition: gim_box_set.h:121
GIM_AABB m_bound
Definition: gim_box_set.h:100
bool isTrimesh() const
tells if this set is a trimesh
Definition: gim_box_set.h:389
GUINT size() const
Definition: gim_array.h:143
GUINT m_index2
Definition: gim_box_set.h:45
Basic Box tree structure.
Definition: gim_box_set.h:128
GIM_BOX_BOX_TRANSFORM_CACHE trans_cache_1to0
Definition: gim_box_set.h:470
btVector3 can be used to represent 3D points and vectors.
Definition: btVector3.h:80
GUINT getNodeData(GUINT nodeindex) const
Definition: gim_box_set.h:406
void push_pair_inv(GUINT index1, GUINT index2)
Definition: gim_box_set.h:75
bool overlapping_trans_cache(const GIM_AABB &box, const GIM_BOX_BOX_TRANSFORM_CACHE &transcache, bool fulltest)
transcache is the transformation cache from box to this AABB
virtual bool is_trimesh()=0
determines if this manager consist on only triangles, which special case will be optimized ...
The btTransform class supports rigid transforms with only translation and rotation and no scaling/she...
Definition: btTransform.h:28
GUINT getScapeNodeIndex(GUINT nodeindex) const
Definition: gim_box_set.h:431
void retrieve_node0_info(GUINT node0)
Definition: gim_box_set.h:511
GUINT _sort_and_calc_splitting_index(gim_array< GIM_AABB_DATA > &primitive_boxes, GUINT startIndex, GUINT endIndex, GUINT splitAxis)
Definition: gim_box_set.cpp:63
bool boxQueryTrans(const GIM_AABB &box, const btTransform &transform, gim_array< GUINT > &collided_results) const
returns the indices of the primitives in the m_primitive_manager
Definition: gim_box_set.h:336
gim_pair_set * m_collision_pairs
Definition: gim_box_set.h:457
GIM_PAIR(const GIM_PAIR &p)
Definition: gim_box_set.h:50
virtual void get_primitive_box(GUINT prim_index, GIM_AABB &primbox)=0
GUINT m_index1
Definition: gim_box_set.h:44
virtual void get_primitive_triangle(GUINT prim_index, GIM_TRIANGLE &triangle)=0
Class for transforming a model1 to the space of model0.
void appy_transform(const btTransform &trans)
Apply a transform to an AABB.
bool isLeafNode(GUINT nodeindex) const
tells if the node is a leaf
Definition: gim_box_set.h:401
Overlapping pair.
GUINT getLeftNodeIndex(GUINT nodeindex) const
Definition: gim_box_set.h:186
void retrieve_node1_triangle(GUINT node1)
Definition: gim_box_set.h:498
void setNodeBound(GUINT nodeindex, const GIM_AABB &bound)
Definition: gim_box_set.h:181
#define GUINT
Definition: gim_math.h:40
Generic Box Tree Template.
Definition: gim_box_set.h:211
GUINT _calc_splitting_axis(gim_array< GIM_AABB_DATA > &primitive_boxes, GUINT startIndex, GUINT endIndex)
Definition: gim_box_set.cpp:33
bool isLeafNode(GUINT nodeindex) const
tells if the node is a leaf
Definition: gim_box_set.h:166
gim_array< GIM_BOX_TREE_NODE > m_node_array
Definition: gim_box_set.h:132
Prototype Base class for primitive classification.
Definition: gim_box_set.h:87
bool hasHierarchy() const
tells if this set has hierarcht
Definition: gim_box_set.h:383
bool collide_triangle_exact(const btVector3 &p1, const btVector3 &p2, const btVector3 &p3, const btVector4 &triangle_plane)
test for a triangle, with edges
btVector3 transform(const btVector3 &point)
Node Structure for trees.
Definition: gim_box_set.h:105
bool reserve(GUINT size)
public operations
Definition: gim_array.h:96
btTransform inverse() const
Return the inverse of this transform.
Definition: btTransform.h:182
void push_back(const GIM_PAIR &obj)
Definition: gim_array.h:213
btTransform trans_cache_0to1
Definition: gim_box_set.h:471
void increment_margin(btScalar margin)
void merge(const GIM_AABB &box)
Merges a Box.
void _build_sub_tree(gim_array< GIM_AABB_DATA > &primitive_boxes, GUINT startIndex, GUINT endIndex)
GIM_AABB getGlobalBox() const
Definition: gim_box_set.h:252