/* ========================================================================== * ÀÛ ¼º ÀÚ : À̼ø±Ô * ÀÛ ¼º ÀÏ : 2006.12.15 * ³» ¿ë : Àå¸é °ü¸®ÀÚ * ÁÖÀÇ»çÇ× : *===========================================================================*/ #pragma once #include "SceneTree.h" #include "CullingProcess.h" #include "VisibleArray.h" #include "VisibleArraySorter.h" #include "IndexGenerator.h" class cRay; class cCamera; class cTerrain; class cAreaGroup; class cAreaSceneNode; class cAreaSceneNodeParam; class cLightSceneNode; class cLightSceneNodeParam; class cSoundSceneNode; class cSoundSceneNodeParam; class cStaticSceneNode; class cManagedStaticSceneNode; class cStaticSceneNodeParam; class cDynamicSceneNode; class cHeroSceneNode; class cPlayerSceneNode; class cPlayerSceneNodeParam; class cMonsterSceneNode; class cTransMonSceneNode; class cMonsterSceneNodeParam; class cRefereeSceneNode; class cNpcSceneNode; class cNpcSceneNodeParam; class cVehicleSceneNode; class cVehicleSceneNodeParam; class cEffectSceneNode; class cEffectSceneNodeParam; class cDropItemSceneNode; class cDropItemSceneNodeParam; class cMapPortalSceneNode; class cMapPortalSceneNodeParam; class cCardSceneNode; class cCardSceneNodeParam; class cGatheringSceneNode; class cGatheringSceneNodeParam; class cDepthPlane; class cPlane; class cShadowGeometry; class cRibbonGeometry; enum eNameCardOption; /// Àå¸é ÆÄÀÏ Çì´õ #pragma pack( push, 1 ) class cSceneFileHeader { public: /// ½Äº° ÄÚµå char mCode[10]; /// ¹öÀü unsigned int mVersion; /// Àå¸é Æ®¸® Á¤º¸ NiPoint3 mCenter; float mMinRadius; float mMaxRadius; /// Àå¸é ³ëµå ¼ö unsigned int mNumSceneNodes; }; class cSoundSceneFileHeader { public: /// ½Äº° ÄÚµå char mCode[10]; /// ¹öÀü unsigned int mVersion; /// Àå¸é ³ëµå ¼ö unsigned int mNumSceneNodes; }; #pragma pack( pop ) class cSceneCuller : public NiMeshCullingProcess { public: cSceneCuller( const cCamera* cam, const NiPoint3& heroPos ); public: const cCamera* mCamera; NiPoint3 mHeroPos; }; /// Àå¸é °ü¸®ÀÚ /// Àå¸é ³ëµå¸¦ »ý¼º, Á¦°ÅÇÏ´Â °ü¸®ÀÚÀÌ´Ù. /// Àå¸éÀ» ·»´õ¸µÇϰí, /// Ãæµ¹ °Ë»ç, °¡½Ã¼º °Ë»ç, Á¤·Ä µîÀÇ ÀÛ¾÷À» ¼öÇàÇÑ´Ù. class cSceneManager { friend class cLightAgent; static cSceneManager* mSingleton; public: cSceneManager(); ~cSceneManager(); /// ¾îÇø®ÄÉÀÌ¼Ç ½ÃÀÛ ¹× Á¾·á ½ÃÁ¡ bool Init(); void Exit(); /// Áö¿ò void Clear(); /// ÃʱâÈ­ bool Init( const NiPoint3& center, float minRadius, float maxRadius ); inline bool IsInited() const { return mInited; } /// ó¸® void Process( unsigned long deltaTime, unsigned long accumTime ); /// ·»´õ¸µ void Render(); void RenderZFalseDamage(); void RenderTrail(); /// 2D °´Ã¼ ·£´õ¸µ (¸»Ç³¼± etc.) void Render2D(); /// °¡½Ã ·¹º§ °Å¸® void SetLevelDistance( float dist0, float dist1, float dist2 ); /// È­¸é »óÀÇ ÁÂÇ¥¿¡ ´ëÀÀÇÏ´Â Àå¸é ³ëµåµéÀ» ¸®ÅÏ /// »ï°¢Çü ´ÜÀ§·Î °Ë»çÇÑ´Ù. bool PickStatics( tArray* pickedArray, int mouseX, int mouseY, bool sortByDistance = false ); bool PickDynamics( tArray* pickedArray, int mouseX, int mouseY, bool sortByDistance = false ); bool PickManagedStatics( tArray* pickedArray, int mouseX, int mouseY, bool sortByDistance = false ); /// ¹ÝÁ÷¼±°ú Ãæµ¹ÇÏ´Â Àå¸é ³ëµåµéÀ» ¼öÁý /// »ï°¢Çü ´ÜÀ§·Î °Ë»çÇÑ´Ù. bool PickStatics( tArray* pickedArray, const cRay& ray, float maxDistance, bool sortByDistance = false ); bool PickDynamics( tArray* pickedArray, const cRay& ray, float maxDistance, bool sortByDistance = false ); bool PickManagedStatics( tArray* pickedArray, const cRay& ray, float maxDistance, bool sortByDistance = false ); /// ±¸¿Í Ãæµ¹ÇÏ´Â Àå¸é ³ëµåµéÀ» ¼öÁý /// ±¸ ´ÜÀ§·Î °Ë»çÇÑ´Ù. bool Pick_Kind( tArray* pickedArray, const cSphere& sphere, cSceneNode::eType type ); bool Pick_Type( tArray* pickedArray, const cSphere& sphere, cSceneNode::eType type ); bool PickAreas( tArray* pickedArray, const cSphere& sphere ); bool PickLights( tArray* pickedArray, const cSphere& sphere ); bool PickSounds( tArray* pickedArray, const cSphere& sphere ); /// ¿µ¿ª Àå¸é ³ëµå¸¦ »ý¼º cAreaSceneNode* CreateArea( cAreaSceneNodeParam& param ); /// Á¶¸í Àå¸é ³ëµå¸¦ »ý¼º cLightSceneNode* CreateLight( cLightSceneNodeParam& param ); /// »ç¿îµå Àå¸é ³ëµå¸¦ »ý¼º cSoundSceneNode* CreateMapSound( cSoundSceneNodeParam& param ); cSoundSceneNode* CreateEffectSound( cSoundSceneNodeParam& param ); /// Á¤Àû Àå¸é ³ëµå¸¦ »ý¼º cStaticSceneNode* CreateStatic( cStaticSceneNodeParam& param ); cDropItemSceneNode* CreateDropItem( cDropItemSceneNodeParam& param ); cGatheringSceneNode* CreateGathering( cGatheringSceneNodeParam& param ); cMapPortalSceneNode* CreateMapPortal( unsigned long scriptIdx, NiPoint3 pos, NiMatrix3 rot ); cCardSceneNode* CreateCard( cCardSceneNodeParam& param ); void InterpretPlayer( unsigned long accumtime ); void InterpretMonster( unsigned long accumtime ); void InterpretNpc( unsigned long accumtime ); /// °ü¸® °´Ã¼ »ý¼º¿ë ¿ÜºÎ ÀÎÅÍÆäÀ̽º cPlayerSceneNode* CreatePlayer( unsigned long modelIndex ); void CreateDummy( NiPoint3 pos ); cMonsterSceneNode* CreateMonster( unsigned long monIdx, unsigned long modelIndex ); cNpcSceneNode* CreateNPC( unsigned long modelIndex ); cEffectSceneNode* CreateEffect( cEffectSceneNodeParam& param ); cEffectSceneNode* CreateSelfEffect( cString pathName, bool distCheck, NiTransform& trans, bool bLoop ); cEffectSceneNode* CreateDamageEffect( cEffectSceneNodeParam& param, bool IsMiss, bool zFalse ); /// °ü¸® °´Ã¼ÀÇ Á¦°Å¿ë ¿ÜºÎ ÀÎÅÍÆäÀ̽º bool DestroyDynamic( cSceneNode* node ); bool DestroyStaticNode( cSceneNode* node ); /// Deletelist¿¡¼­ Á¦°ÅÇÏÁö ¾Ê°í ¿ÜºÎ¿¡¼­ ÀÓÀǷΠȣÃâÇÏ´Â °æ¿ì´Â DelListRemove = ture·Î ¼³Á¤ÇϽÿÀ bool DestroyEffectNode( cSceneNode* node ); bool DestroySoundNode( cSceneNode* node ); /// Á¦°Å µÇ¾î¾ß ÇÒ ÀÌÆåÆ® ³ëµå¿¡ ´ëÇÑ Ã³¸® void AddDeleteEffectNode( cEffectSceneNode* node ); /// Á¦°Å µÇ¾î¾ß ÇÒ »ç¿îµå ³ëµå¿¡ ´ëÇÑ Ã³¸® void AddDeleteSoundNode( cSoundSceneNode* node ); /// ¸ðµç ³ëµåµéÀ» Á¦°Å void DestroyAll(); /// Àüü ¿µ¿ª ³ëµå cAreaSceneNode* GetGlobalArea(); /// ±×¸²ÀÚ ·»´õ¸µ ¼Ó¼º NiZBufferProperty* GetShadowZBuffProperty() const; NiAlphaProperty* GetShadowAlphaProperty() const; NiTexturingProperty* GetShadowTexProperty() const; void AddPlane( cPlane* pPlane ); /// /// void AddVisibleTrailGeom( cRibbonGeometry* geom ); inline void SetScreenShotMode( bool enable ) { mScreenShotMode = enable; } inline bool IsScreenShotMode() { return mScreenShotMode; } unsigned int CalcVisibleLevel( cStaticSceneNode* n ); bool CalcDynamicVisibleLevel( cSceneNode* n ); cEffectSceneNode* GetEffectSceneNode( unsigned long effectIdx ); cSoundSceneNode* GetSoundSceneNode( unsigned long soundIdx ); cDynamicSceneNode* GetDynamicSceneNode( unsigned long dynIdx ); cStaticSceneNode* GetStaticSceneNode( unsigned long nodeIdx ); cManagedStaticSceneNode* GetManagedStaticNode( unsigned int type, unsigned long nodeIdx ); /// °ËÁõÄÚµå bool IsValidEffectNode( cEffectSceneNode* node ); bool IsValidEffectNode( unsigned long idx, cEffectSceneNode* node ); bool IsValidSoundNode( cSoundSceneNode* node ); bool IsValidSoundNode( unsigned long idx, cSoundSceneNode* node ); bool IsValidDynamicNode( cDynamicSceneNode* node ); bool IsValidDynamicNode( unsigned long idx, cDynamicSceneNode* node ); void SetLoadingFlag( bool set ) { mEnableLoading = set; } cDynamicSceneNode* GetCurrentSceneNode() { return mpCurrentSceneNode; } NiNode* GetSceneDummy(); inline void SetDramaProcess( bool isDrama ) { mDramaProcess = isDrama; } /// light void AddAmbientLight( NiColor ambientColor, NiColor diffuseColor, float dimmer ); void AddDirLight( NiColor ambientColor, NiColor diffuseColor, float dimmer, NiMatrix3 rot ); NiAmbientLight* GetAmbientLight() const; NiDirectionalLight* GetDirLight() const; inline unsigned int GetLightCount() { return mAmbientLightArray.GetSize(); } inline unsigned int GetCurrentLightIndex() { return mCurrentLightIndex; } void ChangeLight( unsigned int index ); void OnVisibleModifierPocess( cSceneNode* node ); protected: /// ³ëµå¸¦ Ãß°¡ bool AddAreaNode( cSceneNode* node ); bool AddLightNode( cSceneNode* node ); bool AddSoundNode( cSceneNode* node ); bool AddStaticNode( cSceneNode* node ); bool AddDynamicNode( cSceneNode* node ); bool AddEffectNode( cEffectSceneNode* node ); void LoadMapLightSetting( const char* fullPath ); void ScanDir( LPCTSTR pathname ); bool LoadEnv6( cFileLoader& loader ); bool LoadEnv7( cFileLoader& loader ); bool LoadEnv8( cFileLoader& loader ); bool LoadEnv9( cFileLoader& loader ); bool LoadEnv10( cFileLoader& loader ); bool LoadGlobalArea6( cFileLoader& loader ); bool LoadGlobalArea7( cFileLoader& loader ); bool LoadGlobalArea8( cFileLoader& loader ); bool LoadGlobalArea9( cFileLoader& loader ); bool LoadGlobalArea10( cFileLoader& loader ); public: /// ´ÜÀÏü¸¦ ¸®ÅÏ static cSceneManager* GetSingleton(); protected: /// ÃʱâÈ­ ¿©ºÎ bool mInited; //// º¸¿©Áú °´Ã¼ ÀÚü.. cDynamicSceneNode* mpCurrentSceneNode; cSceneNode* mpDummyNode; NiNode* mpDummy; bool mDramaProcess; bool mEnableLoading; /// ¹öÀü unsigned int mVersion; cIndexGenerator mSoundIndexGen; cIndexGenerator mStaticNodeIndexGen; cIndexGenerator mDynamicNodeIndexGen; cIndexGenerator mEffectIndexGen; typedef tPointerHashMap cSoundMap; typedef tPointerHashMap cNodeMap; /// Æ®¸® /// °ø°£À» ºÐÇÒÇÏ¿© ³ëµåµéÀ» °èÃþÀûÀ¸·Î °ü¸®ÇÑ´Ù. /// Ãæµ¹ °Ë»ç ¹× ÄøµÀ» È¿À²ÀûÀ¸·Î ¼öÇàÇϱâÀ§ÇØ »ç¿ëÇÑ´Ù. cSceneTree mNodeTree; cSoundMap mSoundArray; /// ij¸¯ÅÍ (PC, NPC, Monster) cNodeMap mDynamicObjectArray; /// ȯ°æ °´Ã¼ ³ëµå ¹è¿­ cNodeMap mStaticObjectArray; /// ÀÌÆåÆ® (Æ®¸®·Î °ü¸®ÇÒ ÇÊ¿ä ¾øÀ½) cNodeMap mEffectNodeArray; /// ÀÌÆåÆ® »èÁ¦¿ë // typedef tPointerList cDelEffectList; typedef tPointerList cDelEffectList; cDelEffectList mDelEffectList; /// »ç¿îµå »èÁ¦¿ë typedef tPointerList cDelSoundList; cDelSoundList mDelSoundList; /// °¡½Ã ·¹º§ °Å¸® float mSqaredLevelDistance0; float mSqaredLevelDistance1; float mSqaredLevelDistance2; /// Äøµ cCullingProcess mCuller; cCullingProcess mDamageCuller; cModifierProcess mModifierProcess; /// ¹ÝÅõ¸í ³ëµå °¡½Ã ¹è¿­ cVisibleArray mAlphaArray; cVisibleArray mAlphaTestArray; cVisibleArray mDamageArray; /// ¹ÝÅõ¸í ³ëµå °¡½Ã ¹è¿­ Á¤·ÄÀÚ cAlphaArraySorter mAlphaArraySorter; cAlphaArraySorter mDamageSorter; /// ºÒÅõ¸í ³ëµå °¡½Ã ¹è¿­ cVisibleArray mSolidArray; /// ºÒÅõ¸í ³ëµå °¡½Ã ¹è¿­ Á¤·ÄÀÚ cSolidArraySorter mSolidArraySorter; /// ÇÈÅ·µÈ Àå¸é ³ëµå ¹è¿­ typedef tArray cPickedArray; cPickedArray mPickedArray; /// ÅØ½ºÃ³ ¸Ê typedef tHashMap cTextureMap; cTextureMap mTextureMap; /// typedef tPointerArray cTrailGeomArray; cTrailGeomArray mTrailGeomArray; /// bool mScreenShotMode; NiPoint3 mHeroPos; /// light NiTObjectArray mAmbientLightArray; NiTObjectArray mDirLightArray; unsigned int mCurrentLightIndex; }; inline void cSceneManager::AddVisibleTrailGeom( cRibbonGeometry* geom ) { assert( geom ); mTrailGeomArray.PushBack( geom ); } inline NiAmbientLight* cSceneManager::GetAmbientLight() const { return mAmbientLightArray.GetAt( 0 ); } inline NiDirectionalLight* cSceneManager::GetDirLight() const { return mDirLightArray.GetAt( 0 ); } inline void cSceneManager::SetLevelDistance( float dist0, float dist1, float dist2 ) { mSqaredLevelDistance0 = dist0 * dist0; mSqaredLevelDistance1 = dist1 * dist1; mSqaredLevelDistance2 = dist2 * dist2; } inline cEffectSceneNode* cSceneManager::GetEffectSceneNode( unsigned long effectIdx ) { return (cEffectSceneNode*)mEffectNodeArray.GetAt( effectIdx ); } inline cSoundSceneNode* cSceneManager::GetSoundSceneNode( unsigned long soundIdx ) { return (cSoundSceneNode*)mSoundArray.GetAt( soundIdx ); } inline cDynamicSceneNode* cSceneManager::GetDynamicSceneNode( unsigned long dynIdx ) { return (cDynamicSceneNode*)mDynamicObjectArray.GetAt( dynIdx ); } inline cStaticSceneNode* cSceneManager::GetStaticSceneNode( unsigned long nodeIdx ) { return (cStaticSceneNode*) mStaticObjectArray.GetAt( nodeIdx ); } inline NiNode* cSceneManager::GetSceneDummy() { if( mpDummyNode == 0 ) return 0; return mpDummyNode->GetNiNode(); } inline cSceneManager* cSceneManager::GetSingleton() { return mSingleton; } #define SCENEMAN cSceneManager::GetSingleton() /* #pragma once #include "SceneTree.h" #include "VisibleArray.h" #include "VisibleArraySorter.h" #include "CullingProcess.h" class cRay; class cCamera; class cDynamicSceneNode; class cNpcSceneNode; class cNpcSceneNodeParam; class cMonsterSceneNode; class cMonsterSceneNodeParam; class cPlayerSceneNode; class cPlayerSceneNodeParam; class cEffectSceneNode; class cEffectSceneNodeParam; class cSoundSceneNode; class cSoundSceneNodeParam; class cStaticSceneNode; /// Àå¸é ÆÄÀÏ Çì´õ #pragma pack( push, 1 ) class cSceneFileHeader { public: /// ½Äº° ÄÚµå char mCode[10]; /// ¹öÀü unsigned int mVersion; /// Àå¸é Æ®¸® Á¤º¸ NiPoint3 mCenter; float mMinRadius; float mMaxRadius; /// Àå¸é ³ëµå ¼ö unsigned int mNumSceneNodes; }; #pragma pack( pop ) /// Àå¸é Ä÷¯ class cSceneCuller : public NiCullingProcess { public: cSceneCuller( const cCamera* cam, const NiPoint3& heroPos ); public: const cCamera* mCamera; NiPoint3 mHeroPos; }; /// Àå¸é °ü¸®ÀÚ /// Àå¸é ³ëµå¸¦ »ý¼º, Á¦°ÅÇÏ´Â °ü¸®ÀÚÀÌ´Ù. /// Àå¸éÀ» ·»´õ¸µÇϰí, /// Ãæµ¹ °Ë»ç, °¡½Ã¼º °Ë»ç, Á¤·Ä µîÀÇ ÀÛ¾÷À» ¼öÇàÇÑ´Ù. class cSceneManager { static cSceneManager* mSingleton; public: cSceneManager(); ~cSceneManager(); /// Áö¿ò void Clear(); /// ÃʱâÈ­ bool Init( const NiPoint3& center, float minRadius, float maxRadius ); bool InitTree( const NiPoint3& center, float minRadius, float maxRadius ); bool IsInited() const; /// ó¸® void Process( float deltaTime, float accumTime ); /// ·»´õ¸µ void Render(); /// È­¸é »óÀÇ ÁÂÇ¥¿¡ ´ëÀÀÇÏ´Â Àå¸é ³ëµåµéÀ» ¸®ÅÏ /// »ï°¢Çü ´ÜÀ§·Î °Ë»çÇÑ´Ù. bool PickDynamics( tArray* pickedArray, int mouseX, int mouseY, bool sortByDistance = false ); /// Ãæµ¹ÇÏ´Â Àå¸é ³ëµåµéÀ» ¼öÁý bool PickDynamics( tArray* pickedArray, const cRay& ray, float maxDistance, bool sortByDistance = false ); bool PickDynamics( tArray* pickedArray, const cSphere& sphere ); bool PickSounds( tArray* pickedArray, const cSphere& sphere ); /// ³ëµå¸¦ Á¦°Å void DestroyAll(); bool DestroyDynamic( cSceneNode* node ); bool DestroyDynamic( unsigned int index ); bool DestroyEffectNode( cSceneNode* node, bool DelListRemove = false ); bool DestroySoundNode( cSceneNode* node, bool DelListRemove = false ); /// Á¦°Å µÇ¾î¾ß ÇÒ ÀÌÆåÆ® ³ëµå¿¡ ´ëÇÑ Ã³¸® void AddDeleteEffectNode( cEffectSceneNode* node ); void AddDeleteSoundNode( cSoundSceneNode* node ); /// ³ëµå¸¦ »ý¼º cSoundSceneNode* CreateEffectSound( const cSoundSceneNodeParam& param ); void ActiveSoundNodeAll( bool active ); cNpcSceneNode* CreateNPC( unsigned long modelIndex ); cMonsterSceneNode* CreateMonster( unsigned long modelIndex ); cPlayerSceneNode* CreatePlayer( unsigned long modelIndex ); cEffectSceneNode* CreateEffect( const cEffectSceneNodeParam& param ); cEffectSceneNode* CreateSelfEffect( cString pathName, NiTransform& trans, bool bLoop ); void AddAmbientLight( NiColor ambientColor, NiColor diffuseColor, float dimmer ); void AddDirLight( NiColor ambientColor, NiColor diffuseColor, float dimmer, NiMatrix3 rot ); NiAmbientLight* GetAmbientLight() const; NiDirectionalLight* GetDirLight() const; inline unsigned int GetLightCount() { return mAmbientLightArray.GetSize(); } inline unsigned int GetCurrentLightIndex() { return mCurrentLightIndex; } void ChangeLight( unsigned int index ); /// ÁÖº¯±¤ //void SetAmbientLightAmbient( unsigned int i, const NiColor& color ); //void SetAmbientLightDiffuse( unsigned int i, const NiColor& color ); //void SetAmbientLightDimmer( unsigned int i, float dimmer ); ///// ¹æÇⱤ //void SetDirLightAmbient( unsigned int i, const NiColor& color ); //void SetDirLightDiffuse( unsigned int i, const NiColor& color ); //void SetDirLightDimmer( unsigned int i, float dimmer ); //void SetDirLightRotate( unsigned int i, float xangle, float yangle, float zangle ); /// Àå¸é Æ®¸®ÀÇ Á¤º¸ const NiPoint3& GetCenter() const; float GetMinRadius() const; float GetMaxRadius() const; /// º¸ÀÌ´Â Àå¸é ³ëµå ¼ö unsigned int GetNumVisibleAlphaNodes() const; unsigned int GetNumVisibleSolidNodes() const; cDynamicSceneNode* GetCurrentSceneNode() { return mpCurrentSceneNode; } inline void SetDramaProcess( bool isDrama ) { mDramaProcess = isDrama; } inline NiNode* GetSceneDummy() { return mpDummy; } protected: /// ³ëµå¸¦ Ãß°¡ unsigned int AddDynamic( cDynamicSceneNode* node ); unsigned int AddStatic( cSceneNode* node ); unsigned int AddEffectNode( cSceneNode* node ); unsigned int AddSound( cSoundSceneNode* node ); void LoadMapLightSetting( const char* fullPath ); void ScanDir( LPCTSTR pathname, bool filescan = false ); bool LoadEnv6( cFileLoader& loader ); bool LoadEnv7( cFileLoader& loader ); bool LoadEnv8( cFileLoader& loader ); bool LoadEnv9( cFileLoader& loader ); bool LoadEnv10( cFileLoader& loader ); bool LoadGlobalArea6( cFileLoader& loader ); bool LoadGlobalArea7( cFileLoader& loader ); bool LoadGlobalArea8( cFileLoader& loader ); bool LoadGlobalArea9( cFileLoader& loader ); bool LoadGlobalArea10( cFileLoader& loader ); void InterpretPlayer( float accumtime ); void InterpretMonster( float accumtime ); void InterpretNpc( float accumtime ); void CreateDummy( NiPoint3 pos ); public: /// ´ÜÀÏü¸¦ ¸®ÅÏ static cSceneManager* GetSingleton(); protected: /// ÃʱâÈ­ ¿©ºÎ bool mInited; /// ÅØ½ºÃ³ ¸Ê typedef tHashMap cTextureMap; cTextureMap mTextureMap; /// Æ®¸® /// °ø°£À» ºÐÇÒÇÏ¿© ³ëµåµéÀ» °èÃþÀûÀ¸·Î °ü¸®ÇÑ´Ù. /// Ãæµ¹ °Ë»ç ¹× ÄøµÀ» È¿À²ÀûÀ¸·Î ¼öÇàÇϱâÀ§ÇØ »ç¿ëÇÑ´Ù. NiPoint3 mCenter; float mMinRadius; float mMaxRadius; /// Äøµ cCullingProcess mCuller; typedef tArray cNodeArray; //// º¸¿©Áú °´Ã¼ ÀÚü.. cDynamicSceneNode* mpCurrentSceneNode; unsigned int mDummyIdx; NiNode* mpDummy; cSceneTree mSoundTree; cNodeArray mSoundArray; cSceneTree mDynamicTree; cNodeArray mDynamicArray; cSceneTree mStaticObjectTree; cNodeArray mStaticObjectArray; /// ÀÌÆåÆ® (Æ®¸®·Î °ü¸®ÇÒ ÇÊ¿ä ¾øÀ½) cNodeArray mEffectNodeArray; /// ÀÌÆåÆ® »èÁ¦¿ë // typedef tPointerList cDelEffectList; typedef tPointerList cDelEffectList; cDelEffectList mDelEffectList; typedef tPointerList cDelSoundList; cDelSoundList mDelSoundList; /// ¹ÝÅõ¸í ³ëµå °¡½Ã ¹è¿­ cVisibleArray mAlphaArray; /// ºÒÅõ¸í ³ëµå °¡½Ã ¹è¿­ cVisibleArray mSolidArray; cVisibleArray mSkinedArray; /// ¹ÝÅõ¸í ³ëµå °¡½Ã ¹è¿­ Á¤·ÄÀÚ cAlphaArraySorter mAlphaArraySorter; /// ºÒÅõ¸í ³ëµå °¡½Ã ¹è¿­ Á¤·ÄÀÚ cSolidArraySorter mSolidArraySorter; cSolidArraySorter mSkinedArraySorter; unsigned int mCurrentLightIndex; bool mDramaProcess; /// light NiTObjectArray mAmbientLightArray; NiTObjectArray mDirLightArray; /// Á¶¸í // NiAmbientLightPtr mAmbientLight[2]; // NiDirectionalLightPtr mDirLight[2]; /// ÇÈÅ·µÈ Àå¸é ³ëµå ¹è¿­ typedef tArray cPickedArray; cPickedArray mPickedArray; }; inline bool cSceneManager::IsInited() const { return mInited; } //inline //NiFogProperty* cSceneManager::GetFogProperty() const //{ // return mFogProp; //} inline NiAmbientLight* cSceneManager::GetAmbientLight() const { return mAmbientLightArray.GetAt( 0 );//mCurrentLightIndex ); } inline NiDirectionalLight* cSceneManager::GetDirLight() const { return mDirLightArray.GetAt( 0 );//mCurrentLightIndex); } inline const NiPoint3& cSceneManager::GetCenter() const { return mCenter; } inline float cSceneManager::GetMinRadius() const { return mMinRadius; } inline float cSceneManager::GetMaxRadius() const { return mMaxRadius; } inline unsigned int cSceneManager::GetNumVisibleAlphaNodes() const { return mAlphaArray.GetCount(); } inline unsigned int cSceneManager::GetNumVisibleSolidNodes() const { return mSolidArray.GetCount(); } inline cSceneManager* cSceneManager::GetSingleton() { return mSingleton; } #define SCENEMAN cSceneManager::GetSingleton() */