Warnings on vc14 were eliminated
[occt.git] / src / IGESDimen / IGESDimen_LeaderArrow.hxx
1 // Created on: 1993-01-13
2 // Created by: CKY / Contract Toubro-Larsen ( Deepak PRABHU )
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _IGESDimen_LeaderArrow_HeaderFile
18 #define _IGESDimen_LeaderArrow_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <Standard_Real.hxx>
24 #include <gp_XY.hxx>
25 #include <TColgp_HArray1OfXY.hxx>
26 #include <IGESData_IGESEntity.hxx>
27 #include <Standard_Integer.hxx>
28 class Standard_OutOfRange;
29 class gp_XY;
30 class gp_Pnt2d;
31 class gp_Pnt;
32
33
34 class IGESDimen_LeaderArrow;
35 DEFINE_STANDARD_HANDLE(IGESDimen_LeaderArrow, IGESData_IGESEntity)
36
37 //! defines LeaderArrow, Type <214> Form <1-12>
38 //! in package IGESDimen
39 //! Consists of one or more line segments except when
40 //! leader is part of an angular dimension, with links to
41 //! presumed text item
42 class IGESDimen_LeaderArrow : public IGESData_IGESEntity
43 {
44
45 public:
46
47   
48   Standard_EXPORT IGESDimen_LeaderArrow();
49   
50   //! This method is used to set the fields of the class
51   //! LeaderArrow
52   //! - height      : ArrowHead height
53   //! - width       : ArrowHead width
54   //! - depth       : Z Depth
55   //! - position    : ArrowHead coordinates
56   //! - segments    : Segment tail coordinate pairs
57   Standard_EXPORT void Init (const Standard_Real height, const Standard_Real width, const Standard_Real depth, const gp_XY& position, const Handle(TColgp_HArray1OfXY)& segments);
58   
59   //! Changes FormNumber (indicates the Shape of the Arrow)
60   //! Error if not in range [0-12]
61   Standard_EXPORT void SetFormNumber (const Standard_Integer form);
62   
63   //! returns number of segments
64   Standard_EXPORT Standard_Integer NbSegments() const;
65   
66   //! returns ArrowHead height
67   Standard_EXPORT Standard_Real ArrowHeadHeight() const;
68   
69   //! returns ArrowHead width
70   Standard_EXPORT Standard_Real ArrowHeadWidth() const;
71   
72   //! returns Z depth
73   Standard_EXPORT Standard_Real ZDepth() const;
74   
75   //! returns ArrowHead co-ordinates
76   Standard_EXPORT gp_Pnt2d ArrowHead() const;
77   
78   //! returns ArrowHead co-ordinates after Transformation
79   Standard_EXPORT gp_Pnt TransformedArrowHead() const;
80   
81   //! returns segment tail co-ordinates.
82   //! raises exception if Index <= 0 or Index > NbSegments
83   Standard_EXPORT gp_Pnt2d SegmentTail (const Standard_Integer Index) const;
84   
85   //! returns segment tail co-ordinates after Transformation.
86   //! raises exception if Index <= 0 or Index > NbSegments
87   Standard_EXPORT gp_Pnt TransformedSegmentTail (const Standard_Integer Index) const;
88
89
90
91
92   DEFINE_STANDARD_RTTIEXT(IGESDimen_LeaderArrow,IGESData_IGESEntity)
93
94 protected:
95
96
97
98
99 private:
100
101
102   Standard_Real theArrowHeadHeight;
103   Standard_Real theArrowHeadWidth;
104   Standard_Real theZDepth;
105   gp_XY theArrowHead;
106   Handle(TColgp_HArray1OfXY) theSegmentTails;
107
108
109 };
110
111
112
113
114
115
116
117 #endif // _IGESDimen_LeaderArrow_HeaderFile