Blender  V2.59
Classes | Typedefs | Functions
BLI_kdopbvh.h File Reference
#include <float.h>

Go to the source code of this file.

Classes

struct  BVHTreeOverlap
struct  BVHTreeNearest
struct  BVHTreeRay
struct  BVHTreeRayHit

Typedefs

typedef struct BVHTree BVHTree
typedef struct BVHTreeOverlap BVHTreeOverlap
typedef struct BVHTreeNearest BVHTreeNearest
typedef struct BVHTreeRay BVHTreeRay
typedef struct BVHTreeRayHit BVHTreeRayHit
typedef void(* BVHTree_NearestPointCallback )(void *userdata, int index, const float *co, BVHTreeNearest *nearest)
typedef void(* BVHTree_RayCastCallback )(void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit)
typedef void(* BVHTree_RangeQuery )(void *userdata, int index, float squared_dist)

Functions

BVHTreeBLI_bvhtree_new (int maxsize, float epsilon, char tree_type, char axis)
void BLI_bvhtree_free (BVHTree *tree)
int BLI_bvhtree_insert (BVHTree *tree, int index, float *co, int numpoints)
void BLI_bvhtree_balance (BVHTree *tree)
int BLI_bvhtree_update_node (BVHTree *tree, int index, float *co, float *co_moving, int numpoints)
void BLI_bvhtree_update_tree (BVHTree *tree)
BVHTreeOverlapBLI_bvhtree_overlap (BVHTree *tree1, BVHTree *tree2, unsigned int *result)
float BLI_bvhtree_getepsilon (BVHTree *tree)
int BLI_bvhtree_find_nearest (BVHTree *tree, const float *co, BVHTreeNearest *nearest, BVHTree_NearestPointCallback callback, void *userdata)
int BLI_bvhtree_ray_cast (BVHTree *tree, const float *co, const float *dir, float radius, BVHTreeRayHit *hit, BVHTree_RayCastCallback callback, void *userdata)
float BLI_bvhtree_bb_raycast (float *bv, float *light_start, float *light_end, float *pos)
int BLI_bvhtree_range_query (BVHTree *tree, const float *co, float radius, BVHTree_RangeQuery callback, void *userdata)

Detailed Description

Author:
Daniel Genrich
Andre Pinto

Definition in file BLI_kdopbvh.h.


Typedef Documentation

typedef struct BVHTree BVHTree

Definition at line 47 of file BLI_kdopbvh.h.

typedef void(* BVHTree_NearestPointCallback)(void *userdata, int index, const float *co, BVHTreeNearest *nearest)

Definition at line 78 of file BLI_kdopbvh.h.

typedef void(* BVHTree_RangeQuery)(void *userdata, int index, float squared_dist)

Definition at line 84 of file BLI_kdopbvh.h.

typedef void(* BVHTree_RayCastCallback)(void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit)

Definition at line 81 of file BLI_kdopbvh.h.

typedef struct BVHTreeRay BVHTreeRay
typedef struct BVHTreeRayHit BVHTreeRayHit

Function Documentation

void BLI_bvhtree_balance ( BVHTree tree)
float BLI_bvhtree_bb_raycast ( float *  bv,
float *  light_start,
float *  light_end,
float *  pos 
)
int BLI_bvhtree_find_nearest ( BVHTree tree,
const float *  co,
BVHTreeNearest nearest,
BVHTree_NearestPointCallback  callback,
void *  userdata 
)
void BLI_bvhtree_free ( BVHTree tree)
float BLI_bvhtree_getepsilon ( BVHTree tree)

Definition at line 1048 of file BLI_kdopbvh.c.

References BVHTree::epsilon.

Referenced by cloth_collision(), cloth_collision_response_static(), and deformVerts().

int BLI_bvhtree_insert ( BVHTree tree,
int  index,
float *  co,
int  numpoints 
)
BVHTree* BLI_bvhtree_new ( int  maxsize,
float  epsilon,
char  tree_type,
char  axis 
)
BVHTreeOverlap* BLI_bvhtree_overlap ( BVHTree tree1,
BVHTree tree2,
unsigned int *  result 
)
int BLI_bvhtree_range_query ( BVHTree tree,
const float *  co,
float  radius,
BVHTree_RangeQuery  callback,
void *  userdata 
)
int BLI_bvhtree_ray_cast ( BVHTree tree,
const float *  co,
const float *  dir,
float  radius,
BVHTreeRayHit hit,
BVHTree_RayCastCallback  callback,
void *  userdata 
)
int BLI_bvhtree_update_node ( BVHTree tree,
int  index,
float *  co,
float *  co_moving,
int  numpoints 
)
void BLI_bvhtree_update_tree ( BVHTree tree)