#include <Transformable.hpp>
A Drawable object supporting several transformations:
Definition at line 21 of file Transformable.hpp.
◆ blend_mode()
const BlendMode & smk::TransformableBase::blend_mode |
( |
| ) |
const |
|
inline |
◆ color()
const glm::vec4 & smk::TransformableBase::color |
( |
| ) |
const |
|
inline |
◆ Draw()
Draw the object on a RenderTarget.
- Parameters
-
Implements smk::Drawable.
Definition at line 147 of file Transformable.cpp.
147 {
148 state.color *= color();
149 state.texture = texture();
150 state.view *= transformation();
151 state.vertex_array = vertex_array();
152 state.blend_mode = blend_mode();
153 target.Draw(state);
154}
◆ SetBlendMode()
void smk::TransformableBase::SetBlendMode |
( |
const BlendMode & |
blend_mode | ) |
|
Set the blending mode to be used for drawing the object.
- Parameters
-
Definition at line 133 of file Transformable.cpp.
133 {
134 blend_mode_ = blend_mode;
135}
◆ SetColor()
void smk::TransformableBase::SetColor |
( |
const glm::vec4 & |
color | ) |
|
◆ SetTexture()
void smk::TransformableBase::SetTexture |
( |
Texture |
texture | ) |
|
Set the object's texture.
Definition at line 138 of file Transformable.cpp.
138 {
139 texture_ = std::move(texture);
140}
◆ SetVertexArray()
void smk::TransformableBase::SetVertexArray |
( |
VertexArray |
vertex_array | ) |
|
Set the object's shape.
Definition at line 143 of file Transformable.cpp.
143 {
144 vertex_array_ = std::move(vertex_array);
145}
◆ texture()
const Texture & smk::TransformableBase::texture |
( |
| ) |
const |
|
inline |
◆ transformation()
virtual glm::mat4 smk::TransformableBase::transformation |
( |
| ) |
const |
|
pure virtual |
◆ vertex_array()
const VertexArray & smk::TransformableBase::vertex_array |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files: