Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:40

0001 // Created on: 1994-01-17
0002 // Created by: Modelistation
0003 // Copyright (c) 1994-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _Prs3d_PlaneAspect_HeaderFile
0018 #define _Prs3d_PlaneAspect_HeaderFile
0019 
0020 #include <Prs3d_LineAspect.hxx>
0021 
0022 //! A framework to define the display of planes.
0023 class Prs3d_PlaneAspect : public Prs3d_BasicAspect
0024 {
0025   DEFINE_STANDARD_RTTIEXT(Prs3d_PlaneAspect, Prs3d_BasicAspect)
0026 public:
0027 
0028   //! Constructs an empty framework for the display of planes.
0029   Standard_EXPORT Prs3d_PlaneAspect();
0030   
0031   //! Returns the attributes of displayed edges involved in the presentation of planes.
0032   const Handle(Prs3d_LineAspect)& EdgesAspect() const { return myEdgesAspect; }
0033 
0034   //! Returns the attributes of displayed isoparameters involved in the presentation of planes.
0035   const Handle(Prs3d_LineAspect)& IsoAspect() const { return myIsoAspect; }
0036   
0037   //! Returns the settings for displaying an arrow.
0038   const Handle(Prs3d_LineAspect)& ArrowAspect() const { return myArrowAspect; }
0039   
0040   void SetArrowsLength (const Standard_Real theLength) { myArrowsLength = theLength; }
0041   
0042   //! Returns the length of the arrow shaft used in the display of arrows.
0043   Standard_Real ArrowsLength() const { return myArrowsLength; }
0044   
0045   //! Sets the angle of the arrowhead used in the display of planes.
0046   void SetArrowsSize (const Standard_Real theSize) { myArrowsSize = theSize; }
0047   
0048   //! Returns the size of arrows used in the display of planes.
0049   Standard_Real ArrowsSize() const { return myArrowsSize; }
0050 
0051   //! Sets the angle of the arrowhead used in the display
0052   //! of arrows involved in the presentation of planes.
0053   void SetArrowsAngle (const Standard_Real theAngle) { myArrowsAngle = theAngle; }
0054   
0055   //! Returns the angle of the arrowhead used in the
0056   //! display of arrows involved in the presentation of planes.
0057   Standard_Real ArrowsAngle() const { return myArrowsAngle; }
0058   
0059   //! Sets the display attributes defined in DisplayCenterArrow to active.
0060   void SetDisplayCenterArrow (const Standard_Boolean theToDraw) { myDrawCenterArrow = theToDraw; }
0061   
0062   //! Returns true if the display of center arrows is allowed.
0063   Standard_Boolean DisplayCenterArrow() const { return myDrawCenterArrow; }
0064   
0065   //! Sets the display attributes defined in DisplayEdgesArrows to active.
0066   void SetDisplayEdgesArrows (const Standard_Boolean theToDraw) { myDrawEdgesArrows = theToDraw; }
0067   
0068   //! Returns true if the display of edge arrows is allowed.
0069   Standard_Boolean DisplayEdgesArrows() const { return myDrawEdgesArrows; }
0070   
0071   void SetDisplayEdges (const Standard_Boolean theToDraw) { myDrawEdges = theToDraw; }
0072   
0073   Standard_Boolean DisplayEdges() const { return myDrawEdges; }
0074   
0075   //! Sets the display attributes defined in DisplayIso to active.
0076   void SetDisplayIso (const Standard_Boolean theToDraw) { myDrawIso = theToDraw; }
0077   
0078   //! Returns true if the display of isoparameters is allowed.
0079   Standard_Boolean DisplayIso() const { return myDrawIso; }
0080   
0081   void SetPlaneLength (const Standard_Real theLX, const Standard_Real theLY)
0082   {
0083     myPlaneXLength = theLX;
0084     myPlaneYLength = theLY;
0085   }
0086   
0087   //! Returns the length of the x axis used in the display of planes.
0088   Standard_Real PlaneXLength() const { return myPlaneXLength; }
0089   
0090   //! Returns the length of the y axis used in the display of planes.
0091   Standard_Real PlaneYLength() const { return myPlaneYLength; }
0092   
0093   //! Sets the distance L between isoparameters used in the display of planes.
0094   void SetIsoDistance (const Standard_Real theL) { myIsoDistance = theL; }
0095   
0096   //! Returns the distance between isoparameters used in the display of planes.
0097   Standard_Real IsoDistance() const { return myIsoDistance; }
0098 
0099   //! Dumps the content of me into the stream
0100   Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
0101 
0102 protected:
0103 
0104   Handle(Prs3d_LineAspect) myEdgesAspect;
0105   Handle(Prs3d_LineAspect) myIsoAspect;
0106   Handle(Prs3d_LineAspect) myArrowAspect;
0107   Standard_Real    myArrowsLength;
0108   Standard_Real    myArrowsSize;
0109   Standard_Real    myArrowsAngle;
0110   Standard_Real    myPlaneXLength;
0111   Standard_Real    myPlaneYLength;
0112   Standard_Real    myIsoDistance;
0113   Standard_Boolean myDrawCenterArrow;
0114   Standard_Boolean myDrawEdgesArrows;
0115   Standard_Boolean myDrawEdges;
0116   Standard_Boolean myDrawIso;
0117 
0118 };
0119 
0120 DEFINE_STANDARD_HANDLE(Prs3d_PlaneAspect, Prs3d_BasicAspect)
0121 
0122 #endif // _Prs3d_PlaneAspect_HeaderFile