forked from bartvdbraak/blender
Another set of fixes for MSVC
This commit is contained in:
parent
8cf8fd7326
commit
3449c0270a
@ -61,4 +61,5 @@ int polyIsConvex(const unsigned short* p, const int vertsPerPoly, const float* v
|
|||||||
int polyFindVertex(const unsigned short* p, const int vertsPerPoly, unsigned short vertexIdx);
|
int polyFindVertex(const unsigned short* p, const int vertsPerPoly, unsigned short vertexIdx);
|
||||||
float distPointToSegmentSq(const float* point, const float* a, const float* b);
|
float distPointToSegmentSq(const float* point, const float* a, const float* b);
|
||||||
|
|
||||||
|
|
||||||
#endif //NAVMESH_CONVERSION_H
|
#endif //NAVMESH_CONVERSION_H
|
||||||
|
@ -37,16 +37,17 @@
|
|||||||
#include "BKE_navmesh_conversion.h"
|
#include "BKE_navmesh_conversion.h"
|
||||||
#include "BKE_cdderivedmesh.h"
|
#include "BKE_cdderivedmesh.h"
|
||||||
|
|
||||||
|
#include "BLI_utildefines.h"
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
|
|
||||||
#include "recast-capi.h"
|
#include "recast-capi.h"
|
||||||
|
|
||||||
inline float area2(const float* a, const float* b, const float* c)
|
BM_INLINE float area2(const float* a, const float* b, const float* c)
|
||||||
{
|
{
|
||||||
return (b[0] - a[0]) * (c[2] - a[2]) - (c[0] - a[0]) * (b[2] - a[2]);
|
return (b[0] - a[0]) * (c[2] - a[2]) - (c[0] - a[0]) * (b[2] - a[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int left(const float* a, const float* b, const float* c)
|
BM_INLINE int left(const float* a, const float* b, const float* c)
|
||||||
{
|
{
|
||||||
return area2(a, b, c) < 0;
|
return area2(a, b, c) < 0;
|
||||||
}
|
}
|
||||||
|
@ -48,12 +48,12 @@
|
|||||||
#include "BKE_customdata.h"
|
#include "BKE_customdata.h"
|
||||||
#include "MEM_guardedalloc.h"
|
#include "MEM_guardedalloc.h"
|
||||||
|
|
||||||
static int bit(int a, int b)
|
BM_INLINE int bit(int a, int b)
|
||||||
{
|
{
|
||||||
return (a & (1 << b)) >> b;
|
return (a & (1 << b)) >> b;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void intToCol(int i, float* col)
|
BM_INLINE void intToCol(int i, float* col)
|
||||||
{
|
{
|
||||||
int r = bit(i, 0) + bit(i, 3) * 2 + 1;
|
int r = bit(i, 0) + bit(i, 3) * 2 + 1;
|
||||||
int g = bit(i, 1) + bit(i, 4) * 2 + 1;
|
int g = bit(i, 1) + bit(i, 4) * 2 + 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user