0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- automatic
[occt.git] / src / Prs3d / Prs3d_ArrowAspect.hxx
1 // Created on: 1993-06-11
2 // Created by: Jean-Louis FRENKEL
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 _Prs3d_ArrowAspect_HeaderFile
18 #define _Prs3d_ArrowAspect_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <Quantity_PlaneAngle.hxx>
24 #include <Quantity_Length.hxx>
25 #include <Prs3d_BasicAspect.hxx>
26 #include <Quantity_NameOfColor.hxx>
27 class Graphic3d_AspectLine3d;
28 class Prs3d_InvalidAngle;
29 class Quantity_Color;
30
31
32 class Prs3d_ArrowAspect;
33 DEFINE_STANDARD_HANDLE(Prs3d_ArrowAspect, Prs3d_BasicAspect)
34
35 //! A framework for displaying arrows in representations
36 //! of dimensions and relations.
37 class Prs3d_ArrowAspect : public Prs3d_BasicAspect
38 {
39
40 public:
41
42   
43   //! Constructs an empty framework for displaying arrows
44   //! in representations of lengths. The lengths displayed
45   //! are either on their own or in chamfers, fillets,
46   //! diameters and radii.
47   Standard_EXPORT Prs3d_ArrowAspect();
48   
49   //! Constructs a framework to display an arrow with a
50   //! shaft of the length aLength and having a head with
51   //! sides at the angle anAngle from each other.
52   Standard_EXPORT Prs3d_ArrowAspect(const Quantity_PlaneAngle anAngle, const Quantity_Length aLength);
53   
54   Standard_EXPORT Prs3d_ArrowAspect(const Handle(Graphic3d_AspectLine3d)& theAspect);
55   
56   //! defines the angle of the arrows.
57   Standard_EXPORT void SetAngle (const Quantity_PlaneAngle anAngle);
58   
59   //! returns the current value of the angle used when drawing an arrow.
60   Standard_EXPORT Quantity_PlaneAngle Angle() const;
61   
62   //! defines the length of the arrows.
63   Standard_EXPORT void SetLength (const Quantity_Length aLength);
64   
65   //! returns the current value of the length used when drawing an arrow.
66   Standard_EXPORT Quantity_Length Length() const;
67   
68   Standard_EXPORT void SetColor (const Quantity_Color& aColor);
69   
70   Standard_EXPORT void SetColor (const Quantity_NameOfColor aColor);
71   
72   Standard_EXPORT Handle(Graphic3d_AspectLine3d) Aspect() const;
73   
74   Standard_EXPORT void SetAspect (const Handle(Graphic3d_AspectLine3d)& theAspect);
75
76
77
78
79   DEFINE_STANDARD_RTTIEXT(Prs3d_ArrowAspect,Prs3d_BasicAspect)
80
81 protected:
82
83
84
85
86 private:
87
88
89   Handle(Graphic3d_AspectLine3d) myArrowAspect;
90   Quantity_PlaneAngle myAngle;
91   Quantity_Length myLength;
92
93
94 };
95
96
97
98
99
100
101
102 #endif // _Prs3d_ArrowAspect_HeaderFile