This repository has been archived on 2023-10-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
blender-archive/source/blender/editors/mesh/editbmesh_bvh.h

39 lines
1.3 KiB
C++
Raw Normal View History

#ifndef _EDITBMESH_BVH
#define _EDITBMESH_BVH
struct BMEditMesh;
struct BMFace;
struct BMEdge;
struct BMVert;
struct RegionView3D;
struct BMBVHTree;
struct BVHTree;
struct Scene;
struct Object;
2009-11-04 02:12:00 +00:00
#ifndef IN_EDITMESHBVH
typedef struct BMBVHTree BMBVHTree;
2009-11-04 02:12:00 +00:00
#endif
struct BMBVHTree *BMBVH_NewBVH(struct BMEditMesh *em, int flag, struct Scene *scene, struct Object *obedit);
2009-11-04 02:12:00 +00:00
void BMBVH_FreeBVH(struct BMBVHTree *tree);
struct BVHTree *BMBVH_BVHTree(struct BMBVHTree *tree);
struct BMFace *BMBVH_RayCast(struct BMBVHTree *tree, float *co, float *dir, float *hitout, float *cagehit);
2009-11-04 02:12:00 +00:00
int BMBVH_EdgeVisible(struct BMBVHTree *tree, struct BMEdge *e,
2011-04-24 07:45:24 +00:00
struct ARegion *ar, struct View3D *v3d, struct Object *obedit);
#define BM_SEARCH_MAXDIST 0.4f
/*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);
/*BMBVH_NewBVH flag parameter*/
#define BMBVH_USE_CAGE 1 /*project geometry onto modifier cage */
#define BMBVH_RETURN_ORIG 2 /*use with BMBVH_USE_CAGE, returns hits in relation to original geometry*/
#endif /* _EDITBMESH_H */