Files
BlitzNext/Runtime/blitz3d/sprite.hpp
T

46 lines
859 B
C++
Raw Normal View History

2019-01-18 21:26:42 +01:00
#pragma once
2019-01-18 15:55:06 +01:00
#include "brush.hpp"
2019-01-18 17:04:17 +01:00
#include "gxmesh.hpp"
#include "model.hpp"
class Sprite : public Model {
public:
enum {
VIEW_MODE_FREE = 1, //visible from any angle
VIEW_MODE_FIXED = 2, //visible only from front
VIEW_MODE_UPRIGHT = 3, //upright tree-style
VIEW_MODE_UPRIGHT2 = 4 //better upright tree-style
2014-01-31 08:23:00 +13:00
};
Sprite();
2019-01-18 17:04:17 +01:00
Sprite(const Sprite& t);
2014-01-31 08:23:00 +13:00
~Sprite();
2019-01-18 17:04:17 +01:00
Sprite* getSprite()
{
return this;
}
2014-01-31 08:23:00 +13:00
2019-01-18 17:04:17 +01:00
Entity* clone()
{
return new Sprite(*this);
}
2014-01-31 08:23:00 +13:00
void capture();
2019-01-18 17:04:17 +01:00
bool beginRender(float tween);
2014-01-31 08:23:00 +13:00
2019-01-18 17:04:17 +01:00
void setRotation(float angle);
void setScale(float x_scale, float y_scale);
void setHandle(float x, float y);
void setViewmode(int mode);
2014-01-31 08:23:00 +13:00
2019-01-18 17:04:17 +01:00
bool render(const RenderContext& rc);
2014-01-31 08:23:00 +13:00
2019-01-18 17:04:17 +01:00
private:
float xhandle, yhandle;
float rot, xscale, yscale;
float r_rot, r_xscale, r_yscale;
int view_mode, mesh_index;
bool captured;
2014-01-31 08:23:00 +13:00
};