5#ifndef PORTFOLIO_POSITIONABLE_H
6#define PORTFOLIO_POSITIONABLE_H
69 float velocityX{}, velocityY{}, framerate = 60.f;
72 std::queue<sf::Vector2f> points;
73 bool scrolling =
false;
77 void generateExponential(
sf::Vector2f position,
float duration);
237#include "../../../src/Traits/Positionable.tpp"
Trait that provides position, bounds, and animated movement.
bool isScrolling()
Return true while a moveTo or moveDistance animation is in progress.
void setBelow(T &obj, float spacing=0)
Position this object immediately below obj.
void center(T &obj)
Center this object within obj (both axes).
void setAbove(T &obj, float spacing=0)
Position this object immediately above obj.
void centerVertically(T &obj)
Center this object vertically within obj.
void moveDistance(sf::Vector2f distance, float seconds=1.f)
Animate by a relative offset from the current position.
virtual sf::FloatRect getGlobalBounds() const =0
Return the axis-aligned bounding box in world space.
void centerHorizonally(T &obj)
Center this object horizontally within obj.
void setRightOf(T &obj, float spacing=0)
Position this object immediately to the right of obj.
void moveTo(sf::Vector2f position, float seconds=1.f)
Animate to an absolute world-space position.
virtual void setPosition(const sf::Vector2f &position)=0
Set the world-space position immediately (no animation).
void setFramerate(float framerate)
Set the assumed framerate for movement interpolation.
void setLeftOf(T &obj, float spacing=0)
Position this object immediately to the left of obj.
void moveTo(sf::FloatRect position, float seconds=1.f)
Animate to a position defined by a FloatRect origin.
void centerText(sf::Text &obj)
Center an sf::Text object within this object's bounds.
virtual sf::Vector2f getPosition() const =0
Return the current world-space position.
Empty marker base class for all Malena traits.
Tween
Easing curve selection for animated movement.
Vector2< float > Vector2f