8c7fab9b |
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 | #include <XCAFNoteObjects_NoteObject.hxx> |
15 | |
16 | IMPLEMENT_STANDARD_RTTIEXT(XCAFNoteObjects_NoteObject, Standard_Transient) |
17 | |
18 | //======================================================================= |
19 | //function : XCAFDimTolObjects_DimensionObject |
20 | //purpose : |
21 | //======================================================================= |
22 | XCAFNoteObjects_NoteObject::XCAFNoteObjects_NoteObject() |
23 | : myHasPlane (Standard_False), |
24 | myHasPnt (Standard_False), |
25 | myHasPntTxt(Standard_False) |
26 | { |
27 | } |
28 | |
29 | //======================================================================= |
30 | //function : XCAFDimTolObjects_DimensionObject |
31 | //purpose : |
32 | //======================================================================= |
33 | XCAFNoteObjects_NoteObject::XCAFNoteObjects_NoteObject (const Handle(XCAFNoteObjects_NoteObject)& theObj) |
34 | : myPlane (theObj->myPlane), |
35 | myPnt (theObj->myPnt), |
36 | myPntTxt (theObj->myPntTxt), |
37 | myPresentation (theObj->myPresentation), |
38 | myHasPlane (theObj->myHasPlane), |
39 | myHasPnt (theObj->myHasPnt), |
40 | myHasPntTxt (theObj->myHasPntTxt) |
41 | { |
42 | } |
43 | |
44 | //======================================================================= |
45 | //function : SetPlane |
46 | //purpose : |
47 | //======================================================================= |
48 | void XCAFNoteObjects_NoteObject::SetPlane (const gp_Ax2& thePlane) |
49 | { |
50 | myPlane = thePlane; |
51 | myHasPlane = Standard_True; |
52 | } |
53 | |
54 | //======================================================================= |
55 | //function : SetPoint |
56 | //purpose : |
57 | //======================================================================= |
58 | void XCAFNoteObjects_NoteObject::SetPoint (const gp_Pnt& thePnt) |
59 | { |
60 | myPnt = thePnt; |
61 | myHasPnt = Standard_True; |
62 | } |
63 | |
64 | //======================================================================= |
65 | //function : SetPointText |
66 | //purpose : |
67 | //======================================================================= |
68 | void XCAFNoteObjects_NoteObject::SetPointText (const gp_Pnt& thePnt) |
69 | { |
70 | myPntTxt = thePnt; |
71 | myHasPntTxt = Standard_True; |
72 | } |
73 | |
74 | //======================================================================= |
75 | //function : SetPresentation |
76 | //purpose : |
77 | //======================================================================= |
78 | void XCAFNoteObjects_NoteObject::SetPresentation (const TopoDS_Shape& thePresentation) |
79 | { |
80 | myPresentation = thePresentation; |
81 | } |
82 | |
83 | //======================================================================= |
84 | //function : Reset |
85 | //purpose : |
86 | //======================================================================= |
87 | void XCAFNoteObjects_NoteObject::Reset() |
88 | { |
89 | myHasPlane = Standard_False; |
90 | myHasPnt = Standard_False; |
91 | myHasPntTxt = Standard_False; |
92 | myPresentation.Nullify(); |
93 | } |