ULRE/inc/hgl/graph/SceneTreeToRenderList.h

62 lines
1.8 KiB
C
Raw Normal View History

2021-04-30 18:56:20 +08:00
#ifndef HGL_GRAPH_SCENE_TREE_TO_RENDER_LIST_INCLUDE
#define HGL_GRAPH_SCENE_TREE_TO_RENDER_LIST_INCLUDE
#include<hgl/graph/RenderList.h>
2021-04-30 18:56:20 +08:00
#include<hgl/graph/VKPipeline.h>
#include<hgl/graph/VKMaterial.h>
#include<hgl/graph/VKMaterialInstance.h>
namespace hgl
{
namespace graph
{
2021-04-30 18:56:20 +08:00
struct RenderNode
{
SceneNode *node;
};//
class SceneTreeToRenderList
{
2021-05-31 18:02:20 +08:00
using PipelineSets =Sets<Pipeline *>;
using MaterialSets =Sets<Material *>;
using MatInstSets =Sets<MaterialInstance *>;
protected:
GPUDevice *device;
protected:
2021-05-31 18:02:20 +08:00
CameraInfo camera_info; ///<相机信息
Frustum frustum;
protected:
2021-04-30 18:56:20 +08:00
SceneNodeList * scene_node_list; ///<场景节点列表
2021-04-30 18:56:20 +08:00
PipelineSets pipeline_sets; ///<管线合集
MaterialSets material_sets; ///<材质合集
2021-05-31 18:02:20 +08:00
MatInstSets mat_inst_sets; ///<材质实例合集
RenderList * render_list;
protected:
2021-04-30 18:56:20 +08:00
virtual float CameraLength(SceneNode *,SceneNode *); ///<摄像机距离比较函数
2021-04-30 18:56:20 +08:00
virtual bool InFrustum(const SceneNode *,void *); ///<平截头截剪函数
virtual bool Begin();
virtual bool Expend(SceneNode *);
virtual bool End();
public:
2021-05-31 18:02:20 +08:00
SceneTreeToRenderList(GPUDevice *d);
virtual ~SceneTreeToRenderList();
2021-05-31 18:02:20 +08:00
virtual bool Expend(RenderList *,const CameraInfo &,SceneNode *);
2021-04-30 18:56:20 +08:00
};//class SceneTreeToRenderList
}//namespace graph
}//namespace hgl
#endif//HGL_GRAPH_SCENE_TREE_TO_RENDER_LIST_INCLUDE