UGDK
src/ugdk/graphic/drawable/texturedrectangle.h
Go to the documentation of this file.
00001 #ifndef UGDK_GRAPHIC_DRAWABLE_TEXTUREDRECTANGLE_H_
00002 #define UGDK_GRAPHIC_DRAWABLE_TEXTUREDRECTANGLE_H_
00003 
00004 #include <ugdk/base/types.h>
00005 #include <ugdk/graphic.h>
00006 #include <ugdk/graphic/drawable/shape.h>
00007 
00008 namespace ugdk {
00009 namespace graphic {
00010 
00011 class TexturedRectangle : public Shape {
00012   public:
00013     TexturedRectangle(Texture* texture);
00014     TexturedRectangle(Texture* texture, const Vector2D& size);
00015     ~TexturedRectangle();
00016 
00017     void Update(double dt);
00018     void Draw() const;
00019 
00020     const Vector2D& size() const { return size_; }
00021     void set_size(const Vector2D& size) { size_ = size; }
00022 
00023   private:
00024     Vector2D size_;
00025     Texture* texture_;
00026 };
00027 
00028 }  // namespace graphic
00029 }  // namespace ugdk
00030 
00031 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines