1 // File: OpenGl_PriorityList.hxx
2 // Created: 2 November 2011
3 // Author: Sergey ZERCHANINOV
4 // Copyright: OPEN CASCADE 2011
6 #ifndef _OpenGl_PriorityList_Header
7 #define _OpenGl_PriorityList_Header
9 #include <NCollection_Sequence.hxx>
10 #include <NCollection_Array1.hxx>
12 #include <InterfaceGraphic_telem.hxx>
14 #include <Handle_OpenGl_Workspace.hxx>
16 class OpenGl_Structure;
18 typedef NCollection_Sequence<const OpenGl_Structure*> OpenGl_SequenceOfStructure;
19 typedef NCollection_Array1<OpenGl_SequenceOfStructure> OpenGl_ArrayOfStructure;
21 class OpenGl_PriorityList
25 OpenGl_PriorityList (const Standard_Integer ANbPriorities = 11) : myArray(0,(ANbPriorities-1)), myNbStructures(0) {}
26 virtual ~OpenGl_PriorityList () {}
28 void Add (const OpenGl_Structure *AStructure, const Standard_Integer APriority);
29 void Remove (const OpenGl_Structure *AStructure);
31 Standard_Integer NbStructures () const { return myNbStructures; }
33 void Render (const Handle(OpenGl_Workspace) &AWorkspace) const;
37 OpenGl_ArrayOfStructure myArray;
38 Standard_Integer myNbStructures;
41 IMPLEMENT_MEMORY_OPERATORS
44 #endif //_OpenGl_PriorityList_Header