1 // Copyright (c) 2018 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
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.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
14 #ifndef _XCAFNoteObjects_NoteObject_HeaderFile
15 #define _XCAFNoteObjects_NoteObject_HeaderFile
19 #include <Standard.hxx>
20 #include <Standard_Transient.hxx>
21 #include <Standard_Type.hxx>
22 #include <TopoDS_Shape.hxx>
24 //! object to store note auxiliary data
25 class XCAFNoteObjects_NoteObject : public Standard_Transient
27 DEFINE_STANDARD_RTTIEXT(XCAFNoteObjects_NoteObject, Standard_Transient)
31 Standard_EXPORT XCAFNoteObjects_NoteObject();
34 Standard_EXPORT XCAFNoteObjects_NoteObject (const Handle(XCAFNoteObjects_NoteObject)& theObj);
36 //! Returns True if plane is specified
37 Standard_Boolean HasPlane() const { return myHasPlane; }
39 //! Returns a right-handed coordinate system of the plane
40 const gp_Ax2& GetPlane() const { return myPlane; }
42 //! Sets a right-handed coordinate system of the plane
43 Standard_EXPORT void SetPlane (const gp_Ax2& thePlane);
45 //! Returns True if the attachment point on the annotated object is specified
46 Standard_Boolean HasPoint() const { return myHasPnt; }
48 //! Returns the attachment point on the annotated object
49 const gp_Pnt& GetPoint() const { return myPnt; }
51 //! Sets the anchor point on the annotated object
52 Standard_EXPORT void SetPoint (const gp_Pnt& thePnt);
54 //! Returns True if the text position is specified
55 Standard_Boolean HasPointText() const { return myHasPntTxt; }
57 //! Returns the text position
58 const gp_Pnt& GetPointText() const { return myPntTxt; }
60 //! Sets the text position
61 Standard_EXPORT void SetPointText (const gp_Pnt& thePnt);
63 //! Returns a tessellated annotation if specified
64 const TopoDS_Shape& GetPresentation() const { return myPresentation; }
66 //! Sets a tessellated annotation
67 Standard_EXPORT void SetPresentation (const TopoDS_Shape& thePresentation);
69 //! Resets data to the state after calling the default constructor
70 Standard_EXPORT void Reset();
77 TopoDS_Shape myPresentation;
78 Standard_Boolean myHasPlane;
79 Standard_Boolean myHasPnt;
80 Standard_Boolean myHasPntTxt;
84 DEFINE_STANDARD_HANDLE(XCAFNoteObjects_NoteObject, Standard_Transient)
86 #endif // _XCAFNoteObjects_NoteObject_HeaderFile