Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-07-03 08:34:26

0001 // Copyright (c) 2018 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 #ifndef _XCAFNoteObjects_NoteObject_HeaderFile
0015 #define _XCAFNoteObjects_NoteObject_HeaderFile
0016 
0017 #include <gp_Ax2.hxx>
0018 #include <gp_Pnt.hxx>
0019 #include <Standard.hxx>
0020 #include <Standard_Transient.hxx>
0021 #include <Standard_Type.hxx>
0022 #include <TopoDS_Shape.hxx>
0023 
0024 //! object to store note auxiliary data
0025 class XCAFNoteObjects_NoteObject : public Standard_Transient
0026 {
0027   DEFINE_STANDARD_RTTIEXT(XCAFNoteObjects_NoteObject, Standard_Transient)
0028 public:
0029   //! Empty object
0030   Standard_EXPORT XCAFNoteObjects_NoteObject();
0031 
0032   //! Copy constructor.
0033   Standard_EXPORT XCAFNoteObjects_NoteObject(const Handle(XCAFNoteObjects_NoteObject)& theObj);
0034 
0035   //! Returns True if plane is specified
0036   Standard_Boolean HasPlane() const { return myHasPlane; }
0037 
0038   //! Returns a right-handed coordinate system of the plane
0039   const gp_Ax2& GetPlane() const { return myPlane; }
0040 
0041   //! Sets a right-handed coordinate system of the plane
0042   Standard_EXPORT void SetPlane(const gp_Ax2& thePlane);
0043 
0044   //! Returns True if the attachment point on the annotated object is specified
0045   Standard_Boolean HasPoint() const { return myHasPnt; }
0046 
0047   //! Returns the attachment point on the annotated object
0048   const gp_Pnt& GetPoint() const { return myPnt; }
0049 
0050   //! Sets the anchor point on the annotated object
0051   Standard_EXPORT void SetPoint(const gp_Pnt& thePnt);
0052 
0053   //! Returns True if the text position is specified
0054   Standard_Boolean HasPointText() const { return myHasPntTxt; }
0055 
0056   //! Returns the text position
0057   const gp_Pnt& GetPointText() const { return myPntTxt; }
0058 
0059   //! Sets the text position
0060   Standard_EXPORT void SetPointText(const gp_Pnt& thePnt);
0061 
0062   //! Returns a tessellated annotation if specified
0063   const TopoDS_Shape& GetPresentation() const { return myPresentation; }
0064 
0065   //! Sets a tessellated annotation
0066   Standard_EXPORT void SetPresentation(const TopoDS_Shape& thePresentation);
0067 
0068   //! Resets data to the state after calling the default constructor
0069   Standard_EXPORT void Reset();
0070 
0071 private:
0072   gp_Ax2           myPlane;
0073   gp_Pnt           myPnt;
0074   gp_Pnt           myPntTxt;
0075   TopoDS_Shape     myPresentation;
0076   Standard_Boolean myHasPlane;
0077   Standard_Boolean myHasPnt;
0078   Standard_Boolean myHasPntTxt;
0079 };
0080 
0081 DEFINE_STANDARD_HANDLE(XCAFNoteObjects_NoteObject, Standard_Transient)
0082 
0083 #endif // _XCAFNoteObjects_NoteObject_HeaderFile