b7456401e0
Added image scene to render an image in a scene. There is also now a testing image that is an uber meme. Currently the problem is that the spritebatch cannot use the offsetof macro because it is a templated class. Possible solutions to this are changing it to be specifyable or implemented per vertex type as the other batches have been.
29 lines
553 B
C++
29 lines
553 B
C++
#include "Poseable2D.h"
|
|
|
|
namespace charcoal
|
|
{
|
|
Poseable2D::Poseable2D(const vec2& position) : Poseable(vec3(position, 0.0f))
|
|
{}
|
|
|
|
void Poseable2D::update_position(const vec2& position)
|
|
{
|
|
Poseable::update_position(vec3(position, 0.0f));
|
|
}
|
|
|
|
void Poseable2D::update_rotation(float angle)
|
|
{
|
|
Poseable::reset_orientation();
|
|
rotate(angle);
|
|
}
|
|
|
|
void Poseable2D::translate(const vec2& translation)
|
|
{
|
|
Poseable::translate(vec3(translation, 0.0f));
|
|
}
|
|
|
|
void Poseable2D::rotate(float angle)
|
|
{
|
|
Poseable::rotate(vec3(0.0f, 0.0f, 1.0f), angle);
|
|
}
|
|
}
|