//----------------------------------------------------------------

//    Planescape - A motion planning example

//----------------------------------------------------------------

// This application demonstrates a number of motion planning techniques

// It allows the user to draw a maze on the screen and control a group of creatures

// that will navigate the maze

//

// Usage:

//    The screen starts out with four creatures in the center of the map (they are stacked on top of each other)

//

//    * Moving creatures

//          Left click and drag a creature to a new location, it will plan a path to wherever you released the mouse

//          If no path exists, if will stop moving

//          Pressing spacebar will pause or resume movement

//

//  * Creating walls

//          Hold shift and then left click and drag to draw a wall.

//          After you release the mouse a new wall will be created that goes from where you pressed the mouse to where you released

//          Be careful, if you create a wall that goes through a creature it will be forever stuck unless you restart the program

//

//    * Zooming in and out

//          Use + and – to zoom in and out

//

//    * Moving the view

//          Click and drag with the right mouse button to move the view

//

//    * Displaying Visibilty Graph

//          F1 toggles the display of the configuration space obsticles (blue)

//          F2 toggles the display of nodes in the visibility graph (red)

//          F3 toggles the display of connections between nodes in the visibility graph (yellow)

//          F4 toggles the display of planned paths

//

//

// Source code:

//          The source code was designed in three chunks

//                System (main.cpp): handles initialization of the map and GLUT and deals with parsing user input

//                Game Objects (creature, map, and wall .h/.cpp): mostly high level stuff that main interacts with

//                Utilities (everything else):

//                      geometry classes: vector2d, line_segment, polygon

//                      visibilty graph stuff: visibility_graph, visibility_graph_nodes,

//                      extra search stuff: path_queue, visibility_graph_path

//                      misc: path, log

//         

//          Interactions with openGL, GLUT, and the operating system are almost exclusivly inside of main.cpp

//                the exception is that the map class has a couple of calls to get the current time and many classes

//                have thier own draw/render functions

//

 

Compiled Executable

Source File

Compressed Project Files