eng_sprite.hh

Go to the documentation of this file.
00001 /*
00008  * LEGAL:   COPYRIGHT (C) 2007 JIM E. BROOKS
00009  *          THIS SOURCE CODE IS RELEASED UNDER THE TERMS
00010  *          OF THE GNU GENERAL PUBLIC LICENSE VERSION 2 (GPL 2).
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;  // slices
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 } // namespace eng
00064 
00065 #endif // ENG_SPRITE_HH
Palomino 3D Engine documents generated by doxygen 1.5.3 on Fri Nov 23 11:26:09 2007