0031321: C# wrapper - wrap AIS_ViewController
[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
4e1bc39a 23//! A framework for displaying arrows in representations of dimensions and relations.
42cf5bc1 24class Prs3d_ArrowAspect : public Prs3d_BasicAspect
25{
4e1bc39a 26 DEFINE_STANDARD_RTTIEXT(Prs3d_ArrowAspect, Prs3d_BasicAspect)
42cf5bc1 27public:
28
42cf5bc1 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.
ee2be2a8 38 Standard_EXPORT Prs3d_ArrowAspect(const Standard_Real anAngle, const Standard_Real aLength);
42cf5bc1 39
40 Standard_EXPORT Prs3d_ArrowAspect(const Handle(Graphic3d_AspectLine3d)& theAspect);
41
42 //! defines the angle of the arrows.
ee2be2a8 43 Standard_EXPORT void SetAngle (const Standard_Real anAngle);
42cf5bc1 44
45 //! returns the current value of the angle used when drawing an arrow.
ee2be2a8 46 Standard_Real Angle() const { return myAngle; }
42cf5bc1 47
4e1bc39a 48 //! Defines the length of the arrows.
ee2be2a8 49 void SetLength (const Standard_Real theLength) { myLength = theLength; }
42cf5bc1 50
4e1bc39a 51 //! Returns the current value of the length used when drawing an arrow.
ee2be2a8 52 Standard_Real Length() const { return myLength; }
42cf5bc1 53
4e1bc39a 54 void SetColor (const Quantity_Color& theColor) { myArrowAspect->SetColor (theColor); }
4e1bc39a 55
56 const Handle(Graphic3d_AspectLine3d)& Aspect() const { return myArrowAspect; }
57
58 void SetAspect (const Handle(Graphic3d_AspectLine3d)& theAspect) { myArrowAspect = theAspect; }
42cf5bc1 59
0904aa63 60 //! Dumps the content of me into the stream
61 Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
62
42cf5bc1 63protected:
64
42cf5bc1 65 Handle(Graphic3d_AspectLine3d) myArrowAspect;
ee2be2a8 66 Standard_Real myAngle;
67 Standard_Real myLength;
42cf5bc1 68
42cf5bc1 69};
70
4e1bc39a 71DEFINE_STANDARD_HANDLE(Prs3d_ArrowAspect, Prs3d_BasicAspect)
42cf5bc1 72
73#endif // _Prs3d_ArrowAspect_HeaderFile