Bullet Collision Detection & Physics Library
Classes | Macros | Functions
gim_box_collision.h File Reference
#include "gim_basic_geometry_operations.h"
#include "LinearMath/btTransform.h"
Include dependency graph for gim_box_collision.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  GIM_BOX_BOX_TRANSFORM_CACHE
 Class for transforming a model1 to the space of model0. More...
 
class  GIM_AABB
 Axis aligned box. More...
 

Macros

#define TEST_CROSS_EDGE_BOX_MCR(edge, absolute_edge, pointa, pointb, _extend, i_dir_0, i_dir_1, i_comp_0, i_comp_1)
 
#define TEST_CROSS_EDGE_BOX_X_AXIS_MCR(edge, absolute_edge, pointa, pointb, _extend)
 
#define TEST_CROSS_EDGE_BOX_Y_AXIS_MCR(edge, absolute_edge, pointa, pointb, _extend)
 
#define TEST_CROSS_EDGE_BOX_Z_AXIS_MCR(edge, absolute_edge, pointa, pointb, _extend)
 
#define BOX_PLANE_EPSILON   0.000001f
 

Functions

bool btCompareTransformsEqual (const btTransform &t1, const btTransform &t2)
 Compairison of transformation objects. More...
 

Detailed Description

Author
Francisco Leon Najera

Definition in file gim_box_collision.h.

Macro Definition Documentation

◆ BOX_PLANE_EPSILON

#define BOX_PLANE_EPSILON   0.000001f

Definition at line 191 of file gim_box_collision.h.

◆ TEST_CROSS_EDGE_BOX_MCR

#define TEST_CROSS_EDGE_BOX_MCR (   edge,
  absolute_edge,
  pointa,
  pointb,
  _extend,
  i_dir_0,
  i_dir_1,
  i_comp_0,
  i_comp_1 
)
Value:
{ \
const btScalar dir0 = -edge[i_dir_0]; \
const btScalar dir1 = edge[i_dir_1]; \
btScalar pmin = pointa[i_comp_0] * dir0 + pointa[i_comp_1] * dir1; \
btScalar pmax = pointb[i_comp_0] * dir0 + pointb[i_comp_1] * dir1; \
if (pmin > pmax) \
{ \
GIM_SWAP_NUMBERS(pmin, pmax); \
} \
const btScalar abs_dir0 = absolute_edge[i_dir_0]; \
const btScalar abs_dir1 = absolute_edge[i_dir_1]; \
const btScalar rad = _extend[i_comp_0] * abs_dir0 + _extend[i_comp_1] * abs_dir1; \
if (pmin > rad || -rad > pmax) return false; \
}
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition: btScalar.h:314

Definition at line 100 of file gim_box_collision.h.

◆ TEST_CROSS_EDGE_BOX_X_AXIS_MCR

#define TEST_CROSS_EDGE_BOX_X_AXIS_MCR (   edge,
  absolute_edge,
  pointa,
  pointb,
  _extend 
)
Value:
{ \
TEST_CROSS_EDGE_BOX_MCR(edge, absolute_edge, pointa, pointb, _extend, 2, 1, 1, 2); \
}

Definition at line 118 of file gim_box_collision.h.

◆ TEST_CROSS_EDGE_BOX_Y_AXIS_MCR

#define TEST_CROSS_EDGE_BOX_Y_AXIS_MCR (   edge,
  absolute_edge,
  pointa,
  pointb,
  _extend 
)
Value:
{ \
TEST_CROSS_EDGE_BOX_MCR(edge, absolute_edge, pointa, pointb, _extend, 0, 2, 2, 0); \
}

Definition at line 123 of file gim_box_collision.h.

◆ TEST_CROSS_EDGE_BOX_Z_AXIS_MCR

#define TEST_CROSS_EDGE_BOX_Z_AXIS_MCR (   edge,
  absolute_edge,
  pointa,
  pointb,
  _extend 
)
Value:
{ \
TEST_CROSS_EDGE_BOX_MCR(edge, absolute_edge, pointa, pointb, _extend, 1, 0, 0, 1); \
}

Definition at line 128 of file gim_box_collision.h.

Function Documentation

◆ btCompareTransformsEqual()

bool btCompareTransformsEqual ( const btTransform t1,
const btTransform t2 
)
inline

Compairison of transformation objects.

Definition at line 567 of file gim_box_collision.h.