/* ==================================================================== * ÆÄ ÀÏ : PlaneObject.h * ¸ñ Àû : 2D ·£´õ¸µ ±âº» °´Ã¼ * ÀÛ ¼º ÀÚ : À̹ý¼® * ÀÛ ¼º ÀÏ : 2006.12 * ÁÖÀÇ»çÇ× : Ç×»ó °°Àº Property·Î Âï°Ô µÇ´Â °´Ã¼µéÀº µû·Î °ü¸®Çϼ¼¿ä * =================================================================== */ #pragma once class NiTexture; class NiTexturingProperty; class NiAlphaProperty; class NiZBufferProperty; class cPlaneObject { public: cPlaneObject(); virtual ~cPlaneObject(); /// »ý¼ººÎ virtual bool Create( const char* pathName, int screenX, int screenY, unsigned int screenW, unsigned int screenH, unsigned int texLeft, unsigned int texTop, unsigned int texRight, unsigned int texBottom ); /// »ý¼ººÎ virtual bool Create( NiTexture* pTexture, int screenX, int screenY, unsigned int screenW, unsigned int screenH, unsigned int texLeft, unsigned int texTop, unsigned int texRight, unsigned int texBottom ); /// Ãâ·ÂºÎ virtual void Process( unsigned long accumTime ) {} virtual void Draw(); inline int GetScreenX() { return mScreenX; } inline int GetScreenY() { return mScreenY; } inline unsigned int GetScreenW() { return mScreenW; } inline unsigned int GetScreenH() { return mScreenH; } /// ½ºÅ©¸° ÁÂÇ¥ ¼ÂÆÃ void SetScreenXY( int screenX, int screenY ); void SetScreenX( int screenX ); void SetScreenY( int screenY ); /// ½ºÅ©¸° »ó¿¡¼­ Å©±â void SetScreenWH( unsigned int screenW, unsigned int screenH ); void SetScreenWidth( unsigned int screenW ); void SetScreenHeight( unsigned int screenH ); void SetScreenRect( int screenX, int screenY, unsigned int screenW, unsigned int screenH ); /// ÅØ½ºÃÄ UV ¼ÂÆÃ virtual void SetTextureRect( unsigned int texLeft, unsigned int texTop, unsigned int texRight, unsigned int texBottom ); /// Á¤Á¡ Ä÷¯ Á¤º¸ ¼ÂÆÃ void SetColorA( float r, float g, float b, float a ); void SetColorA( NiColorA color ); /// ȸÀü ¹× À̵¿ /// Àý´ëÁÂÇ¥. void UpdateImage(); void SetTranslate( int x, int y ); void SetRotate( float angle ); inline NiAlphaProperty* GetAlphaProp() { return mpAlphaProp; } inline NiTexturingProperty* GetTexturingProp() { return mpTextureProp; } void SetRenderTargetWH( unsigned int width, unsigned int height ); protected: /// Á¤Á¡ Á¤º¸¿Í °ü¸® Á¤º¸¸¦ °®´Â ±âº» °´Ã¼ NiMeshScreenElementsPtr mpScreenElement; /// ÅØ½ºÃÄ Á¤º¸ÀÇ º¯°æÀ» ¿ëÀÌÇÏ°Ô Çϱâ À§ÇÑ ÂüÁ¶ ¹× °ü¸® º¯¼ö NiTexturingProperty* mpTextureProp; /// ¾ËÆÄ ºí·£µùÀ» À§ÇÑ ÂüÁ¶ ¹× °ü¸® º¯¼ö NiAlphaProperty* mpAlphaProp; /// »ç¿ë ÅØ½ºÃÄÀÇ Àüü Å©±â unsigned int mTextureWidth; unsigned int mTextureHeight; /// ÅØ½ºÃĻ󿡼­ÀÇ À§Ä¡ unsigned int mTexLeft; unsigned int mTexTop; unsigned int mTexRight; unsigned int mTexBottom; /// È­¸é»ó¿¡¼­ÀÇ À§Ä¡ ¹× Å©±â int mScreenX; int mScreenY; unsigned int mScreenW; unsigned int mScreenH; unsigned int mRenderTargetWidth; unsigned int mRenderTargetHeight; float mScaleX; float mScaleY; /// ȸÀü °¢µµ float mAngle; NiPoint2 mVertex[4]; NiPoint2 mCenter; };