~rebel/horde3d/trunk

« back to all changes in this revision

Viewing changes to trunk/Tools/Dependencies/RecastNavigation/Recast/Include/Recast.h

  • 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:
219
219
        int maxEdgeLen;
220
220
        
221
221
        /// The maximum distance a simplfied contour's border edges should deviate 
222
 
        /// the original raw contour. [Limit: >=0] [Units: wu]
 
222
        /// the original raw contour. [Limit: >=0] [Units: vx]
223
223
        float maxSimplificationError;
224
224
        
225
225
        /// The minimum number of cells allowed to form isolated island areas. [Limit: >=0] [Units: vx] 
338
338
        int maxy;                                       ///< The maximum y-bounds of usable data. (Along the z-axis.)
339
339
        int hmin;                                       ///< The minimum height bounds of usable data. (Along the y-axis.)
340
340
        int hmax;                                       ///< The maximum height bounds of usable data. (Along the y-axis.)
341
 
        unsigned char* heights;         ///< The heightfield. [Size: (width - borderSize*2) * (h - borderSize*2)]
 
341
        unsigned char* heights;         ///< The heightfield. [Size: width * height]
342
342
        unsigned char* areas;           ///< Area ids. [Size: Same as #heights]
343
343
        unsigned char* cons;            ///< Packed neighbor connection information. [Size: Same as #heights]
344
344
};
549
549
/// @name General helper functions
550
550
/// @{
551
551
 
 
552
/// Used to ignore a function parameter.  VS complains about unused parameters
 
553
/// and this silences the warning.
 
554
///  @param [in] _ Unused parameter
 
555
template<class T> void rcIgnoreUnused(const T&) { }
 
556
 
552
557
/// Swaps the values of the two parameters.
553
558
///  @param[in,out]     a       Value A
554
559
///  @param[in,out]     b       Value B
964
969
///  @returns True if the operation completed successfully.
965
970
bool rcBuildDistanceField(rcContext* ctx, rcCompactHeightfield& chf);
966
971
 
967
 
/// Builds region data for the heightfield using watershed partitioning. 
 
972
/// Builds region data for the heightfield using watershed partitioning.
968
973
///  @ingroup recast
969
974
///  @param[in,out]     ctx                             The build context to use during the operation.
970
975
///  @param[in,out]     chf                             A populated compact heightfield.
978
983
bool rcBuildRegions(rcContext* ctx, rcCompactHeightfield& chf,
979
984
                                        const int borderSize, const int minRegionArea, const int mergeRegionArea);
980
985
 
 
986
/// Builds region data for the heightfield by partitioning the heightfield in non-overlapping layers.
 
987
///  @ingroup recast
 
988
///  @param[in,out]     ctx                             The build context to use during the operation.
 
989
///  @param[in,out]     chf                             A populated compact heightfield.
 
990
///  @param[in]         borderSize              The size of the non-navigable border around the heightfield.
 
991
///                                                             [Limit: >=0] [Units: vx]
 
992
///  @param[in]         minRegionArea   The minimum number of cells allowed to form isolated island areas.
 
993
///                                                             [Limit: >=0] [Units: vx].
 
994
///  @returns True if the operation completed successfully.
 
995
bool rcBuildLayerRegions(rcContext* ctx, rcCompactHeightfield& chf,
 
996
                                                 const int borderSize, const int minRegionArea);
 
997
 
981
998
/// Builds region data for the heightfield using simple monotone partitioning.
982
999
///  @ingroup recast 
983
1000
///  @param[in,out]     ctx                             The build context to use during the operation.
992
1009
bool rcBuildRegionsMonotone(rcContext* ctx, rcCompactHeightfield& chf,
993
1010
                                                        const int borderSize, const int minRegionArea, const int mergeRegionArea);
994
1011
 
995
 
 
996
1012
/// Sets the neighbor connection data for the specified direction.
997
1013
///  @param[in]         s               The span to update.
998
1014
///  @param[in]         dir             The direction to set. [Limits: 0 <= value < 4]
1067
1083
///  @returns True if the operation completed successfully.
1068
1084
bool rcBuildContours(rcContext* ctx, rcCompactHeightfield& chf,
1069
1085
                                         const float maxError, const int maxEdgeLen,
1070
 
                                         rcContourSet& cset, const int flags = RC_CONTOUR_TESS_WALL_EDGES);
 
1086
                                         rcContourSet& cset, const int buildFlags = RC_CONTOUR_TESS_WALL_EDGES);
1071
1087
 
1072
1088
/// Builds a polygon mesh from the provided contours.
1073
1089
///  @ingroup recast