Bullet Collision Detection & Physics Library: btGeometryOperations.h File Reference

Bullet Collision Detection & Physics Library

Macros | Functions
btGeometryOperations.h File Reference
`#include "btBoxCollision.h"`
Include dependency graph for btGeometryOperations.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Macros
#define | PLANEDIREPSILON 0.0000001f
#define | PARALELENORMALS 0.000001f
#define | BT_CLAMP(number, minval, maxval) (number < minval ? minval : (number > maxval ? maxval : number))

## Functions
void | bt_edge_plane (const btVector3 &e1, const btVector3 &e2, const btVector3 &normal, btVector4 &plane)
| Calc a plane from a triangle edge an a normal. plane is a vec4f. More...
void | bt_closest_point_on_segment (btVector3 &cp, const btVector3 &v, const btVector3 &e1, const btVector3 &e2)
int | bt_line_plane_collision (const btVector4 &plane, const btVector3 &vDir, const btVector3 &vPoint, btVector3 &pout, btScalar &tparam, btScalar tmin, btScalar tmax)
| line plane collision More...
void | bt_segment_collision (const btVector3 &vA1, const btVector3 &vA2, const btVector3 &vB1, const btVector3 &vB2, btVector3 &vPointA, btVector3 &vPointB)
| Find closest points on segments. More...

## Detailed Description

Author
  Francisco Leon Najera

Definition in file btGeometryOperations.h.

## Macro Definition Documentation

## ◆ BT_CLAMP

#define BT_CLAMP | ( |  | number,
|  |  | minval,
|  |  | maxval
| ) |  | (number < minval ? minval : (number > maxval ? maxval : number))

Definition at line 33 of file btGeometryOperations.h.

## ◆ PARALELENORMALS

#define PARALELENORMALS 0.000001f

Definition at line 31 of file btGeometryOperations.h.

## ◆ PLANEDIREPSILON

#define PLANEDIREPSILON 0.0000001f

Definition at line 30 of file btGeometryOperations.h.

## Function Documentation

## ◆ bt_closest_point_on_segment()

void bt_closest_point_on_segment | ( | btVector3 & | cp,
|  | const btVector3 & | v,
|  | const btVector3 & | e1,
|  | const btVector3 & | e2
| ) |  |
| inline

Finds the closest point(cp) to (v) on a segment (e1,e2)

Definition at line 47 of file btGeometryOperations.h.

## ◆ bt_edge_plane()

void bt_edge_plane | ( | const btVector3 & | e1,
|  | const btVector3 & | e2,
|  | const btVector3 & | normal,
|  | btVector4 & | plane
| ) |  |
| inline

Calc a plane from a triangle edge an a normal. plane is a vec4f.

Definition at line 36 of file btGeometryOperations.h.

## ◆ bt_line_plane_collision()

int bt_line_plane_collision | ( | const btVector4 & | plane,
|  | const btVector3 & | vDir,
|  | const btVector3 & | vPoint,
|  | btVector3 & | pout,
|  | btScalar & | tparam,
|  | btScalar | tmin,
|  | btScalar | tmax
| ) |  |
| inline

line plane collision

Returns
  -0 if the ray never intersects -1 if the ray collides in front -2 if the ray collides in back

Definition at line 76 of file btGeometryOperations.h.

## ◆ bt_segment_collision()

void bt_segment_collision | ( | const btVector3 & | vA1,
|  | const btVector3 & | vA2,
|  | const btVector3 & | vB1,
|  | const btVector3 & | vB2,
|  | btVector3 & | vPointA,
|  | btVector3 & | vPointB
| ) |  |
| inline

Find closest points on segments.

Definition at line 111 of file btGeometryOperations.h.