msmazes::FSMYawInputMaker Struct Reference
[Core FSM Layer]

#include <msmazes/core/fsm/input/maker_yaw.hpp>

List of all members.


Detailed Description

This FSM Input Maker builds inputs according to the change in direction between two edges in the underlying graph of a Physical Pattern. Use this if you want to input directions relative to that of the user, e.g. for a 3-D perspective. The direction change type must be convertible to the input index type of a finite state machine; otherwise, this struct cannot be used. Furthermore, the maze is assumed to have a single layer (e.g. a Parallelepiped that is one cell high, or a SpherePattern containing only one spherical layer); since changes in yaw occur only on one plane of movement, it would be impossible to reach a cell in any of the other layers.


Model of



Public Types

typedef boost::mpl::true_ RequiresSingleLayer
typedef boost::mpl::true_ RequiresLastVisitedMap

Static Public Member Functions

template<typename Pattern>
Pattern::OutDegree getInputCount (const Pattern &pattern)
template<typename Pattern>
Pattern::DirectionChange getInput (const Pattern &pattern, const typename Pattern::CellIndex previous_cell_i, const typename Pattern::CellIndex current_cell_i, const typename Pattern::CellIndex next_cell_i)


Member Typedef Documentation

typedef boost::mpl::true_ msmazes::FSMYawInputMaker::RequiresSingleLayer
 

This FSM Input Maker does require a single layer.

typedef boost::mpl::true_ msmazes::FSMYawInputMaker::RequiresLastVisitedMap
 

This FSM Input Maker does require a last-visited map.


Member Function Documentation

template<typename Pattern>
Pattern::OutDegree msmazes::FSMYawInputMaker::getInputCount const Pattern &  pattern  )  [inline, static]
 

Calculates the number of possible inputs that the finite state machine can process, as defined in the FSM Input Maker concept. Returns the maximum number of edges from any source vertex in the pattern's underlying graph.

template<typename Pattern>
Pattern::DirectionChange msmazes::FSMYawInputMaker::getInput const Pattern &  pattern,
const typename Pattern::CellIndex  previous_cell_i,
const typename Pattern::CellIndex  current_cell_i,
const typename Pattern::CellIndex  next_cell_i
[inline, static]
 

Calculates the input required for the finite state machine to change state from pointing to the cell at index current_cell_i to pointing to the cell at index next_cell_i, as defined in the FSM Input Maker concept. A value of pattern.getMaxOutDegree() - 1 indicates a U-turn input, while a value of zero corresponds to the most negative rotation (clockwise or counterclockwise) that is not a U-turn.


Multi-State Mazes in C++ is hosted by SourceForge.net. Use the Table of Contents for navigation.