Blender V2.61 - r43446
|
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) |
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 | ||
) |
Definition at line 339 of file navmesh_conversion.c.
References buildPolygonsByDetailedMeshes(), compareByData(), i, MEM_callocN(), MEM_freeN(), NULL, SortContext::recastData, and SortContext::trisToFacesMap.
Referenced by buildNavMeshDataByDerivedMesh().
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 | ||
) |
Definition at line 466 of file navmesh_conversion.c.
References buildNavMeshData(), buildRawVertIndicesData(), MEM_freeN(), NULL, and SortContext::recastData.
Referenced by KX_NavMeshObject::BuildVertIndArrays().
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 | ||
) |
Definition at line 109 of file navmesh_conversion.c.
References CD_RECAST, CustomData_get_layer(), DerivedMesh::faceData, DerivedMesh::getFaceArray, DerivedMesh::getNumFaces, DerivedMesh::getNumVerts, DerivedMesh::getVertCos, if(), MEM_callocN(), SWAP, MFace::v1, MFace::v2, MFace::v3, and MFace::v4.
Referenced by buildNavMeshDataByDerivedMesh().
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().