/* ========================================================================== * ÀÛ ¼º ÀÚ : À̼ø±Ô * ÀÛ ¼º ÀÏ : 2006.12.07 * ³» ¿ë : Á¶¸í ¹èÄ¡ ´ÙÀ̾ó·Î±× * ÁÖÀÇ»çÇ× : *===========================================================================*/ #pragma once #include "UI/Dialog.h" #include "UI/Button.h" #include "UI/CheckButton.h" #include "UI/CheckButtonGroup.h" #include "UI/NumericEdit.h" class cGroupLight; /// Á¶¸í ¹èÄ¡ ´ÙÀ̾ó·Î±× class cLightTransformDialog : public cDialog { DECLARE_DYNAMIC(cLightTransformDialog) public: cLightTransformDialog(); virtual ~cLightTransformDialog(); void SetCheckedButton( int id ); unsigned int GetCheckedButton() const; /// Á¶¸í Á¤º¸¸¦ ¼³Á¤ void UpdateLight( const NiPoint3& translate, float radius ); /// Ȱ¼ºÈ­ ¿©ºÎ¸¦ ¼³Á¤ void SetEnabled( bool enabled ); /// À§Ä¡ NiPoint3 GetTranslate() const; /// ¹ÝÁö¸§ float GetRadius() const; protected: virtual void DoDataExchange( CDataExchange* dx ); BOOL OnInitDialog(); protected: DECLARE_MESSAGE_MAP() afx_msg void OnClickedButton(); afx_msg void OnClickedCreate(); afx_msg LRESULT OnChangedTransform( WPARAM id, LPARAM ); private: /// ¹öư cButton mCreateButton; cCheckButton mPickButton; cCheckButton mAttachToTerrainButton; cCheckButton mAttachToObjectButton; cCheckButtonGroup mButtonGroup; /// ¼ýÀÚ ¿¡µðÆ® cNumericEdit mTxEdit; cNumericEdit mTyEdit; cNumericEdit mTzEdit; cNumericEdit mRadiusEdit; }; inline void cLightTransformDialog::SetEnabled( bool enabled ) { if( enabled ) { mTxEdit.SetEnabled( true ); mTyEdit.SetEnabled( true ); mTzEdit.SetEnabled( true ); mRadiusEdit.SetEnabled( true ); } else { mTxEdit.SetValue( 0.0f ); mTyEdit.SetValue( 0.0f ); mTzEdit.SetValue( 0.0f ); mRadiusEdit.SetValue( 3.0f ); mTxEdit.SetEnabled( false ); mTyEdit.SetEnabled( false ); mTzEdit.SetEnabled( false ); mRadiusEdit.SetEnabled( false ); } } inline NiPoint3 cLightTransformDialog::GetTranslate() const { float x = mTxEdit.GetValue() * 100.0f; float y = mTyEdit.GetValue() * 100.0f; float z = mTzEdit.GetValue() * 100.0f; return NiPoint3( x, y, z ); } inline float cLightTransformDialog::GetRadius() const { return mRadiusEdit.GetValue() * 100.0f; }