GithubHelp home page GithubHelp logo

divert's Introduction

Actions Status Crate

Divert

Rust bindings for Recast Navigation.

Purpose

Provide safe bindings to Recast Navigation to allow for 3d navigation in a rust application.

Overview

src/extern.cpp

C function definitions wrapping Detour C++ Functions.

src/binding.rs

Rust bindings to the C functions exposed in src/extern.cpp.

src/lib.rs

Safe Rust abstractions of Detour components e.g ensuring correct freeing of DtNavMesh and DtNavMeshQuery.

How to Build

git clone --recurse-submodules https://github.com/0xFounders/divert.git
cargo build

Use Case

Refer to examples/pathfinding.rs for a demonstration of loading geometry generated with Trinity Core. In the below, Proof of Concept, section the paths generated are projected to in-game space. In this repository the resources for generating paths is provided, but drawing/projecting points in the game is not in scope of this project. No questions or issues should be opened requesting help or information about video game specific applications.

cargo run --example path_finding
   Compiling divert v0.1.0 (...\divert)
    Finished dev [unoptimized + debuginfo] target(s) in 0.99s
     Running `target\debug\examples\path_finding.exe`
 INFO  path_finding > [TrinityNavigator] Generating path from DtVector { y: 4350.97, z: 2.25, x: -2051.9 } to DtVector { y: 4894.67, z: 2.21, x: -1916.12 }
 INFO  path_finding > [NavEngine] Adding tile (35, 23)
 INFO  path_finding > [NavEngine] Adding tile (35, 22)
 INFO  path_finding > [TrinityNavigator] Successfully generated path of len: 256
 INFO  path_finding > DtVector { y: 4350.97, z: 2.6134748, x: -2051.9 }
 INFO  path_finding > DtVector { y: 4352.9404, z: 3.0786226, x: -2051.5564 }
 INFO  path_finding > DtVector { y: 4354.9106, z: 3.0870965, x: -2051.213 }
 INFO  path_finding > DtVector { y: 4356.881, z: 2.9974942, x: -2050.8694 }

Proof Of Concept

Demonstration of my independent work using this library to generate navigation paths in a third party video game.

Navigation Demo 1

Navigation Demo 2

divert's People

Contributors

ohchase avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.