2010-12-23 03:14:03 +01:00
|
|
|
#ifndef _EDITBMESH_BVH
|
|
|
|
#define _EDITBMESH_BVH
|
|
|
|
|
2009-10-07 23:19:58 +02:00
|
|
|
struct BMEditMesh;
|
|
|
|
struct BMFace;
|
|
|
|
struct BMEdge;
|
|
|
|
struct BMVert;
|
|
|
|
struct RegionView3D;
|
|
|
|
struct BMBVHTree;
|
2010-09-25 03:54:58 +02:00
|
|
|
struct BVHTree;
|
2009-11-04 03:12:00 +01:00
|
|
|
|
|
|
|
#ifndef IN_EDITMESHBVH
|
2009-10-07 23:19:58 +02:00
|
|
|
typedef struct BMBVHTree BMBVHTree;
|
2009-11-04 03:12:00 +01:00
|
|
|
#endif
|
2009-10-07 23:19:58 +02:00
|
|
|
|
2009-11-04 03:12:00 +01:00
|
|
|
struct BMBVHTree *BMBVH_NewBVH(struct BMEditMesh *em);
|
|
|
|
void BMBVH_FreeBVH(struct BMBVHTree *tree);
|
2010-09-25 03:54:58 +02:00
|
|
|
struct BVHTree *BMBVH_BVHTree(struct BMBVHTree *tree);
|
2009-10-07 23:19:58 +02:00
|
|
|
|
2009-11-04 03:12:00 +01:00
|
|
|
struct BMFace *BMBVH_RayCast(struct BMBVHTree *tree, float *co, float *dir, float *hitout);
|
2010-03-04 02:07:26 +01:00
|
|
|
|
2009-11-04 03:12:00 +01:00
|
|
|
int BMBVH_EdgeVisible(struct BMBVHTree *tree, struct BMEdge *e,
|
2009-10-07 23:19:58 +02:00
|
|
|
struct RegionView3D *r3d, struct Object *obedit);
|
2010-03-04 02:07:26 +01:00
|
|
|
|
2010-03-11 06:30:01 +01:00
|
|
|
#define BM_SEARCH_MAXDIST 0.4f
|
|
|
|
|
2010-03-04 02:07:26 +01:00
|
|
|
/*find a vert closest to co in a sphere of radius maxdist*/
|
|
|
|
struct BMVert *BMBVH_FindClosestVert(struct BMBVHTree *tree, float *co, float maxdist);
|
|
|
|
struct BMVert *BMBVH_FindClosestVertTopo(struct BMBVHTree *tree, float *co,
|
|
|
|
float maxdist, struct BMVert *sourcev);
|
2010-12-23 03:14:03 +01:00
|
|
|
#endif /* _EDITBMESH_H */
|