Commit | Line | Data |
---|---|---|
2166f0fa SK |
1 | // File: OpenGl_Structure.hxx |
2 | // Created: 1 August 2011 | |
3 | // Author: Sergey ZERCHANINOV | |
4 | // Copyright: OPEN CASCADE 2011 | |
5 | ||
6 | #ifndef OpenGl_Structure_Header | |
7 | #define OpenGl_Structure_Header | |
8 | ||
9 | #include <NCollection_List.hxx> | |
10 | #include <InterfaceGraphic_Graphic3d.hxx> | |
11 | ||
12 | #include <OpenGl_AspectLine.hxx> | |
13 | #include <OpenGl_AspectFace.hxx> | |
14 | #include <OpenGl_AspectMarker.hxx> | |
15 | #include <OpenGl_AspectText.hxx> | |
16 | ||
17 | #include <OpenGl_Group.hxx> | |
18 | #include <OpenGl_Matrix.hxx> | |
19 | ||
20 | typedef NCollection_List<const OpenGl_Structure *> OpenGl_ListOfStructure; | |
21 | typedef NCollection_List<const OpenGl_Group *> OpenGl_ListOfGroup; | |
22 | ||
23 | class OpenGl_Structure : public OpenGl_Element | |
24 | { | |
25 | public: | |
26 | OpenGl_Structure (); | |
27 | virtual ~OpenGl_Structure (); | |
28 | ||
29 | void SetTransformation (const float *AMatrix); | |
30 | ||
31 | void SetTransformPersistence (const CALL_DEF_TRANSFORM_PERSISTENCE &ATransPers); | |
32 | ||
33 | void SetDegenerateModel (const Standard_Integer AMode, const float ASkipRatio); | |
34 | ||
35 | void SetAspectLine (const CALL_DEF_CONTEXTLINE &AContext); | |
36 | void SetAspectFace (const CALL_DEF_CONTEXTFILLAREA &AContext); | |
37 | void SetAspectMarker (const CALL_DEF_CONTEXTMARKER &AContext); | |
38 | void SetAspectText (const CALL_DEF_CONTEXTTEXT &AContext); | |
39 | ||
40 | void SetHighlightBox (const CALL_DEF_BOUNDBOX &ABoundBox); | |
41 | void ClearHighlightBox (); | |
42 | ||
43 | void SetHighlightColor (const Standard_ShortReal R, const Standard_ShortReal G, const Standard_ShortReal B); | |
44 | void ClearHighlightColor (); | |
45 | ||
46 | void SetNamedStatus (const Standard_Integer aStatus) { myNamedStatus = aStatus; } | |
47 | ||
48 | void Connect (const OpenGl_Structure *astructure); | |
49 | void Disconnect (const OpenGl_Structure *astructure); | |
50 | ||
51 | OpenGl_Group * AddGroup (); | |
52 | void RemoveGroup (const OpenGl_Group *); | |
53 | void Clear (); | |
54 | ||
59f45b7c | 55 | //! Set z layer ID to display the structure in specified layer |
56 | void SetZLayer (const Standard_Integer theLayerIndex); | |
57 | ||
58 | //! Get z layer ID | |
59 | Standard_Integer GetZLayer () const; | |
2166f0fa | 60 | |
59f45b7c | 61 | virtual void Render (const Handle(OpenGl_Workspace) &AWorkspace) const; |
62 | ||
2166f0fa SK |
63 | protected: |
64 | ||
65 | //Structure_LABBegin | |
66 | OpenGl_Matrix *myTransformation; | |
67 | TEL_TRANSFORM_PERSISTENCE *myTransPers; | |
68 | DEGENERATION *myDegenerateModel; | |
69 | OpenGl_AspectLine *myAspectLine; | |
70 | OpenGl_AspectFace *myAspectFace; | |
71 | OpenGl_AspectMarker *myAspectMarker; | |
72 | OpenGl_AspectText *myAspectText; | |
73 | //Structure_LABHighlight | |
74 | OpenGl_Group *myHighlightBox; | |
75 | TEL_COLOUR *myHighlightColor; | |
76 | //Structure_LABVisibility | |
77 | //Structure_LABPick | |
78 | int myNamedStatus; //Structure_LABNameSet | |
59f45b7c | 79 | int myZLayer; |
2166f0fa SK |
80 | |
81 | OpenGl_ListOfStructure myConnected; | |
82 | ||
83 | OpenGl_ListOfGroup myGroups; | |
84 | ||
85 | public: | |
1c35b92f | 86 | DEFINE_STANDARD_ALLOC |
2166f0fa SK |
87 | }; |
88 | ||
89 | #endif //OpenGl_Structure_Header |