-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add multithreaded pathfinding usable for long distances (#6)
- Loading branch information
Showing
5 changed files
with
103 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
[package] | ||
name = "repath" | ||
version = "0.0.6" | ||
version = "0.0.7" | ||
edition = "2021" | ||
authors = ["Jaroslav Patočka <[email protected]>"] | ||
description = "A fast pathfinding library using A* algorithm, caching and precomputation." | ||
description = "A fast pathfinding library using A* algorithm, caching, precomputation and path segmentation with concurrent pathfinding." | ||
readme = "README.md" | ||
keywords = ["pathfinding", "game", "server", "gameserver", "navmesh"] | ||
categories = ["game-development", "algorithms", "data-structures"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,24 @@ | ||
use serde::{Serialize, Deserialize}; | ||
|
||
/// Configuration settings for the RePathfinder. | ||
#[derive(Debug, Serialize, Deserialize, Clone)] | ||
pub struct RePathSettings { | ||
/// The filename of the navigation mesh in Wavefront OBJ format. | ||
pub navmesh_filename: String, | ||
|
||
/// The radius within which to precompute paths between nodes. | ||
/// Higher values will result in longer precomputation times but faster pathfinding for long distances. | ||
pub precompute_radius: f64, | ||
|
||
/// The total number of node pairs for which paths will be precomputed. | ||
/// Higher values will result in longer precomputation times but more efficient pathfinding. | ||
pub total_precompute_pairs: usize, | ||
|
||
/// The capacity of the LRU cache for storing precomputed paths. | ||
/// Higher values allow more paths to be stored but will use more memory. | ||
pub cache_capacity: usize, | ||
|
||
/// Whether to use the precomputed cache for pathfinding. | ||
/// Set to false to disable the use of precomputed paths. | ||
pub use_precomputed_cache: bool, | ||
} |