ULRE/inc/hgl/graph/RenderNode.h

44 lines
1.2 KiB
C
Raw Normal View History

#ifndef HGL_GRAPH_RENDER_NODE_INCLUDE
2021-06-10 18:56:23 +08:00
#define HGL_GRAPH_RENDER_NODE_INCLUDE
2023-05-07 01:07:26 +08:00
#include<hgl/graph/VK.h>
2024-11-21 01:30:42 +08:00
#include<hgl/type/SortedSet.h>
2021-06-10 18:56:23 +08:00
namespace hgl
{
namespace graph
{
class Renderable;
class MaterialInstance;
class SceneNode;
2021-06-10 18:56:23 +08:00
struct RenderNode:public Comparator<RenderNode>
2023-04-25 18:08:26 +08:00
{
uint index; ///<在MaterialRenderList中的索引
2023-05-07 01:07:26 +08:00
SceneNode * scene_node;
uint32 l2w_version;
uint32 l2w_index;
Vector3f world_position;
float to_camera_distance;
public:
//该函数位于MaterialRenderList.cpp
const int compare(const RenderNode &)const override;
2023-04-25 18:08:26 +08:00
};
2023-05-07 01:07:26 +08:00
using RenderNodeList=List<RenderNode>;
using RenderNodePointerList=List<RenderNode *>;
2024-11-21 01:30:42 +08:00
using MaterialInstanceSets=SortedSet<MaterialInstance *>; ///<材质实例集合
2023-05-07 01:07:26 +08:00
}//namespace graph
template<> inline const int ItemComparator<graph::RenderNode>::compare(const graph::RenderNode &a,const graph::RenderNode &b)
{
return a.compare(b);
}
2023-05-07 01:07:26 +08:00
}//namespace hgl
2021-06-10 18:56:23 +08:00
#endif//HGL_GRAPH_RENDER_NODE_INCLUDE