/* ========================================================================== * ÀÛ ¼º ÀÚ : À̼ø±Ô * ÀÛ ¼º ÀÏ : 2006.12.13 * ³» ¿ë : »ç¿îµå ÆíÁýÀÚ * ÁÖÀÇ»çÇ× : *===========================================================================*/ #pragma once class cSceneNode; class cSoundSceneNode; class cSoundTransformDialog; class cSoundPropertyDialog; class cSoundInfoDialog; /// »ç¿îµå ÆíÁýÀÚ /// ¸Ê»óÀÇ »ç¿îµåµéÀ» ÆíÁýÇÑ´Ù. class cSoundEditor { static cSoundEditor* mSingleton; friend class cMapEditorView; friend class cObjectEditor; public: cSoundEditor(); ~cSoundEditor(); /// Áö¿ò void Clear(); /// ·»´õ¸µ void Render(); /// ÃʱâÈ­ void Init(); ///// ·Îµù bool Load( const cString& pathName ); ///// ÀúÀå bool Save(); bool SaveAs( const cString& pathName ); /// ÀúÀå bool Save( cFileSaver& saver ); /// »ç¿îµå¸¦ »ý¼º bool CreateSound( const char* pathName ); /// ÇÈÅ· bool Pick( CPoint point ); /// ¼±Åà void DeselectAll(); /// »ç¿îµå¸¦ ÁöÇü¿¡ ºÎÂø void AttachSoundToTerrain( CPoint point ); /// »ç¿îµå¸¦ ¿ÀºêÁ§Æ®¿¡ ºÎÂø void AttachSoundToObject( CPoint point ); /// »ç¿îµå¸¦ »èÁ¦ void DeleteSound(); /// »ç¿îµå¸¦ º¹»ç void CopySound(); /// Á¤º¸ ´ÙÀ̾ó·Î±×¸¦ °»½Å void UpdateInfoDialog(); /// »ç¿îµå À̵¿ void SetSoundTranslate( const NiPoint3& trans, bool updateDialog ); /// »ç¿îµå ¹ÝÁö¸§ void SetSoundRadius( float scale, bool updateDialog ); /// »ç¿îµå °¨¼è °Å¸® void SetSoundAttenDistance( float dist, bool updateDialog ); /// »ç¿îµå ¼Ó¼º void SetSoundLoopCount( int count ); void SetSoundLoopInterval( float interval ); void SetSoundVolumeRatio( float ratio ); /// ´ÙÀ̾ó·Î±× void SetTransformDialog( cSoundTransformDialog* dlg ); void SetPropertyDialog( cSoundPropertyDialog* dlg ); void SetInfoDialog( cSoundInfoDialog* dlg ); /// °æ·Î À̸§À» ¸®ÅÏ const cString& GetPathName() const; /// »ç¿îµå ¼ö unsigned int GetNumSounds() const; private: /// ÇØ´ç »ç¿îµå¸¦ Á¦°Å bool Kill( cSoundSceneNode* node ); /// ÇØ´ç »ç¿îµå¸¦ º¹Á¦ /// º¹Á¦µÈ »õ·Î¿î »ç¿îµå¸¦ ¸®ÅÏÇÑ´Ù. cSoundSceneNode* Clone( cSoundSceneNode* node ); /// ¸Þ½ÃÁö¸¦ ó¸® void OnMouseMove( CPoint point ); void OnLButtonDown_Transform( CPoint point ); void OnRButtonDown_Transform( CPoint point, bool ctrl ); void OnKeyDown( UINT c ); public: /// ´ÜÀÏü¸¦ ¸®ÅÏ static cSoundEditor* GetSingleton(); protected: /// ¹èÄ¡ ´ÙÀ̾ó·Î±× cSoundTransformDialog* mTransformDialog; /// ¼Ó¼º ´ÙÀ̾ó·Î±× cSoundPropertyDialog* mPropertyDialog; /// Á¤º¸ ´ÙÀ̾ó·Î±× cSoundInfoDialog* mInfoDialog; /// »ý¼ºµÈ »ç¿îµå ™V typedef tHashSet cCreatedSet; cCreatedSet mCreatedSet; /// ÇÈÅ·µÈ ³ëµå ¹è¿­ typedef tArray cPickedArray; cPickedArray mPickedArray; /// ¼±ÅÃµÈ »ç¿îµå cSoundSceneNode* mSelectedNode; /// ÆíÁý ¿ø /// »ç¿îµå ³ëµåµéÀ» Ç¥½ÃÇϴµ¥ »ç¿ëÇÑ´Ù. NiMeshPtr mCircleLines; //NiPoint3* mPosCoords; //NiBool* mFlags; NiMaterialPropertyPtr mMatProp; NiVertexColorPropertyPtr mVertColorProp; NiWireframePropertyPtr mWireProp; /// ¸¶¿ì½º ÁÂÇ¥ CPoint mMousePos; /// °æ·Î À̸§ cString mPathName; }; inline void cSoundEditor::SetTransformDialog( cSoundTransformDialog* dlg ) { assert( dlg && "null sound transform dialog" ); mTransformDialog = dlg; } inline void cSoundEditor::SetPropertyDialog( cSoundPropertyDialog* dlg ) { assert( dlg && "null sound property dialog" ); mPropertyDialog = dlg; } inline void cSoundEditor::SetInfoDialog( cSoundInfoDialog* dlg ) { assert( dlg && "null sound info dialog" ); mInfoDialog = dlg; } inline unsigned int cSoundEditor::GetNumSounds() const { return mCreatedSet.GetSize(); } inline cSoundEditor* cSoundEditor::GetSingleton() { return mSingleton; } inline const cString& cSoundEditor::GetPathName() const { return mPathName; } #define SOUNDEDIT cSoundEditor::GetSingleton()