a8abb4afc9
The sprite inherits from Poseable. It is intended to allow for pure 2D rendering or integration of sprites/particles into 3D scenes. Eventually an ImageScene should be created to test out the image loading, sprite movement and rotation, and 2D camera functionality for the builtin engine.
22 lines
432 B
C++
22 lines
432 B
C++
#pragma once
|
|
|
|
#include <glm/glm.hpp>
|
|
|
|
#include "Poseable.h"
|
|
|
|
namespace charcoal
|
|
{
|
|
class Sprite : private Poseable
|
|
{
|
|
public:
|
|
Sprite(const vec2& position = vec2(0.0f, 0.0f));
|
|
|
|
void update_position(const vec2& position);
|
|
void update_rotation(float angle);
|
|
|
|
void translate(const vec2& translation);
|
|
void rotate(float angle);
|
|
|
|
const mat4& get_orientation_matrix() const { return Poseable::get_orientation_matrix(); }
|
|
};
|
|
} |