TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Apr 2015 |
Maintained by Jasio Woo.
A Comprehensive PathFinding Library for Objective-C.
Based on PathFinding.js by @qiao.
PathFindingForObjC/PathFindingForObjC
into your project #import PathFinding.h
to your source file.Disable logging
Click on your
Project
Target, head over toBuild Settings
and search forPreprocessor Macros
. addPF_DEBUG=0
toDebug
Configuration.
PathFinding *finder = [[PathFinding alloc] initWithMapSize:CGSizeMake(6, 5)
tileSize:CGSizeMake(1, 1)
coordsOrgin:CGPointZero];
finder.heuristicType = HeuristicTypeManhattan;
finder.movementType = DiagonalMovement_Never;
// add blocks
[finder addBlockTilePositions:@[PF_CGPointToNSValue(CGPointMake(1, 2)),
PF_CGPointToNSValue(CGPointMake(2, 2)),
PF_CGPointToNSValue(CGPointMake(3, 2))
]];
// set start point
finder.startPoint = CGPointMake(2, 3);
// set end point
finder.endPoint = CGPointMake(2, 1);
// get result
NSArray *foundPaths = [finder findPathing:PathfindingAlgorithm_AStar IsConvertToOriginCoords:YES];
HeuristicType
:
DiagonalMovement
:
PathfindingAlgorithm
:
OSX Download
iOS