From a07fbdca25bb00702d5fe5609b94b08565f875a5 Mon Sep 17 00:00:00 2001 From: Jakob Botsch Nielsen Date: Tue, 27 Jun 2017 12:07:10 +0200 Subject: [PATCH] Move Recast configurations into RecastConfig.h --- Recast/Include/Recast.h | 6 +++--- Recast/Include/RecastConfig.h | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 Recast/Include/RecastConfig.h diff --git a/Recast/Include/Recast.h b/Recast/Include/Recast.h index a83641d8..02b2070b 100644 --- a/Recast/Include/Recast.h +++ b/Recast/Include/Recast.h @@ -15,10 +15,12 @@ // misrepresented as being the original software. // 3. This notice may not be removed or altered from any source distribution. // - + #ifndef RECAST_H #define RECAST_H +#include "RecastConfig.h" + /// The value of PI used by Recast. static const float RC_PI = 3.14159265f; @@ -262,8 +264,6 @@ struct rcConfig float detailSampleMaxError; }; -/// Defines the number of bits allocated to rcSpan::smin and rcSpan::smax. -static const int RC_SPAN_HEIGHT_BITS = 13; /// Defines the maximum value for rcSpan::smin and rcSpan::smax. static const int RC_SPAN_MAX_HEIGHT = (1 << RC_SPAN_HEIGHT_BITS) - 1; diff --git a/Recast/Include/RecastConfig.h b/Recast/Include/RecastConfig.h new file mode 100644 index 00000000..bf561394 --- /dev/null +++ b/Recast/Include/RecastConfig.h @@ -0,0 +1,9 @@ +#ifndef RECASTCONFIG_H +#define RECASTCONFIG_H + +/// Defines the number of bits allocated to rcSpan::smin and rcSpan::smax. +/// If the mesh is appearing below the actual terrain, this parameter may +/// need to be increased. +static const int RC_SPAN_HEIGHT_BITS = 13; + +#endif // RECASTCONFIG_H \ No newline at end of file