Pathfinder
Pathfinder Plugin

This README is taken mostly from the ExampleProject Git repository.

Getting Started

To include the Pathfinder plugin into PADrend, copy the entire 'Pathfinder' directory into your local PADrend directory (e.g., ~/PADrend/Pathfinder/ or C:\PADrend\Pathfinder\\).

Now, you need to add the Pathfinder plugin to your plugin search path, so that PADrend can find it. For this, open the file config.json in a text editor (you need to run PADrend once to create it) and search for the following section:

"Paths":{
"data":"data/",
"plugins":[
"extPlugins/",
"plugins/"
],
"scene":"data/scene/",
"user":"./"
},

Here you need to add the plugins directory contained in the Pathfinder directory to Paths.plugins (don't forget the trailing /):

"Paths":{
"data":"data/",
"plugins":[
"extPlugins/",
"plugins/",
"Pathfinder/plugins/"
],
"scene":"data/scene/",
"user":"./"
},

Now, you need to activate your plugin in PADrend. For this, you need to start PADrend. After you started PADrend, Open the "Config" menu and click on "Plugins". There you should see a list of all plugins with a small "x" if they are active. Search for the entry named "Pathfinder" and click on it to activate it. To use your plugin you need to restart PADrend.

Directory Structure

The directory structure of this plugin is as follows:

Pathfinder
.
├── cmake # Contains custom CMake modules
│   ├── FindEScript.cmake # CMake module for finding the EScript library
│   └── FindPADrend.cmake # CMake module for finding the PADrend main libraries
├── CMakeLists.txt # Configuration file for CMake to build C++ library
├── plugins # Directory for PADrend to search for custom plugins
│   └── Pathfinder # Main directoryof the plugin 'Pathfinder'
│   └── Plugin.escript # Plugin specification/entry point for the plugin 'Pathfinder'
├── README.md # This README file
├── scripts # Contains scripts to be used by the 'F3' quick dial menu
└── src # Contains all C++ source code
├── convhull_3d # Convex Hull library
├── documentation # Documentation generated via doxygen
├── Doxyfile # The configuration file that is used to generate
│ # documentation via doxygen
├── mainPage.md # The front page of the generated documentation
├── […].cpp # cpp source code files
└── […].h # Header files

Building the C++ Library

To build the C++ library you need a development environment with a C++ compiler and CMake. See here how to set them up for your system.

Now, to build the library do the following:

  1. Open a terminal and navigate to the Pathfinder directory.
  2. create a new directory called build and navigate into it by using mkdir build; cd build
  3. run CMake with the following flags:
    • Windows: cmake .. -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo
    • Linux: cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
  4. build the library: cmake --build . If everything worked fine, you should now have the file libPathfinder.so or libPathfinder.dll in your directory.