1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of // the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/ //! Defines data structures and functionality used to build and manipulate space-like and time-like //! relations between surfaces. //! //! ## Structure //! //! Frames are organized in tree-like structure with one root. Children of every branch have two //! orders: //! //! - *time-like* - describing the order of use of frames in given branch //! - *space-like* - describing placement order as drawn on screen //! //! ## Manipulations //! //! Basic manipulation in the tree is to *append*, *prepend* or *join* frames in spatial order. //! Using these manipulations added frame always becomes last in time order. To become first in //! time order the frame must be *pop*-ed. //! //! ## Extensions //! //! Extensions to basic functionality are implemented by traits first to clearly separate //! functionalities, secondly to make files shorter by breaking code to different modules. //! //! - `searching` - gives more advance or common ways to find specified frames //! - `settle` - implements common ways of adding or moving frames //! //! ## Implementation //! //! Frame tree is cyclic graph with each node optionally pointing to: //! //! - parent //! - next sibling in time order //! - previous sibling in time order //! - first child in time order //! - last child in time order //! - next sibling in space order //! - previous sibling in space order //! - first child in space order //! - last child in space order //! //! Current implementation uses unsafe raw pointers. This make implementation faster and simpler //! than with other more idiomatic ways, but loses Rusts guaranties. Runtime safety is ensured by //! unit tests. extern crate cognitive_qualia as qualia; mod frame; pub use frame::{Frame, FrameSpaceIterator, FrameTimeIterator, Side, Parameters}; pub use frame::{Geometry, Mobility, Mode}; mod converting; pub use converting::Converting; mod packing; pub use packing::Packing; mod searching; pub use searching::Searching; mod settling; pub use settling::Settling; #[cfg(feature = "testing")] pub mod representation;