~rebel/horde3d/trunk

« back to all changes in this revision

Viewing changes to trunk/Tools/Dependencies/RecastNavigation/Detour/Source/DetourNavMeshBuilder.cpp

  • Committer: felix
  • Date: 2015-07-07 12:57:07 UTC
  • Revision ID: svn-v4:5ce291ac-9df0-446f-9e4f-d57731c4dda7::1699
- Updated RecastNavigation to latest version and fixed multiple issues.
- Adapted GameDetourComponent, GameDetourCrowdComponent, DetourCrowdDemo and AAA accordingly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
// 3. This notice may not be removed or altered from any source distribution.
17
17
//
18
18
 
19
 
#include <math.h>
20
19
#include <stdio.h>
21
20
#include <stdlib.h>
22
21
#include <string.h>
23
22
#include <float.h>
24
23
#include "DetourNavMesh.h"
25
24
#include "DetourCommon.h"
 
25
#include "DetourMath.h"
26
26
#include "DetourNavMeshBuilder.h"
27
27
#include "DetourAlloc.h"
28
28
#include "DetourAssert.h"
202
202
                        if (z > it.bmax[2]) it.bmax[2] = z;
203
203
                }
204
204
                // Remap y
205
 
                it.bmin[1] = (unsigned short)floorf((float)it.bmin[1]*ch/cs);
206
 
                it.bmax[1] = (unsigned short)ceilf((float)it.bmax[1]*ch/cs);
 
205
                it.bmin[1] = (unsigned short)dtMathFloorf((float)it.bmin[1]*ch/cs);
 
206
                it.bmax[1] = (unsigned short)dtMathCeilf((float)it.bmax[1]*ch/cs);
207
207
        }
208
208
        
209
209
        int curNode = 0;