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
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _Prs3d_ArrowAspect_HeaderFile
18 #define _Prs3d_ArrowAspect_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
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;
32 class Prs3d_ArrowAspect;
33 DEFINE_STANDARD_HANDLE(Prs3d_ArrowAspect, Prs3d_BasicAspect)
35 //! A framework for displaying arrows in representations
36 //! of dimensions and relations.
37 class Prs3d_ArrowAspect : public Prs3d_BasicAspect
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();
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);
54 Standard_EXPORT Prs3d_ArrowAspect(const Handle(Graphic3d_AspectLine3d)& theAspect);
56 //! defines the angle of the arrows.
57 Standard_EXPORT void SetAngle (const Quantity_PlaneAngle anAngle);
59 //! returns the current value of the angle used when drawing an arrow.
60 Standard_EXPORT Quantity_PlaneAngle Angle() const;
62 //! defines the length of the arrows.
63 Standard_EXPORT void SetLength (const Quantity_Length aLength);
65 //! returns the current value of the length used when drawing an arrow.
66 Standard_EXPORT Quantity_Length Length() const;
68 Standard_EXPORT void SetColor (const Quantity_Color& aColor);
70 Standard_EXPORT void SetColor (const Quantity_NameOfColor aColor);
72 Standard_EXPORT Handle(Graphic3d_AspectLine3d) Aspect() const;
74 Standard_EXPORT void SetAspect (const Handle(Graphic3d_AspectLine3d)& theAspect);
79 DEFINE_STANDARD_RTTIEXT(Prs3d_ArrowAspect,Prs3d_BasicAspect)
89 Handle(Graphic3d_AspectLine3d) myArrowAspect;
90 Quantity_PlaneAngle myAngle;
91 Quantity_Length myLength;
102 #endif // _Prs3d_ArrowAspect_HeaderFile