You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.1 KiB
C

#pragma once
#include "EnumDirection.h"
#include "GlobalDefine.h"
#include "SmartPtr.h"
#include "ObjBase.h"
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
class CObjSortMgr
{
public:
CObjSortMgr(void);
~CObjSortMgr(void);
void SortObjByDir(DIRECTION dir);
private:
void SeparateSelObj(vector<Sptr<CObjBase>> &ObjVec,vector<Sptr<CObjBase>> &SelObjVec,vector<Sptr<CObjBase>> &NotSelObjVec);
void SortObjVec(vector<Sptr<CObjBase>> &SelObjVec);
void PushToObjVec(vector<Sptr<CObjBase>> &ObjVec1,vector<Sptr<CObjBase>> &ObjVec2);
void CreatBucketVec(vector<vector<Sptr<CObjBase>>> &BucketVec,vector<Sptr<CObjBase>> &ObjVec);
void CreatBucketBaseCoordVec(vector<double> &BucketBaseCoordVec,vector<Sptr<CObjBase>> &ObjVec);
bool IsHorizontalScan();
bool IsForwardDirection();
void CollectBucketObj(vector<vector<Sptr<CObjBase>>> &BucketVec,vector<Sptr<CObjBase>> &ObjVec);
void BucketToObjVec(vector<vector<Sptr<CObjBase>>> &BucketVec,vector<Sptr<CObjBase>> &ObjVec);
void BucketSort(vector<vector<Sptr<CObjBase>>> &BucketVec);
private:
DIRECTION m_ScanDir;//ɨ<><C9A8><EFBFBD>ķ<EFBFBD><C4B7><EFBFBD>
};