Advertisement
Guest User

Untitled

a guest
May 7th, 2014
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.63 KB | None | 0 0
  1. #ifndef RENDERGRAPH_HPP
  2. #define RENDERGRAPH_HPP
  3.  
  4. #include "entity.hpp"
  5.  
  6. class RenderGraph {
  7. public:
  8.     void SetEntities( const std::vector< Entity* >& a_entities );
  9.     void CalculateDependencies();
  10.     void Sort( std::vector< Entity* >& a_output );
  11.  
  12. private:
  13.     struct Node {
  14.         Node( Entity* a_entity );
  15.  
  16.         Entity* entity_;
  17.         std::vector< Node* > dependencies_;
  18.         int isoDepth_;
  19.     };
  20.  
  21.     void VisitNode( int& sortDepth, Node* a_node );
  22.  
  23.     struct Comparator {
  24.         bool operator()( const Node& a_lhs, const Node& a_rhs ) const;
  25.     };
  26.  
  27.     std::vector< Node > nodes_;
  28. };
  29.  
  30. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement