00001
00008
00009
00010
00011
00012
00013 #ifndef ENG_SPRITE_HH
00014 #define ENG_SPRITE_HH 1
00015
00016 namespace eng {
00017
00033 class Sprite : public Object
00034 {
00035 ;
00036 typedef Object Parent;
00037
00038 public:
00039 typedef vector<shptr<Texture> > Textures;
00040
00041 public:
00042 Sprite( const WorldVertex& pos, const fp width, const string textureName, const RGBA color );
00043 Sprite( const WorldVertex& pos, const fp width, Textures textures, const RGBA color );
00044 Sprite( const WorldVertex& pos, const fp width, SharedPtr<Texture> texture, const RGBA color );
00045 ~Sprite();
00046 bool IfTranslucent( void ) { return true; }
00047 void SetTextureFunc( const Texture::eFunc textureFunc );
00048 const string GetName( void ) { return string("Sprite"); }
00049 bool Reproducible( void ) { return true; }
00050 void Draw( void );
00051
00052 private:
00053 SharedPtr0<Volume> ComputeSpriteVolume( const WorldVertex& pos, const fp width );
00054 void ComputeEyeVertexs( EyeVertex ev[4] );
00055
00056 protected:
00057 fp mWidth;
00058 Textures mTextures;
00059 Texture::eFunc mTextureFunc;
00060 RGBA mColor;
00061 };
00062
00063 }
00064
00065 #endif // ENG_SPRITE_HH