Blender V2.61 - r43446
Classes | Defines | Typedefs | Functions

BKE_bvhutils.h File Reference

#include "BLI_kdopbvh.h"

Go to the source code of this file.

Classes

struct  BVHTreeFromMesh

Defines

#define BVHTREE_FROM_FACES   0
#define BVHTREE_FROM_VERTICES   1
#define BVHTREE_FROM_EDGES   2

Typedefs

typedef struct BVHTreeFromMesh BVHTreeFromMesh
typedef struct LinkNodeBVHCache

Functions

BVHTreebvhtree_from_mesh_verts (struct BVHTreeFromMesh *data, struct DerivedMesh *mesh, float epsilon, int tree_type, int axis)
BVHTreebvhtree_from_mesh_faces (struct BVHTreeFromMesh *data, struct DerivedMesh *mesh, float epsilon, int tree_type, int axis)
BVHTreebvhtree_from_mesh_edges (struct BVHTreeFromMesh *data, struct DerivedMesh *mesh, float epsilon, int tree_type, int axis)
void free_bvhtree_from_mesh (struct BVHTreeFromMesh *data)
float bvhtree_ray_tri_intersection (const BVHTreeRay *ray, const float m_dist, const float v0[3], const float v1[3], const float v2[3])
float nearest_point_in_tri_surface (const float v0[3], const float v1[3], const float v2[3], const float p[3], int *v, int *e, float nearest[3])
BVHTreebvhcache_find (BVHCache *cache, int type)
void bvhcache_insert (BVHCache *cache, BVHTree *tree, int type)
void bvhcache_init (BVHCache *cache)
void bvhcache_free (BVHCache *cache)

Detailed Description

Definition in file BKE_bvhutils.h.


Define Documentation

#define BVHTREE_FROM_EDGES   2

Definition at line 121 of file BKE_bvhutils.h.

Referenced by bvhtree_from_mesh_edges().

#define BVHTREE_FROM_FACES   0

Definition at line 119 of file BKE_bvhutils.h.

Referenced by bvhtree_from_mesh_faces().

#define BVHTREE_FROM_VERTICES   1

Definition at line 120 of file BKE_bvhutils.h.

Referenced by bvhtree_from_mesh_verts().


Typedef Documentation

typedef struct LinkNode* BVHCache

Definition at line 123 of file BKE_bvhutils.h.


Function Documentation

BVHTree* bvhcache_find ( BVHCache cache,
int  type 
)
void bvhcache_free ( BVHCache cache)

Definition at line 784 of file bvhutils.c.

References BLI_linklist_free(), bvhcacheitem_free(), and NULL.

Referenced by DM_release().

void bvhcache_init ( BVHCache cache)

Definition at line 770 of file bvhutils.c.

References NULL.

Referenced by DM_init_funcs().

void bvhcache_insert ( BVHCache cache,
BVHTree tree,
int  type 
)
BVHTree* bvhtree_from_mesh_edges ( struct BVHTreeFromMesh data,
struct DerivedMesh mesh,
float  epsilon,
int  tree_type,
int  axis 
)
BVHTree* bvhtree_from_mesh_faces ( struct BVHTreeFromMesh data,
struct DerivedMesh mesh,
float  epsilon,
int  tree_type,
int  axis 
)
BVHTree* bvhtree_from_mesh_verts ( struct BVHTreeFromMesh data,
struct DerivedMesh mesh,
float  epsilon,
int  tree_type,
int  axis 
)
float bvhtree_ray_tri_intersection ( const BVHTreeRay ray,
const float  m_dist,
const float  v0[3],
const float  v1[3],
const float  v2[3] 
)
void free_bvhtree_from_mesh ( struct BVHTreeFromMesh data)
float nearest_point_in_tri_surface ( const float  v0[3],
const float  v1[3],
const float  v2[3],
const float  p[3],
int *  v,
int *  e,
float  nearest[3] 
)