Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:34

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 
0030   //! Empty object
0031   Standard_EXPORT XCAFNoteObjects_NoteObject();
0032 
0033   //! Copy constructor.
0034   Standard_EXPORT XCAFNoteObjects_NoteObject (const Handle(XCAFNoteObjects_NoteObject)& theObj);
0035 
0036   //! Returns True if plane is specified
0037   Standard_Boolean HasPlane() const { return myHasPlane; }
0038 
0039   //! Returns a right-handed coordinate system of the plane
0040   const gp_Ax2& GetPlane() const { return myPlane; }
0041 
0042   //! Sets a right-handed coordinate system of the plane
0043   Standard_EXPORT void SetPlane (const gp_Ax2& thePlane);
0044 
0045   //! Returns True if the attachment point on the annotated object is specified
0046   Standard_Boolean HasPoint() const { return myHasPnt; }
0047 
0048   //! Returns the attachment point on the annotated object
0049   const gp_Pnt& GetPoint() const { return myPnt; }
0050 
0051   //! Sets the anchor point on the annotated object
0052   Standard_EXPORT void SetPoint (const gp_Pnt& thePnt);
0053 
0054   //! Returns True if the text position is specified
0055   Standard_Boolean HasPointText() const { return myHasPntTxt; }
0056 
0057   //! Returns the text position
0058   const gp_Pnt& GetPointText() const { return myPntTxt; }
0059 
0060   //! Sets the text position
0061   Standard_EXPORT void SetPointText (const gp_Pnt& thePnt);
0062 
0063   //! Returns a tessellated annotation if specified
0064   const TopoDS_Shape& GetPresentation() const { return myPresentation; }
0065 
0066   //! Sets a tessellated annotation
0067   Standard_EXPORT void SetPresentation (const TopoDS_Shape& thePresentation);
0068 
0069   //! Resets data to the state after calling the default constructor
0070   Standard_EXPORT void Reset();
0071 
0072 private:
0073 
0074   gp_Ax2 myPlane;
0075   gp_Pnt myPnt;
0076   gp_Pnt myPntTxt;
0077   TopoDS_Shape myPresentation;
0078   Standard_Boolean myHasPlane;
0079   Standard_Boolean myHasPnt;
0080   Standard_Boolean myHasPntTxt;
0081 
0082 };
0083 
0084 DEFINE_STANDARD_HANDLE(XCAFNoteObjects_NoteObject, Standard_Transient)
0085 
0086 #endif // _XCAFNoteObjects_NoteObject_HeaderFile