Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef RENDERGRAPH_HPP
- #define RENDERGRAPH_HPP
- #include "entity.hpp"
- class RenderGraph {
- public:
- void SetEntities( const std::vector< Entity* >& a_entities );
- void CalculateDependencies();
- void Sort( std::vector< Entity* >& a_output );
- private:
- struct Node {
- Node( Entity* a_entity );
- Entity* entity_;
- std::vector< Node* > dependencies_;
- int isoDepth_;
- bool visited_;
- };
- void VisitNode( int& sortDepth, Node* a_node );
- struct Comparator {
- bool operator()( const Node& a_lhs, const Node& a_rhs ) const;
- };
- std::vector< Node > nodes_;
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement