Get rid of c++ in blenkernel and modifiers
[blender.git] / source / blender / blenkernel / BKE_navmesh_conversion.h
index acb3c2963a9e86080675d2d168d925ff0845d0f1..5f8359d1e3da544e39f2ee1497f86b2531fd4cc3 100644 (file)
 
 struct DerivedMesh;
 
-/* navmesh_conversion.cpp */
-bool buildNavMeshDataByDerivedMesh(DerivedMesh *dm, int& vertsPerPoly, 
-                                                                  int &nverts, float *&verts,
-                                                                  int &ndtris, unsigned short *&dtris,
-                                                                  int& npolys, unsigned short *&dmeshes,
-                                                                  unsigned short*& polys, int *&dtrisToPolysMap,
-                                                                  int *&dtrisToTrisMap, int *&trisToFacesMap);
+/* navmesh_conversion.c */
+int buildNavMeshDataByDerivedMesh(struct DerivedMesh *dm, int *vertsPerPoly,
+                                                                  int *nverts, float **verts,
+                                                                  int *ndtris, unsigned short **dtris,
+                                                                  int *npolys, unsigned short **dmeshes,
+                                                                  unsigned short **polys, int **dtrisToPolysMap,
+                                                                  int **dtrisToTrisMap, int **trisToFacesMap);
 
-bool buildRawVertIndicesData(DerivedMesh* dm, int &nverts, float *&verts, 
-                               int &ntris, unsigned short *&tris, int *&trisToFacesMap,
-                               int *&recastData);
+int buildRawVertIndicesData(struct DerivedMesh* dm, int *nverts, float **verts,
+                               int *ntris, unsigned short **tris, int **trisToFacesMap,
+                               int **recastData);
 
-bool buildNavMeshData(const int nverts, const float* verts, 
-                                         const int ntris, const unsigned short *tris, 
+int buildNavMeshData(const int nverts, const float* verts,
+                                         const int ntris, const unsigned short *tris,
                                          const int* recastData, const int* trisToFacesMap,
-                                         int &ndtris, unsigned short *&dtris,
-                                         int &npolys, unsigned short *&dmeshes, unsigned short *&polys,
-                                         int &vertsPerPoly, int *&dtrisToPolysMap, int *&dtrisToTrisMap);
+                                         int *ndtris, unsigned short **dtris,
+                                         int *npolys, unsigned short **dmeshes, unsigned short **polys,
+                                         int *vertsPerPoly, int **dtrisToPolysMap, int **dtrisToTrisMap);
 
-bool buildPolygonsByDetailedMeshes(const int vertsPerPoly, const int npolys, 
-                               unsigned short* polys, const unsigned short* dmeshes, 
-                               const float* verts, const unsigned short* dtris, 
+int buildPolygonsByDetailedMeshes(const int vertsPerPoly, const int npolys,
+                               unsigned short* polys, const unsigned short* dmeshes,
+                               const float* verts, const unsigned short* dtris,
                                const int* dtrisToPolysMap);
 
 int polyNumVerts(const unsigned short* p, const int vertsPerPoly);
-bool polyIsConvex(const unsigned short* p, const int vertsPerPoly, const float* verts);
+int polyIsConvex(const unsigned short* p, const int vertsPerPoly, const float* verts);
 int polyFindVertex(const unsigned short* p, const int vertsPerPoly, unsigned short vertexIdx);
 float distPointToSegmentSq(const float* point, const float* a, const float* b);