Bullet Collision Detection & Physics Library
Classes | Macros | Typedefs | Functions | Variables
btConvexHull.cpp File Reference
#include <string.h>
#include "btConvexHull.h"
#include "btAlignedObjectArray.h"
#include "btMinMax.h"
#include "btVector3.h"
Include dependency graph for btConvexHull.cpp:

Go to the source code of this file.

Classes

class  int3
 
class  VertFlag
 
class  EdgeFlag
 
class  PlaneFlag
 
class  Coplanar
 
class  btHullTriangle
 

Macros

#define COPLANAR   (0)
 
#define UNDER   (1)
 
#define OVER   (2)
 
#define SPLIT   (OVER|UNDER)
 
#define PAPERWIDTH   (btScalar(0.001))
 
#define EPSILON   btScalar(0.000001) /* close enough to consider two btScalaring point numbers to be 'the same'. */
 

Typedefs

typedef ConvexH::HalfEdge HalfEdge
 

Functions

btPlane PlaneFlip (const btPlane &plane)
 
int operator== (const btPlane &a, const btPlane &b)
 
int coplanar (const btPlane &a, const btPlane &b)
 
btVector3 PlaneLineIntersection (const btPlane &plane, const btVector3 &p0, const btVector3 &p1)
 
btVector3 PlaneProject (const btPlane &plane, const btVector3 &point)
 
btVector3 ThreePlaneIntersection (const btPlane &p0, const btPlane &p1, const btPlane &p2)
 
btScalar DistanceBetweenLines (const btVector3 &ustart, const btVector3 &udir, const btVector3 &vstart, const btVector3 &vdir, btVector3 *upoint=NULL, btVector3 *vpoint=NULL)
 
btVector3 TriNormal (const btVector3 &v0, const btVector3 &v1, const btVector3 &v2)
 
btVector3 NormalOf (const btVector3 *vert, const int n)
 
int PlaneTest (const btPlane &p, const btVector3 &v)
 
int SplitTest (ConvexH &convex, const btPlane &plane)
 
template<class T >
int maxdirfiltered (const T *p, int count, const T &dir, btAlignedObjectArray< int > &allow)
 
btVector3 orth (const btVector3 &v)
 
template<class T >
int maxdirsterid (const T *p, int count, const T &dir, btAlignedObjectArray< int > &allow)
 
int operator== (const int3 &a, const int3 &b)
 
int above (btVector3 *vertices, const int3 &t, const btVector3 &p, btScalar epsilon)
 
int hasedge (const int3 &t, int a, int b)
 
int hasvert (const int3 &t, int v)
 
int shareedge (const int3 &a, const int3 &b)
 
void ReleaseHull (PHullResult &result)
 
static void addPoint (unsigned int &vcount, btVector3 *p, btScalar x, btScalar y, btScalar z)
 
btScalar GetDist (btScalar px, btScalar py, btScalar pz, const btScalar *p2)
 

Variables

btScalar planetestepsilon = PAPERWIDTH
 

Macro Definition Documentation

#define COPLANAR   (0)

Definition at line 144 of file btConvexHull.cpp.

#define EPSILON   btScalar(0.000001) /* close enough to consider two btScalaring point numbers to be 'the same'. */
#define OVER   (2)

Definition at line 146 of file btConvexHull.cpp.

#define PAPERWIDTH   (btScalar(0.001))

Definition at line 148 of file btConvexHull.cpp.

#define SPLIT   (OVER|UNDER)

Definition at line 147 of file btConvexHull.cpp.

#define UNDER   (1)

Definition at line 145 of file btConvexHull.cpp.

Typedef Documentation

Definition at line 154 of file btConvexHull.cpp.

Function Documentation

int above ( btVector3 vertices,
const int3 t,
const btVector3 p,
btScalar  epsilon 
)

Definition at line 306 of file btConvexHull.cpp.

static void addPoint ( unsigned int &  vcount,
btVector3 p,
btScalar  x,
btScalar  y,
btScalar  z 
)
static

Definition at line 832 of file btConvexHull.cpp.

int coplanar ( const btPlane a,
const btPlane b 
)
inline

Definition at line 45 of file btConvexHull.cpp.

btScalar DistanceBetweenLines ( const btVector3 ustart,
const btVector3 udir,
const btVector3 vstart,
const btVector3 vdir,
btVector3 upoint = NULL,
btVector3 vpoint = NULL 
)

Definition at line 113 of file btConvexHull.cpp.

btScalar GetDist ( btScalar  px,
btScalar  py,
btScalar  pz,
const btScalar p2 
)

Definition at line 843 of file btConvexHull.cpp.

int hasedge ( const int3 t,
int  a,
int  b 
)

Definition at line 312 of file btConvexHull.cpp.

int hasvert ( const int3 t,
int  v 
)

Definition at line 322 of file btConvexHull.cpp.

template<class T >
int maxdirfiltered ( const T *  p,
int  count,
const T &  dir,
btAlignedObjectArray< int > &  allow 
)

Definition at line 217 of file btConvexHull.cpp.

template<class T >
int maxdirsterid ( const T *  p,
int  count,
const T &  dir,
btAlignedObjectArray< int > &  allow 
)

Definition at line 246 of file btConvexHull.cpp.

btVector3 NormalOf ( const btVector3 vert,
const int  n 
)
int operator== ( const btPlane a,
const btPlane b 
)
inline

Definition at line 44 of file btConvexHull.cpp.

int operator== ( const int3 a,
const int3 b 
)

Definition at line 295 of file btConvexHull.cpp.

btVector3 orth ( const btVector3 v)

Definition at line 232 of file btConvexHull.cpp.

btPlane PlaneFlip ( const btPlane plane)
inline

Definition at line 43 of file btConvexHull.cpp.

btVector3 PlaneLineIntersection ( const btPlane plane,
const btVector3 p0,
const btVector3 p1 
)

Definition at line 87 of file btConvexHull.cpp.

btVector3 PlaneProject ( const btPlane plane,
const btVector3 point 
)

Definition at line 97 of file btConvexHull.cpp.

int PlaneTest ( const btPlane p,
const btVector3 v 
)

Definition at line 165 of file btConvexHull.cpp.

void ReleaseHull ( PHullResult result)

Definition at line 666 of file btConvexHull.cpp.

int shareedge ( const int3 a,
const int3 b 
)

Definition at line 327 of file btConvexHull.cpp.

int SplitTest ( ConvexH convex,
const btPlane plane 
)

Definition at line 172 of file btConvexHull.cpp.

btVector3 ThreePlaneIntersection ( const btPlane p0,
const btPlane p1,
const btPlane p2 
)

Definition at line 54 of file btConvexHull.cpp.

btVector3 TriNormal ( const btVector3 v0,
const btVector3 v1,
const btVector3 v2 
)

Definition at line 102 of file btConvexHull.cpp.

Variable Documentation

btScalar planetestepsilon = PAPERWIDTH

Definition at line 150 of file btConvexHull.cpp.