0031687: Draw Harness, ViewerTest - extend command vrenderparams with option updating...
[occt.git] / src / XCAFNoteObjects / XCAFNoteObjects_NoteObject.hxx
1 // Copyright (c) 2018 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 _XCAFNoteObjects_NoteObject_HeaderFile
15 #define _XCAFNoteObjects_NoteObject_HeaderFile
16
17 #include <gp_Ax2.hxx>
18 #include <gp_Pnt.hxx>
19 #include <Standard.hxx>
20 #include <Standard_Transient.hxx>
21 #include <Standard_Type.hxx>
22 #include <TopoDS_Shape.hxx>
23
24 //! object to store note auxiliary data
25 class XCAFNoteObjects_NoteObject : public Standard_Transient
26 {
27  DEFINE_STANDARD_RTTIEXT(XCAFNoteObjects_NoteObject, Standard_Transient)
28 public:
29
30   //! Empty object
31   Standard_EXPORT XCAFNoteObjects_NoteObject();
32
33   //! Copy constructor.
34   Standard_EXPORT XCAFNoteObjects_NoteObject (const Handle(XCAFNoteObjects_NoteObject)& theObj);
35
36   //! Returns True if plane is specified
37   Standard_Boolean HasPlane() const { return myHasPlane; }
38
39   //! Returns a right-handed coordinate system of the plane
40   const gp_Ax2& GetPlane() const { return myPlane; }
41
42   //! Sets a right-handed coordinate system of the plane
43   Standard_EXPORT void SetPlane (const gp_Ax2& thePlane);
44
45   //! Returns True if the attachment point on the annotated object is specified
46   Standard_Boolean HasPoint() const { return myHasPnt; }
47
48   //! Returns the attachment point on the annotated object
49   const gp_Pnt& GetPoint() const { return myPnt; }
50
51   //! Sets the anchor point on the annotated object
52   Standard_EXPORT void SetPoint (const gp_Pnt& thePnt);
53
54   //! Returns True if the text position is specified
55   Standard_Boolean HasPointText() const { return myHasPntTxt; }
56
57   //! Returns the text position
58   const gp_Pnt& GetPointText() const { return myPntTxt; }
59
60   //! Sets the text position
61   Standard_EXPORT void SetPointText (const gp_Pnt& thePnt);
62
63   //! Returns a tesselated annotation if specified
64   const TopoDS_Shape& GetPresentation() const { return myPresentation; }
65
66   //! Sets a tesselated annotation
67   Standard_EXPORT void SetPresentation (const TopoDS_Shape& thePresentation);
68
69   //! Resets data to the state after calling the default constructor
70   Standard_EXPORT void Reset();
71
72 private:
73
74   gp_Ax2 myPlane;
75   gp_Pnt myPnt;
76   gp_Pnt myPntTxt;
77   TopoDS_Shape myPresentation;
78   Standard_Boolean myHasPlane;
79   Standard_Boolean myHasPnt;
80   Standard_Boolean myHasPntTxt;
81
82 };
83
84 DEFINE_STANDARD_HANDLE(XCAFNoteObjects_NoteObject, Standard_Transient)
85
86 #endif // _XCAFNoteObjects_NoteObject_HeaderFile