5#ifndef SMK_TRANSFORMABLE
6#define SMK_TRANSFORMABLE
8#include <smk/Drawable.hpp>
9#include <smk/RenderState.hpp>
24 virtual glm::mat4 transformation()
const = 0;
27 void SetColor(
const glm::vec4& color);
28 const glm::vec4& color()
const {
return color_; }
32 const Texture& texture()
const {
return texture_; }
36 const BlendMode& blend_mode()
const {
return blend_mode_; }
40 const VertexArray& vertex_array()
const {
return vertex_array_; }
53 glm::vec4 color_ = {1.0, 1.0, 1.0, 1.0};
69 void SetCenter(
float center_x,
float center_y);
73 void Move(
const glm::vec2& move);
74 void Move(
float x,
float y);
79 void Rotate(
float rotation);
84 void SetScale(
const glm::vec2& scale);
85 void SetScale(
float scale_x,
float scale_y);
100 float rotation_ = 0.f;
101 glm::vec2 center_ = {0.f, 0.f};
102 glm::vec2 position_ = {0.f, 0.f};
103 glm::vec2 scale_ = {1.0, 1.0};
116 glm::mat4 transformation()
const override;
126 glm::mat4 transformation_ = glm::mat4(1.f);
Interface for class that can be draw to a smk::RenderTarget.
An array of smk::Vertex moved to the GPU memory. This represent a set of triangles to be drawn by the...
static const BlendMode Alpha
destination = source * source.a + destination * (1 - souce.a)
Contain all the data needed to draw.