Blender V2.61 - r43446
Functions

BKE_navmesh_conversion.h File Reference

Go to the source code of this file.

Functions

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)
int buildRawVertIndicesData (struct DerivedMesh *dm, int *nverts, float **verts, int *ntris, unsigned short **tris, int **trisToFacesMap, int **recastData)
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 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)
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)

Function Documentation

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 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 
)
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 
)

Definition at line 180 of file navmesh_conversion.c.

References distPointToSegmentSq(), i, MEM_callocN(), MEM_freeN(), and next.

Referenced by buildNavMeshData().

int buildRawVertIndicesData ( struct DerivedMesh dm,
int *  nverts,
float **  verts,
int *  ntris,
unsigned short **  tris,
int **  trisToFacesMap,
int **  recastData 
)
float distPointToSegmentSq ( const float *  point,
const float *  a,
const float *  b 
)

Definition at line 86 of file navmesh_conversion.c.

References simple_enum_gen::d, and sub_v3_v3v3().

Referenced by buildPolygonsByDetailedMeshes().

int polyFindVertex ( const unsigned short *  p,
const int  vertsPerPoly,
unsigned short  vertexIdx 
)

Definition at line 500 of file navmesh_conversion.c.

References i.

Referenced by KX_NavMeshObject::BuildVertIndArrays().

int polyIsConvex ( const unsigned short *  p,
const int  vertsPerPoly,
const float *  verts 
)

Definition at line 69 of file navmesh_conversion.c.

References left(), and polyNumVerts().

int polyNumVerts ( const unsigned short *  p,
const int  vertsPerPoly 
)

Definition at line 57 of file navmesh_conversion.c.

References i.

Referenced by KX_NavMeshObject::BuildVertIndArrays(), and polyIsConvex().