#pragma once #include #include namespace hgl { namespace graph { class Mesh; class MaterialInstance; class StaticMeshComponent; struct RenderNode:public Comparator { uint index; ///<在MaterialRenderList中的索引 StaticMeshComponent *sm_component; ///<静态网格组件 uint32 l2w_version; uint32 l2w_index; Vector3f world_position; float to_camera_distance; public: //该函数位于MaterialRenderList.cpp const int compare(const RenderNode &)const override; public: Mesh *GetMesh()const; MaterialInstance *GetMaterialInstance()const; }; using RenderNodeList=ArrayList; using RenderNodePointerList=ArrayList; using MaterialInstanceSets=SortedSet; ///<材质实例集合 }//namespace graph template<> inline const int ItemComparator::compare(const graph::RenderNode &a,const graph::RenderNode &b) { return a.compare(b); } }//namespace hgl