|
| class | ObjectPool |
| | : implement a generic pool of objects that are stored continuously in memory without fragmentation, and is in theory thread safe More...
|
| struct | Polygon |
| | Polygon is a series of N points, ranged in clock-wise order and that form a convex shape. More...
|
| struct | Line |
| | Define a line with two points. More...
|
| struct | Circle |
| | Define a Circle with a center and a radius. More...
|
| class | Gui |
| | implement gui following the immediate gui principles, like dear-imgui, but with more control over the textures used for widgets, sounds effects and animations. More...
|
| class | ClippingLayers |
| | Handle clipping layers to only draw things in a given box. More...
|
| struct | WidgetDrawOptions |
| | Store options for drawing widgets. More...
|
| struct | TextDrawOptions |
| | Store options for drawing text. More...
|
| class | GuiRender |
| | Handle rendering for the gui. More...
|
| struct | PlotRange |
| | plot range for an axis More...
|
| class | Plotter |
| | plot function in a given range and level of sampling. More...
|
| class | PrimitiveShapeRender |
| | render primitive shapes using vertex array. More...
|
| class | TextureMeshes |
| | Compute texture meshes for a given texture map. More...
|
| struct | LayoutEntry |
| | Data structure stored in Layout. Its a dumb std::variant basically... More...
|
| class | Layout |
| | allow to store and load Gui layou More...
|
| class | ResourcesHolder |
| | load and hold resources of all kind (image, music, etc.), that can be retrieved with Identifier that are comparable. Note that Resource should implement a "bool loadFromFile" function for this holder to work. sf::Font use openFromFile, but it's handled with type test. More...
|
| class | SoundPlayer |
| | Allow to play spatialized sounds. More...
|
| class | TextContainer |
| | store text accessible with a string key, with option to load and store text for a given tongue, so it has simple support for localisation. More...
|
| struct | Frames |
| | Store frames count and textures to ease serialization and for better interface. More...
|
| class | TextureAtlas |
| | Contains texture position and sub-box of all sprites for a given sprite sheet. Animations ca be handled with the following restrictions: More...
|
| struct | CollageOptions |
| | Options for collage. More...
|
| class | TextureCollage |
| | Allow user to make a collage of several textures in one image. More...
|
| struct | WidgetAspect |
| | Store data required to fully customize how a widget is drawn. More...
|
| struct | Constraints |
| | Store constraints on position for gui panel. Alignment always precede relative position. More...
|
| struct | Tooltip |
| | store tooltip in a function with its parent widget ID More...
|
| struct | WidgetOptions |
| | Store widget options : tooltip, position, description. More...
|
| struct | TextOptions |
| | Store text options : boxSize, centered, type, etc. More...
|
| struct | Panel |
| | store panel posiiton, size and some parameters More...
|
| struct | Window |
| | small struct to ease use of beginPanel and beginWindow in Gui More...
|
| struct | FontSize |
| | font size container More...
|
| struct | Style |
| | define gui font style and padding More...
|
|
| template<typename Type> |
| constexpr sf::Vector2< Type > | round (const sf::Vector2< Type > &value) |
| | Round sf::Vector2 components.
|
| template<typename Type> |
| constexpr sf::Vector2< Type > | round (const sf::Vector3< Type > &value) |
| | Round sf::Vector3 components.
|
| template<typename Type> |
| constexpr Type | lerp (const Type &min, const Type &max, const float value) |
| | Linear interpolation between min and max if value belong to [0, 1], with extrapolation otherwise (see clampedLerp).
|
| sf::Color | lerp (const sf::Color &a, const sf::Color &b, const float value) |
| | Interpolate between two color, value is clamped to [0, 1].
|
| template<typename Type> |
| constexpr Type | clamp (const Type min, const Type max, const Type value) |
| | Clamp value between min and max.
|
| template<typename Type> |
| constexpr Type | clampedLerp (const Type &min, const Type &max, const float value) |
| | Clamped linear interpolation, it always return a value in [min, max] regardless of if value is in [0, 1] or not.
|
| template<typename Type> |
| constexpr float | inverseLerp (const Type &min, const Type &max, const Type &value) |
| | Inverse linear interpolation. Return in [0, 1] range if value is in [min, max].
|
| template<typename InputType, typename OutputType> |
| constexpr OutputType | remap (const InputType &minInput, const InputType &maxInput, const OutputType &minOutput, const OutputType &maxOutput, const InputType &value) |
| | Remap a value from [minInput, maxInput] range to [minOutput, maxOutput], depending on where value is in [minInput, maxInput].
|
| template<size_t N> |
| Polygon< N > | makeRegularPolygon (const sf::Vector2f ¢er, const float size) |
| | make a regular polygon, like hexagon or octogon, around a center
|
| template<size_t N> |
| constexpr sf::Vector2f | centroid (const Polygon< N > &polygon) |
| | Return center of polygon.
|
| template<size_t N> |
| constexpr sf::FloatRect | boundingBox (const Polygon< N > &polygon) |
| | Return a box that bounds polygon.
|
| template<typename Type> |
| constexpr sf::Vector2f | centroid (const std::vector< sf::Vector2< Type > > &vertices) |
| | Return center of a set of points.
|
| void | computeMesh (Mesh &mesh, const sf::FloatRect &box) |
| | Compute mesh quad coordinates.
|
| void | computeMeshTexture (Mesh &Mesh, const sf::IntRect &textureRect) |
| | compute texture coordinates from a rect
|
| void | rotateMeshTexture (Mesh &mesh) |
| | Rotate a mesh texture by 90°
|
| template<typename LayoutData> |
| constexpr std::string | layoutTypeName () |
| | return special prefix to avoid name collision and to infer type from file
|
| void | saveInFile (const json &out, const std::string &file, const bool compact=false) |
| | save json to file
|
| json | loadFromFile (const std::string &file) |
| | load json from file
|
| bool | loadFromFile (Layout &layout, const std::string &file) |
| void | saveInFile (const Layout &layout, const std::string &file, const bool compact) |
| template<typename Key, typename Type> |
| bool | loadFromFile (std::unordered_map< Key, Type > &table, const std::string &file) |
| template<typename Key, typename Type> |
| void | saveInFile (const std::unordered_map< Key, Type > &table, const std::string &file, const bool compact=false) |
| bool | loadFromFile (TextureAtlas &atlas, const std::string &file) |
| void | saveInFile (const TextureAtlas &atlas, const std::string &file, const bool compact) |
| | NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT (Frames, count, texture) |
| template<typename Key, typename Type> |
| void | to_json (json &j, const std::unordered_map< Key, Type > &table) |
| template<typename Key, typename Type> |
| void | from_json (const json &j, std::unordered_map< Key, Type > &table) |
| template<typename Object, typename ObjectId> |
| void | to_json (json &j, const ObjectPool< Object, ObjectId > &pool) |
| template<typename Object, typename ObjectId> |
| void | from_json (const json &j, ObjectPool< Object, ObjectId > &pool) |
| | NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT (FontSize, normal, title, subtitle, footnote) |
| | NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT (Style, fontSize, fontColor, itemSpacing) |
| | NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT (Panel, movable, visible, closable, hasHeader, size, position, title) |
| | NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT (Constraints, vertical, horizontal, relativePosition) |
| | NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT (Window, panel, constraints) |
| | NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT (LayoutEntry, panel, position, constraints, window) |
| | NLOHMANN_JSON_SERIALIZE_ENUM (VerticalAlignment, { {VerticalAlignment::None, "VerticalAlignment::None"}, {VerticalAlignment::Top, "VerticalAlignment::Top"}, {VerticalAlignment::Bottom, "VerticalAlignment::Bottom"}, {VerticalAlignment::Center, "VerticalAlignment::Center"}, }) NLOHMANN_JSON_SERIALIZE_ENUM(HorizontalAlignment |