[Edit] This post is outdated. Please use now this thread to discuss about the next version of Thor.Good evening,
I would like to present a project I have been working on the last time.
Thor is an open-source C++ library which provides extensions of SFML. There have been a lot of feature requests in the forum that were either too high level or out of scope for integration into SFML. Nevertheless, some of them are very useful in game and multimedia programming. That is why I have implemented some of them, hoping that SFML users can benefit from the functionality.
Thor is completely free to use, like SFML it is licensed under zlib/libpng.
FeaturesThe Thor C++ library comes with the following small modules:
Vectors- 2D Vector algebra functions: Dot product, compute length and angles, ...
- 3D Vector algebra functions: Dot and cross product, compute length and angles, ...
- PolarVector: 2D vector class that stores polar coordinates
Geometry- Zone class hierarchy for geometric figures
- Base classes for positionable, rotatable and scalable objects
Particles- ParticleSystem class based on sf::Image, stores and manages particles (lifetime, transformations, color, ...)
- Customizable Emitter and Affector classes
Events- SfmlEventSystem class to handle SFML events via callbacks
- EventSystem template for user-defined events
Resources- ResourceManager class template that allows safe and easy loading, storage and access to resources
- ResourcePtr provides shared access to resources
- Predefined helper classes for SFML resources like sf::Image
Multimedia- ConcaveShape class: As an extension to sf::Shape, it works with concave shapes
- Arrow class to visualize vectors
- Color blending and simple construction of color gradients
- String conversion functions for a few SFML classes like sf::Vector
Time- StopWatch class: Wrapper around sf::Clock for pausable clocks
- Timer class: Countdown mechanism
- TriggeringTimer class: Countdown invoking callbacks at expiration
Tools- SingleDispatcher: Dynamic dispatch to unary functions
- DoubleDispatcher: Dynamic dispatch to binary functions (multimethods)
- Other utility like foreach macros
SmartPtr- ScopedPtr: Local RAII smart pointer
- MovedPtr: Movable smart pointer implementation
- CopiedPtr: Smart pointer with deep copy semantics
Math- Generalization of trigonometry functions
- Random number generator based on TR1
- Delaunay triangulation
DownloadYou can download version 1.0 directly
on my homepage. You will also find tutorials and the API documentation there. I use CMake to build the source code, but I also supply precompiled binaries for some configurations. Note that the library bases on the newest Git revisions of SFML 2.
In the next days, I am going to setup an SVN repository so that you are able to follow the development of the Thor C++ library.
OutlookI try to improve the library continuously, so I appreciate feedback, be it bug reports, feature requests or general discussions. Let me know what you like to be part of Thor, and I can think about it. One of the tasks I am planning to implement in near future is a design that allows easy animations with sf::Sprite, another example is a Z buffer.