Planeshift

DetourNavMeshBuilder.h

Go to the documentation of this file.
00001 //
00002 // Copyright (c) 2009-2010 Mikko Mononen [email protected]
00003 //
00004 // This software is provided 'as-is', without any express or implied
00005 // warranty.  In no event will the authors be held liable for any damages
00006 // arising from the use of this software.
00007 // Permission is granted to anyone to use this software for any purpose,
00008 // including commercial applications, and to alter it and redistribute it
00009 // freely, subject to the following restrictions:
00010 // 1. The origin of this software must not be misrepresented; you must not
00011 //    claim that you wrote the original software. If you use this software
00012 //    in a product, an acknowledgment in the product documentation would be
00013 //    appreciated but is not required.
00014 // 2. Altered source versions must be plainly marked as such, and must not be
00015 //    misrepresented as being the original software.
00016 // 3. This notice may not be removed or altered from any source distribution.
00017 //
00018 
00019 #ifndef DETOURNAVMESHBUILDER_H
00020 #define DETOURNAVMESHBUILDER_H
00021 
00022 #include "DetourAlloc.h"
00023 
00026 struct dtNavMeshCreateParams
00027 {
00028 
00033 
00034         const unsigned short* verts;                    
00035         int vertCount;                                                  
00036         const unsigned short* polys;                    
00037         const unsigned short* polyFlags;                
00038         const unsigned char* polyAreas;                 
00039         int polyCount;                                                  
00040         int nvp;                                                                
00041 
00046 
00047         const unsigned int* detailMeshes;               
00048         const float* detailVerts;                               
00049         int detailVertsCount;                                   
00050         const unsigned char* detailTris;                
00051         int detailTriCount;                                             
00052 
00059 
00061         const float* offMeshConVerts;
00063         const float* offMeshConRad;
00065         const unsigned short* offMeshConFlags;
00067         const unsigned char* offMeshConAreas;
00072         const unsigned char* offMeshConDir;     
00074         const unsigned int* offMeshConUserID;
00076         int offMeshConCount;
00077 
00082 
00083         unsigned int userId;    
00084         int tileX;                              
00085         int tileY;                              
00086         int tileLayer;                  
00087         float bmin[3];                  
00088         float bmax[3];                  
00089 
00093 
00094         float walkableHeight;   
00095         float walkableRadius;   
00096         float walkableClimb;    
00097         float cs;                               
00098         float ch;                               
00099 
00102         bool buildBvTree;
00103 
00105 };
00106 
00113 bool dtCreateNavMeshData(dtNavMeshCreateParams* params, unsigned char** outData, int* outDataSize);
00114 
00118 bool dtNavMeshHeaderSwapEndian(unsigned char* data, const int dataSize);
00119 
00123 bool dtNavMeshDataSwapEndian(unsigned char* data, const int dataSize);
00124 
00125 #endif // DETOURNAVMESHBUILDER_H
00126 
00127 // This section contains detailed documentation for members that don't have
00128 // a source file. It reduces clutter in the main section of the header.
00129