0028316: Coding Rules - Elimilate confusing aliases of Standard_Real type in V3d_View
[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 <Graphic3d_AspectLine3d.hxx>
21 #include <Prs3d_BasicAspect.hxx>
22
23 //! A framework for displaying arrows in representations of dimensions and relations.
24 class Prs3d_ArrowAspect : public Prs3d_BasicAspect
25 {
26   DEFINE_STANDARD_RTTIEXT(Prs3d_ArrowAspect, Prs3d_BasicAspect)
27 public:
28
29   //! Constructs an empty framework for displaying arrows
30   //! in representations of lengths. The lengths displayed
31   //! are either on their own or in chamfers, fillets,
32   //! diameters and radii.
33   Standard_EXPORT Prs3d_ArrowAspect();
34   
35   //! Constructs a framework to display an arrow with a
36   //! shaft of the length aLength and having a head with
37   //! sides at the angle anAngle from each other.
38   Standard_EXPORT Prs3d_ArrowAspect(const Standard_Real anAngle, const Standard_Real aLength);
39   
40   Standard_EXPORT Prs3d_ArrowAspect(const Handle(Graphic3d_AspectLine3d)& theAspect);
41   
42   //! defines the angle of the arrows.
43   Standard_EXPORT void SetAngle (const Standard_Real anAngle);
44   
45   //! returns the current value of the angle used when drawing an arrow.
46   Standard_Real Angle() const { return myAngle; }
47
48   //! Defines the length of the arrows.
49   void SetLength (const Standard_Real theLength) { myLength = theLength; }
50
51   //! Returns the current value of the length used when drawing an arrow.
52   Standard_Real Length() const { return myLength; }
53
54   void SetColor (const Quantity_Color& theColor) { myArrowAspect->SetColor (theColor); }
55   
56   const Handle(Graphic3d_AspectLine3d)& Aspect() const { return myArrowAspect; }
57   
58   void SetAspect (const Handle(Graphic3d_AspectLine3d)& theAspect) { myArrowAspect = theAspect; }
59
60 protected:
61
62   Handle(Graphic3d_AspectLine3d) myArrowAspect;
63   Standard_Real myAngle;
64   Standard_Real myLength;
65
66 };
67
68 DEFINE_STANDARD_HANDLE(Prs3d_ArrowAspect, Prs3d_BasicAspect)
69
70 #endif // _Prs3d_ArrowAspect_HeaderFile