#ifndef _2DOBJECT_H_
#define _2DOBJECT_H_

#include "../App/EngineH.h"

class C_2DOBJECT_0
{
private:
	CVector2		_pos;
	float			_width, _height;
	TRGBf			_fColor;
	unsigned int	_texture_id;
	uint			_begin_tag;
	bool			_alpha;
	bool			_blend;
	bool			_neAktBlend;

	inline	void	_doOrtho();
	inline	void	_backOrtho();
public:
	C_2DOBJECT_0();
	C_2DOBJECT_0(TRect rect);
	C_2DOBJECT_0(uint texture_id, TRect rect);
	C_2DOBJECT_0(const float x,const float y,const float width,const float height);
	C_2DOBJECT_0(uint texture_id,const float x,const float y,const float width,const float height);

public:
	void SetBlend( bool b) {_blend = b;}
	void SetPos(const float x,const float y,const float width,const float height)
	{
		_pos.x = x;
		_pos.y = y;
		_width = width;
		_height = height;
	}
	void SetNoBlend( bool b ) {_neAktBlend=b;};
	void SetColor(TRGBf c) {_fColor = c;}
	void SetColorf(float r,float g,float b) {_fColor.r = r;_fColor.g = g;_fColor.b = b;}
	TRGBf GetColor() const {return _fColor;}

	void SetTextureId(unsigned int id) {_texture_id = id;}
	unsigned int GetTextureId() const {return _texture_id;}
	void SetBeginTag(uint tag) {_begin_tag = tag;}

	void SetAplha(bool b) {_alpha = b;}
	bool GetAlpha() const {return _alpha;}

	virtual void Render();
};

#endif //_2DOBJECT_H_