/* ========================================================================== * ÀÛ ¼º ÀÚ : À̼ø±Ô * ÀÛ ¼º ÀÏ : 2007.02.15 * ³» ¿ë : ÁÖÀΰø * ÁÖÀÇ»çÇ× : *===========================================================================*/ #pragma once #include "Engine/Sphere.h" #include "Engine/PlayerSceneNode.h" #include "Lines.h" const unsigned int MAX_PATH_COUNT = 2048; class cLookAtCamera; class cRibbonGeometry; /// ÁÖÀΰø class cHero { static cHero* mSingleton; public: cHero( cLookAtCamera* cam ); ~cHero(); void Clear(); /// ÃʱâÈ­ bool Init(); /// ¸®™V void Reset(); /// ó¸® void Process( unsigned long time ); /// ·»´õ¸µ void RenderLines(); /// À̵¿ void SetTranslate( const NiPoint3& pos ); const NiPoint3& GetWorldTranslate() const; /// ȸÀü const NiMatrix3& GetWorldRotate() const; /// ¸ñÇ¥ ÁöÁ¡ void SetTargetPos( const NiPoint3& pos ); /// °æ°è ±¸ const cSphere& GetBoundSphere() const; const NiPoint3& GetCenter() const; /// Àå¸é ³ëµå cPlayerSceneNode* GetSceneNode() const; protected: void SetActiveLines( unsigned int count ); public: /// ´ÜÀÏü¸¦ ¸®ÅÏ static cHero* GetSingleton(); private: /// À§Ä¡ NiPoint3 mPos; /// ±æÃ£±â °á°ú À̵¿ °æ·Î NiPoint2 mPathArray[MAX_PATH_COUNT]; unsigned int mPathCount; unsigned int mPathIndex; /// ±æÃ£±â À̵¿ °æ·Î ¼± NiMeshPtr mPathLines; NiMaterialPropertyPtr mMatProp; NiVertexColorPropertyPtr mVertColorProp; NiWireframePropertyPtr mWireProp; /// °¡½Ã ·¹º§ ¿ø cCircleLines mLevel0Lines; cCircleLines mLevel1Lines; cCircleLines mLevel2Lines; /// Ä«¸Þ¶ó cLookAtCamera* mCamera; /// ³ëµå cPlayerSceneNode* mNode; /// °æ°è ±¸ cSphere mBoundSphere; /// ±ËÀû //LPDIRECT3DTEXTURE9 mRibbonTexture; //cRibbonGeometry* mRibbonGeom; /// °»½Å ¿©ºÎ bool mNeedUpdate; }; inline const cSphere& cHero::GetBoundSphere() const { return mBoundSphere; } inline const NiPoint3& cHero::GetCenter() const { if( mNode ) return mNode->GetCenter(); else return NiPoint3::ZERO; } inline const NiPoint3& cHero::GetWorldTranslate() const { return mNode->GetWorldTranslate(); } inline const NiMatrix3& cHero::GetWorldRotate() const { return mNode->GetWorldRotate(); } inline cPlayerSceneNode* cHero::GetSceneNode() const { return mNode; } inline cHero* cHero::GetSingleton() { return mSingleton; } #define HERO cHero::GetSingleton()