/* ========================================================================== * ÀÛ ¼º ÀÚ : À̼ø±Ô * ÀÛ ¼º ÀÏ : 2007.02.07 * ³» ¿ë : °¡½Ã ¹è¿­ Á¤·ÄÀÚ * ÁÖÀÇ»çÇ× : *===========================================================================*/ #pragma once class cVisibleArray; class cCamera; /// °¡½Ã ¹è¿­ Á¤·ÄÀÚ class cVisibleArraySorter { public: cVisibleArraySorter( cVisibleArray* array ); virtual ~cVisibleArraySorter(); /// Á¤·Ä virtual void Sort( const cCamera& cam )=0; /// ·»´õ¸µ virtual void Render() = 0; protected: /// °¡½Ã ¹è¿­ cVisibleArray* mArray; int mNumGeoms; int mMaxGeoms; NiRenderObject** mGeoms; float* mDepths; }; /// ¹ÝÅõ¸í °¡½Ã ¹è¿­ Á¤·ÄÀÚ class cAlphaArraySorter : public cVisibleArraySorter { public: cAlphaArraySorter( cVisibleArray* array, cVisibleArray* testArray ); virtual ~cAlphaArraySorter(); /// Á¤·Ä virtual void Sort( const cCamera& cam ); /// ·»´õ¸µ virtual void Render(); private: void SortObjectsByDepth( int l, int r ); float ChoosePivot( int l, int r ) const; NiRenderObject** mSortGeoms; float* mSortDepths; int mSortMaxGeoms; protected: void SortTestGeom( const cCamera& cam ); protected: cVisibleArray* mTestArray; int mNumTestGeoms; int mMaxTestGeoms; NiRenderObject** mTestGeoms; float* mTestDepths; }; /// ºÒÅõ¸í °¡½Ã ¹è¿­ Á¤·ÄÀÚ class cSolidArraySorter : public cVisibleArraySorter { public: cSolidArraySorter( cVisibleArray* array ); virtual ~cSolidArraySorter(); /// Á¤·Ä virtual void Sort( const cCamera& cam ); /// ·»´õ¸µ virtual void Render(); protected: void SortObjectsByDepth(int l, int r); float ChoosePivot(int l, int r) const; };