#pragma once //#include "KUIControl.h" #include "K3DCamera.h" #include "KPrimitiveSprite.h" #include "KSmartPtr.h" // MiniMap Static Control DECL_SPTR(KResSprite) DECL_SPTR(K3DTexture) class KUIControlMiniMapStatic : public KUIControl { public: KUIControlMiniMapStatic(); ~KUIControlMiniMapStatic(); virtual void Create(KUIWND_CREATE_ARG& CREATE_ARG); virtual void Render(KViewportObject * pViewport, bool isFront = false ); virtual void OnPosChangeNofity(int XOffset, int YOffset); virtual void OnAlphaChangeNotify(float fAlpha); virtual DWORD OnMouseMessage(DWORD dwMessage, int x, int y); void SetRenderTarget( K3DTexture* ); void SetRectRatio( float fValue ); protected: K3DTextureSPtr m_spRenderTarget; KResSpriteSPtr m_spRes; KSpritePrimitive m_prSprite; }; // 3D Static Control class KSeqAvatarEx; class SViewPort; DECL_SPTR(K3DRenderTarget) class KUIControl3DStatic : public KUIControl { public: KUIControl3DStatic(); ~KUIControl3DStatic(); virtual void OnPosChangeNofity(int XOffset, int YOffset); void SetSeqForm( KSeqAvatarEx *pSeq, KSize sizeTarget, int nObjType, K3DVertex & pos ); void SetCamPos( K3DVertex & pos ); /// SetCamPos는 다른 데이타들도 초기화 해버리기 때문에, 순수하게 카메라 위치만 바꿔주는 함수를 만듬 - prodongi void SetCamPosOnly(K3DVector const& pos); void SetCamTargetPos( K3DVertex & pos ); void SetCameBoneIndex( int nIndex ) { m_nCamBoneIndex = nIndex; } void SetAutoTargetMode( bool bMode ) { m_bAutoTargetMode = bMode; } bool IsAutoTargetMode() { return m_bAutoTargetMode; } void SetFullExpression( bool bValue ) { m_bFullExpression = bValue; } bool IsFullExpression() { return m_bFullExpression; } void SetAniName( const char * pAniName ) { m_strAniName = pAniName; } void SetEnableLight( bool bValue ) { m_bEnableLight = bValue; } bool IsEnableLight() { return m_bEnableLight; } void SetLightDirection( float x, float y, float z ); void SetLightDiffuseColor( K3DColor color ); void SetLightSpecularColor( K3DColor color ); void SetLightAmbientColor( K3DColor color ); virtual void Create(KUIWND_CREATE_ARG& CREATE_ARG); virtual void Process(DWORD dwTime); virtual void Render(KViewportObject * pViewport, bool isFront = false ); /// 2011.01.11 - prodongi void setFullSceneSize(float const* visibleCube); void setFullScene(bool full) { m_fullScene = full; } bool isFullScene() const { return m_fullScene; } protected: void setFullSceneCamPos(); /// 2011.01.11 - prodongi protected: KSize m_sizeTarget; K3DRenderTargetSPtr m_spRenderTarget; KSeqAvatarEx* m_pSeqForm; SViewPort* m_pViewport; KSpritePrimitive m_prSprite; KResSpriteSPtr m_spRes; K3DCamera m_cam; bool m_bPosValid; bool m_bRenderValid; int m_nObjType; int m_nCamBoneIndex; bool m_bAutoTargetMode; bool m_bFullExpression; K3DLight* m_pLight; bool m_bEnableLight; std::string m_strAniName; /// 2011.01.11 fullscene관련된 멤버들 - prodongi bool m_fullScene; /// 전체 씬인지 아닌지 float m_fullSceneWidth; /// 보이는 영역 넓이 float m_fullSceneHeight; /// 보이는 영역 높이 K3DVector m_fullSceneCenter; /// 보이는 영역 중앙 };