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 | ||
55 | virtual void Render (const Handle(OpenGl_Workspace) &AWorkspace) const; | |
56 | ||
57 | protected: | |
58 | ||
59 | //Structure_LABBegin | |
60 | OpenGl_Matrix *myTransformation; | |
61 | TEL_TRANSFORM_PERSISTENCE *myTransPers; | |
62 | DEGENERATION *myDegenerateModel; | |
63 | OpenGl_AspectLine *myAspectLine; | |
64 | OpenGl_AspectFace *myAspectFace; | |
65 | OpenGl_AspectMarker *myAspectMarker; | |
66 | OpenGl_AspectText *myAspectText; | |
67 | //Structure_LABHighlight | |
68 | OpenGl_Group *myHighlightBox; | |
69 | TEL_COLOUR *myHighlightColor; | |
70 | //Structure_LABVisibility | |
71 | //Structure_LABPick | |
72 | int myNamedStatus; //Structure_LABNameSet | |
73 | ||
74 | OpenGl_ListOfStructure myConnected; | |
75 | ||
76 | OpenGl_ListOfGroup myGroups; | |
77 | ||
78 | public: | |
79 | IMPLEMENT_MEMORY_OPERATORS | |
80 | }; | |
81 | ||
82 | #endif //OpenGl_Structure_Header |