#include <math.h>
#include <string.h>
#include <stdio.h>
#include "Recast.h"
#include "RecastAlloc.h"
#include "RecastAssert.h"
struct rcEdge
{ … };
static bool buildMeshAdjacency(unsigned short* polys, const int npolys,
const int nverts, const int vertsPerPoly)
{ … }
static const int VERTEX_BUCKET_COUNT = …;
inline int computeVertexHash(int x, int y, int z)
{ … }
static unsigned short addVertex(unsigned short x, unsigned short y, unsigned short z,
unsigned short* verts, int* firstVert, int* nextVert, int& nv)
{ … }
inline int prev(int i, int n) { … }
inline int next(int i, int n) { … }
inline int area2(const int* a, const int* b, const int* c)
{ … }
inline bool xorb(bool x, bool y)
{ … }
inline bool left(const int* a, const int* b, const int* c)
{ … }
inline bool leftOn(const int* a, const int* b, const int* c)
{ … }
inline bool collinear(const int* a, const int* b, const int* c)
{ … }
static bool intersectProp(const int* a, const int* b, const int* c, const int* d)
{ … }
static bool between(const int* a, const int* b, const int* c)
{ … }
static bool intersect(const int* a, const int* b, const int* c, const int* d)
{ … }
static bool vequal(const int* a, const int* b)
{ … }
static bool diagonalie(int i, int j, int n, const int* verts, int* indices)
{ … }
static bool inCone(int i, int j, int n, const int* verts, int* indices)
{ … }
static bool diagonal(int i, int j, int n, const int* verts, int* indices)
{ … }
static bool diagonalieLoose(int i, int j, int n, const int* verts, int* indices)
{ … }
static bool inConeLoose(int i, int j, int n, const int* verts, int* indices)
{ … }
static bool diagonalLoose(int i, int j, int n, const int* verts, int* indices)
{ … }
static int triangulate(int n, const int* verts, int* indices, int* tris)
{ … }
static int countPolyVerts(const unsigned short* p, const int nvp)
{ … }
inline bool uleft(const unsigned short* a, const unsigned short* b, const unsigned short* c)
{ … }
static int getPolyMergeValue(unsigned short* pa, unsigned short* pb,
const unsigned short* verts, int& ea, int& eb,
const int nvp)
{ … }
static void mergePolyVerts(unsigned short* pa, unsigned short* pb, int ea, int eb,
unsigned short* tmp, const int nvp)
{ … }
static void pushFront(int v, int* arr, int& an)
{ … }
static void pushBack(int v, int* arr, int& an)
{ … }
static bool canRemoveVertex(rcContext* ctx, rcPolyMesh& mesh, const unsigned short rem)
{ … }
static bool removeVertex(rcContext* ctx, rcPolyMesh& mesh, const unsigned short rem, const int maxTris)
{ … }
bool rcBuildPolyMesh(rcContext* ctx, const rcContourSet& cset, const int nvp, rcPolyMesh& mesh)
{ … }
bool rcMergePolyMeshes(rcContext* ctx, rcPolyMesh** meshes, const int nmeshes, rcPolyMesh& mesh)
{ … }
bool rcCopyPolyMesh(rcContext* ctx, const rcPolyMesh& src, rcPolyMesh& dst)
{ … }