Skip to content

Namespaces

Maverick Peppers edited this page Mar 17, 2019 · 24 revisions

Swoosh as a stand-alone library also comes with other utilities specific to but not limited to gaming.

using namespace swoosh;

The basics

ActionList and useful action item types

using namespace swoosh::ease;

Math that makes cool animations over time with little effort

Each function returns a value from 0 -> 1.0

using namespace swoosh::intent;

Aliases tucked away to make the library easier to use

  • typename segue<Segue, Duration>::to<Destination>
  • typename seconds
  • typename milliseconds
  • typename microseconds

Inputs used for some segues

  • enum direction { left, right, up, down };

using namespace swoosh::glsl;

Shader effects you can use in your SFML apps or create custom segue effects

Also exports the GLSL(version, shader) macro that makes it easy to write shaders directly into your source files.

  • class Shader
  • class FastGausianBlur
  • class Checkerboard
  • class CircleMask
  • class RetroBlit
  • class CrossZoom
  • class Morph
  • class PageTurn
  • class Pixelate
  • class RadialCCW

Each shader object can [apply()](https://github.com/TheMaverickProgrammer/Swoosh/blob/master/src/Swoosh/Shaders.h#L24) themselves directly onto a render surface or use const sf::Shader& getShader() const to grab the shader info object object and apply directly onto other sprites in your scene.

using namespace swoosh::game;

Game logic and utility functions to shorten SFML code

Clone this wiki locally