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