0028316: Coding Rules - Elimilate confusing aliases of Standard_Real type in V3d_View
[occt.git] / src / Prs3d / Prs3d_PlaneAspect.hxx
CommitLineData
42cf5bc1 1// Created on: 1994-01-17
2// Created by: Modelistation
3// Copyright (c) 1994-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_PlaneAspect_HeaderFile
18#define _Prs3d_PlaneAspect_HeaderFile
19
4e1bc39a 20#include <Prs3d_LineAspect.hxx>
42cf5bc1 21
22//! A framework to define the display of planes.
23class Prs3d_PlaneAspect : public Prs3d_BasicAspect
24{
4e1bc39a 25 DEFINE_STANDARD_RTTIEXT(Prs3d_PlaneAspect, Prs3d_BasicAspect)
42cf5bc1 26public:
27
42cf5bc1 28 //! Constructs an empty framework for the display of planes.
29 Standard_EXPORT Prs3d_PlaneAspect();
30
31 //! Returns the attributes of displayed edges involved in the presentation of planes.
4e1bc39a 32 const Handle(Prs3d_LineAspect)& EdgesAspect() const { return myEdgesAspect; }
33
42cf5bc1 34 //! Returns the attributes of displayed isoparameters involved in the presentation of planes.
4e1bc39a 35 const Handle(Prs3d_LineAspect)& IsoAspect() const { return myIsoAspect; }
42cf5bc1 36
37 //! Returns the settings for displaying an arrow.
4e1bc39a 38 const Handle(Prs3d_LineAspect)& ArrowAspect() const { return myArrowAspect; }
42cf5bc1 39
ee2be2a8 40 void SetArrowsLength (const Standard_Real theLength) { myArrowsLength = theLength; }
42cf5bc1 41
42 //! Returns the length of the arrow shaft used in the display of arrows.
ee2be2a8 43 Standard_Real ArrowsLength() const { return myArrowsLength; }
42cf5bc1 44
45 //! Sets the angle of the arrowhead used in the display of planes.
ee2be2a8 46 void SetArrowsSize (const Standard_Real theSize) { myArrowsSize = theSize; }
42cf5bc1 47
48 //! Returns the size of arrows used in the display of planes.
ee2be2a8 49 Standard_Real ArrowsSize() const { return myArrowsSize; }
4e1bc39a 50
42cf5bc1 51 //! Sets the angle of the arrowhead used in the display
52 //! of arrows involved in the presentation of planes.
ee2be2a8 53 void SetArrowsAngle (const Standard_Real theAngle) { myArrowsAngle = theAngle; }
42cf5bc1 54
55 //! Returns the angle of the arrowhead used in the
56 //! display of arrows involved in the presentation of planes.
ee2be2a8 57 Standard_Real ArrowsAngle() const { return myArrowsAngle; }
42cf5bc1 58
59 //! Sets the display attributes defined in DisplayCenterArrow to active.
4e1bc39a 60 void SetDisplayCenterArrow (const Standard_Boolean theToDraw) { myDrawCenterArrow = theToDraw; }
42cf5bc1 61
62 //! Returns true if the display of center arrows is allowed.
4e1bc39a 63 Standard_Boolean DisplayCenterArrow() const { return myDrawCenterArrow; }
42cf5bc1 64
65 //! Sets the display attributes defined in DisplayEdgesArrows to active.
4e1bc39a 66 void SetDisplayEdgesArrows (const Standard_Boolean theToDraw) { myDrawEdgesArrows = theToDraw; }
42cf5bc1 67
68 //! Returns true if the display of edge arrows is allowed.
4e1bc39a 69 Standard_Boolean DisplayEdgesArrows() const { return myDrawEdgesArrows; }
42cf5bc1 70
4e1bc39a 71 void SetDisplayEdges (const Standard_Boolean theToDraw) { myDrawEdges = theToDraw; }
42cf5bc1 72
4e1bc39a 73 Standard_Boolean DisplayEdges() const { return myDrawEdges; }
42cf5bc1 74
75 //! Sets the display attributes defined in DisplayIso to active.
4e1bc39a 76 void SetDisplayIso (const Standard_Boolean theToDraw) { myDrawIso = theToDraw; }
42cf5bc1 77
78 //! Returns true if the display of isoparameters is allowed.
4e1bc39a 79 Standard_Boolean DisplayIso() const { return myDrawIso; }
42cf5bc1 80
ee2be2a8 81 void SetPlaneLength (const Standard_Real theLX, const Standard_Real theLY)
4e1bc39a 82 {
83 myPlaneXLength = theLX;
84 myPlaneYLength = theLY;
85 }
42cf5bc1 86
87 //! Returns the length of the x axis used in the display of planes.
ee2be2a8 88 Standard_Real PlaneXLength() const { return myPlaneXLength; }
42cf5bc1 89
90 //! Returns the length of the y axis used in the display of planes.
ee2be2a8 91 Standard_Real PlaneYLength() const { return myPlaneYLength; }
42cf5bc1 92
93 //! Sets the distance L between isoparameters used in the display of planes.
ee2be2a8 94 void SetIsoDistance (const Standard_Real theL) { myIsoDistance = theL; }
42cf5bc1 95
96 //! Returns the distance between isoparameters used in the display of planes.
ee2be2a8 97 Standard_Real IsoDistance() const { return myIsoDistance; }
42cf5bc1 98
99protected:
100
42cf5bc1 101 Handle(Prs3d_LineAspect) myEdgesAspect;
102 Handle(Prs3d_LineAspect) myIsoAspect;
103 Handle(Prs3d_LineAspect) myArrowAspect;
ee2be2a8 104 Standard_Real myArrowsLength;
105 Standard_Real myArrowsSize;
106 Standard_Real myArrowsAngle;
107 Standard_Real myPlaneXLength;
108 Standard_Real myPlaneYLength;
109 Standard_Real myIsoDistance;
42cf5bc1 110 Standard_Boolean myDrawCenterArrow;
111 Standard_Boolean myDrawEdgesArrows;
112 Standard_Boolean myDrawEdges;
113 Standard_Boolean myDrawIso;
42cf5bc1 114
115};
116
4e1bc39a 117DEFINE_STANDARD_HANDLE(Prs3d_PlaneAspect, Prs3d_BasicAspect)
42cf5bc1 118
119#endif // _Prs3d_PlaneAspect_HeaderFile