74618acf |
1 | // Copyright (c) 2014 OPEN CASCADE SAS |
2 | // |
3 | // This file is part of Open CASCADE Technology software library. |
4 | // |
5 | // This library is free software; you can redistribute it and/or modify it under |
6 | // the terms of the GNU Lesser General Public License version 2.1 as published |
7 | // by the Free Software Foundation, with special exception defined in the file |
8 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
9 | // distribution for complete text of the license and disclaimer of any warranty. |
10 | // |
11 | // Alternatively, this file may be used under the terms of Open CASCADE |
12 | // commercial license or contractual agreement. |
13 | |
14 | #ifndef _XCAFPrs_AISObject_HeaderFile |
15 | #define _XCAFPrs_AISObject_HeaderFile |
16 | |
17 | #include <AIS_ColoredShape.hxx> |
18 | |
19 | #include <TDF_Label.hxx> |
20 | |
21 | class XCAFPrs_Style; |
22 | |
23 | //! Implements AIS_InteractiveObject functionality for shape in DECAF document. |
24 | class XCAFPrs_AISObject : public AIS_ColoredShape |
25 | { |
26 | public: |
27 | |
28 | //! Creates an object to visualise the shape label. |
29 | Standard_EXPORT XCAFPrs_AISObject (const TDF_Label& theLabel); |
30 | |
31 | protected: |
32 | |
33 | //! Redefined method to compute presentation. |
34 | Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& thePresentationManager, |
35 | const Handle(Prs3d_Presentation)& thePresentation, |
36 | const Standard_Integer theMode); |
37 | |
38 | //! Set colors to drawer |
6262338c |
39 | Standard_EXPORT void SetColors (const Handle(Prs3d_Drawer)& theDrawer, |
40 | const Quantity_Color& theColorCurv, |
41 | const Quantity_Color& theColorSurf); |
74618acf |
42 | |
43 | //! Fills out a default style object which is used when styles are |
44 | //! not explicitly defined in the document. |
45 | //! By default, the style uses white color for curves and surfaces. |
46 | Standard_EXPORT virtual void DefaultStyle (XCAFPrs_Style& theStyle) const; |
47 | |
48 | private: |
49 | |
50 | TDF_Label myLabel; |
51 | |
52 | public: |
53 | |
54 | DEFINE_STANDARD_RTTI(XCAFPrs_AISObject) |
55 | |
56 | }; |
57 | |
58 | DEFINE_STANDARD_HANDLE(XCAFPrs_AISObject, AIS_ColoredShape) |
59 | |
60 | #endif // _XCAFPrs_AISObject_HeaderFile |