Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# SpriteRenderState.h

Go to the documentation of this file.

    00001 //------------------------------------------------------------------------------
    00002 // Lamp : Open source game middleware
    00003 // Copyright (C) 2004  Junpei Ohtani ( Email : junpee@users.sourceforge.jp )
    00004 //
    00005 // This library is free software; you can redistribute it and/or
    00006 // modify it under the terms of the GNU Lesser General Public
    00007 // License as published by the Free Software Foundation; either
    00008 // version 2.1 of the License, or (at your option) any later version.
    00009 //
    00010 // This library is distributed in the hope that it will be useful,
    00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00013 // Lesser General Public License for more details.
    00014 //
    00015 // You should have received a copy of the GNU Lesser General Public
    00016 // License along with this library; if not, write to the Free Software
    00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    00018 //------------------------------------------------------------------------------
    00019
    00020 /** @file
    00021  * スプライトレンダーステートヘッダ
    00022  * @author Junpee
    00023  */
    00024
    00025 #ifndef SPRITE_RENDER_STATE_H_
    00026 #define SPRITE_RENDER_STATE_H_
    00027
    00028 namespace Lamp{
    00029
    00030 class SpriteGraphicsBuffer;
    00031 class SpritePicture;
    00032
    00033 //------------------------------------------------------------------------------
    00034 /**
    00035  * スプライトレンダーステート
    00036  */
    00037 class SpriteRenderState{
    00038 friend class SpriteRenderer;
    00039 public:
    00040     //--------------------------------------------------------------------------
    00041     // 描画
    00042     //--------------------------------------------------------------------------
    00043     /**
    00044      * リクエスト
    00045      * @param picture ピクチャ
    00046      * @param minPosition 最小位置
    00047      * @param maxPosition 最大位置
    00048      * @param minUV 最小UV
    00049      * @param maxUV 最大UV
    00050      */
    00051     virtual void request(SpritePicture* picture,
    00052         const Point2f& minPosition, const Point2f& maxPosition,
    00053         const TexCoord2& minUV, const TexCoord2& maxUV);
    00054
    00055     /**
    00056      * レンダリング
    00057      */
    00058     virtual void render();
    00059
    00060     /**
    00061      * レンダーターゲットサイズの取得
    00062      * @return レンダーターゲットサイズ
    00063      */
    00064     virtual const DimensionF& getRenderTargetSize(){
    00065         return renderTargetSize_;
    00066     }
    00067 protected:
    00068     //--------------------------------------------------------------------------
    00069     // 生成、破棄
    00070     //--------------------------------------------------------------------------
    00071     /**
    00072      * コンストラクタ
    00073      */
    00074     SpriteRenderState(SpriteGraphicsBuffer* graphicsBuffer);
    00075
    00076     /**
    00077      * デストラクタ
    00078      */
    00079     virtual ~SpriteRenderState();
    00080
    00081 private:
    00082     //--------------------------------------------------------------------------
    00083     // コピーコンストラクタの隠蔽
    00084     SpriteRenderState(const SpriteRenderState& copy);
    00085
    00086     // 代入コピーの隠蔽
    00087     void operator =(const SpriteRenderState& copy);
    00088
    00089     // グラフィックスバッファ
    00090     SpriteGraphicsBuffer* graphicsBuffer_;
    00091     // ピクチャ
    00092     SpritePicture* picture_;
    00093     // レンダーターゲットサイズ
    00094     DimensionF renderTargetSize_;
    00095
    00096 };
    00097
    00098 //------------------------------------------------------------------------------
    00099 } // End of namespace Lamp
    00100 #endif // End of SPRITE_RENDER_STATE_H_
    00101 //------------------------------------------------------------------------------
    00102