2015-07-26 21:39:49 +00:00
|
|
|
#ifndef CRENDERBUCKET_H
|
|
|
|
#define CRENDERBUCKET_H
|
|
|
|
|
|
|
|
#include "CCamera.h"
|
|
|
|
#include "ERenderOptions.h"
|
2015-08-15 04:04:56 +00:00
|
|
|
#include "SRenderablePtr.h"
|
2015-07-26 21:39:49 +00:00
|
|
|
#include <Common/types.h>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class CRenderBucket
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
enum ESortType
|
|
|
|
{
|
|
|
|
BackToFront,
|
|
|
|
FrontToBack
|
|
|
|
};
|
|
|
|
private:
|
|
|
|
ESortType mSortType;
|
2015-08-15 04:04:56 +00:00
|
|
|
std::vector<SRenderablePtr> mRenderables;
|
2015-07-26 21:39:49 +00:00
|
|
|
u32 mEstSize;
|
|
|
|
u32 mSize;
|
|
|
|
|
|
|
|
public:
|
|
|
|
CRenderBucket();
|
|
|
|
void SetSortType(ESortType Type);
|
2015-08-15 04:04:56 +00:00
|
|
|
void Add(const SRenderablePtr& ptr);
|
2015-11-25 21:37:34 +00:00
|
|
|
void Sort(CCamera* pCamera);
|
2015-07-26 21:39:49 +00:00
|
|
|
void Clear();
|
2015-11-26 10:42:42 +00:00
|
|
|
void Draw(const SViewInfo& ViewInfo);
|
2015-07-26 21:39:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CRENDERBUCKET_H
|