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/python/mathutils/mathutils_bvhtree.h
Campbell Barton 18af73e461 Add mathutils.bvhtree API
Originally D966 by @lukastoenne, with own additions

- trees can be initialized from Object's, BMesh,
  or passed in as vert+polygon arrays.
- original indices of ngons/faces are used. (instead of tessellated indices).
- ray_cast, find_nearest methods
- find overlapping faces between 2 trees
2015-07-29 21:24:12 +10:00

37 lines
1.2 KiB
C++

/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* ***** END GPL LICENSE BLOCK *****
*/
/** \file blender/python/mathutils/mathutils_bvhtree.h
* \ingroup mathutils
*/
#ifndef __MATHUTILS_BVHTREE_H__
#define __MATHUTILS_BVHTREE_H__
PyMODINIT_FUNC PyInit_mathutils_bvhtree(void);
extern PyTypeObject PyBVHTree_Type;
#define PyBVHTree_Check(_v) PyObject_TypeCheck((_v), &PyBVHTree_Type)
#define PyBVHTree_CheckExact(v) (Py_TYPE(v) == &PyBVHTree_Type)
#endif /* __MATHUTILS_BVHTREE_H__ */