#include <OpenTissue/configuration.h>
#include <OpenTissue/core/math/math_coordsys.h>
#include <OpenTissue/core/math/math_constants.h>
#include <OpenTissue/core/math/math_precision.h>
#include <OpenTissue/core/geometry/geometry_compute_closest_points_line_line.h>
#include <OpenTissue/collision/intersect/intersect_rect_quad.h>
Go to the source code of this file.
Namespaces |
namespace | OpenTissue |
namespace | OpenTissue::collision |
Defines |
#define | TST(expr1, expr2, norm, axis_code) |
#define | TST(expr1, expr2, nx, ny, nz, axis_code) |
Functions |
template<typename real_type , typename vector3_type , typename matrix3x3_type > |
unsigned int | OpenTissue::collision::box_box (vector3_type p_a, matrix3x3_type R_a, vector3_type const &a, vector3_type p_b, matrix3x3_type R_b, vector3_type const &b, real_type const &envelope, vector3_type *p, vector3_type &n, real_type *distances) |
Define Documentation
#define TST |
( |
|
expr1, |
|
|
|
expr2, |
|
|
|
norm, |
|
|
|
axis_code | |
|
) |
| | |
Value:separation = fabs(expr1) - (expr2); \
if (separation > 0) return 0; \
if (separation > distance) { \
distance = separation; \
normal = norm; \
flip_normal = ((expr1) < 0); \
code = (axis_code); \
}
#define TST |
( |
|
expr1, |
|
|
|
expr2, |
|
|
|
nx, |
|
|
|
ny, |
|
|
|
nz, |
|
|
|
axis_code | |
|
) |
| | |
Value:separation = fabs(expr1) - (expr2); \
if (separation > 0) return 0; \
length = sqrt ((nx)*(nx) + (ny)*(ny) + (nz)*(nz)); \
if (length > 0) { \
separation /= length; \
if (separation*fudge_factor > distance) { \
distance = separation; \
normal(0) = (nx)/length; normal(1) = (ny)/length; normal(2) = (nz)/length; \
flip_normal = ((expr1) < 0); \
code = (axis_code); \
} \
}