|
|
|||
File indexing completed on 2026-09-20 09:16:44
0001 // Created on: 1996-12-13 0002 // Created by: Jean-Pierre COMBE/Odile Olivier 0003 // Copyright (c) 1996-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 _AIS_PlaneTrihedron_HeaderFile 0018 #define _AIS_PlaneTrihedron_HeaderFile 0019 0020 #include <AIS_InteractiveObject.hxx> 0021 #include <TCollection_AsciiString.hxx> 0022 0023 class AIS_Line; 0024 class AIS_Point; 0025 class Geom_Plane; 0026 0027 //! To construct a selectable 2d axis system in a 3d 0028 //! drawing. This can be placed anywhere in the 3d 0029 //! system, and provides a coordinate system for 0030 //! drawing curves and shapes in a plane. 0031 //! There are 3 selection modes: 0032 //! - mode 0 selection of the whole plane "trihedron" 0033 //! - mode 1 selection of the origin of the plane "trihedron" 0034 //! - mode 2 selection of the axes. 0035 //! Warning 0036 //! For the presentation of planes and trihedra, the 0037 //! millimetre is default unit of length, and 100 the default 0038 //! value for the representation of the axes. If you modify 0039 //! these dimensions, you must temporarily recover the 0040 //! Drawer object. From inside it, take the Aspects in 0041 //! which the values for length are stocked, for example, 0042 //! PlaneAspect for planes and LineAspect for 0043 //! trihedra. Change these values and recalculate the presentation. 0044 class AIS_PlaneTrihedron : public AIS_InteractiveObject 0045 { 0046 DEFINE_STANDARD_RTTIEXT(AIS_PlaneTrihedron, AIS_InteractiveObject) 0047 public: 0048 //! Initializes the plane aPlane. The plane trihedron is 0049 //! constructed from this and an axis. 0050 Standard_EXPORT AIS_PlaneTrihedron(const occ::handle<Geom_Plane>& aPlane); 0051 0052 //! Returns the component specified in SetComponent. 0053 Standard_EXPORT occ::handle<Geom_Plane> Component(); 0054 0055 //! Creates an instance of the component object aPlane. 0056 Standard_EXPORT void SetComponent(const occ::handle<Geom_Plane>& aPlane); 0057 0058 //! Returns the "XAxis". 0059 Standard_EXPORT occ::handle<AIS_Line> XAxis() const; 0060 0061 //! Returns the "YAxis". 0062 Standard_EXPORT occ::handle<AIS_Line> YAxis() const; 0063 0064 //! Returns the point of origin of the plane trihedron. 0065 Standard_EXPORT occ::handle<AIS_Point> Position() const; 0066 0067 //! Sets the length of the X and Y axes. 0068 Standard_EXPORT void SetLength(const double theLength); 0069 0070 //! Returns the length of X and Y axes. 0071 Standard_EXPORT double GetLength() const; 0072 0073 //! Returns true if the display mode selected, aMode, is valid. 0074 Standard_EXPORT bool AcceptDisplayMode(const int aMode) const override; 0075 0076 int Signature() const override { return 4; } 0077 0078 //! Returns datum as the type of Interactive Object. 0079 AIS_KindOfInteractive Type() const override { return AIS_KindOfInteractive_Datum; } 0080 0081 //! Allows you to provide settings for the color aColor. 0082 Standard_EXPORT void SetColor(const Quantity_Color& theColor) override; 0083 0084 void SetXLabel(const TCollection_AsciiString& theLabel) { myXLabel = theLabel; } 0085 0086 void SetYLabel(const TCollection_AsciiString& theLabel) { myYLabel = theLabel; } 0087 0088 protected: 0089 Standard_EXPORT void Compute(const occ::handle<PrsMgr_PresentationManager>& theprsMgr, 0090 const occ::handle<Prs3d_Presentation>& thePrs, 0091 const int theMode) override; 0092 0093 private: 0094 Standard_EXPORT void ComputeSelection(const occ::handle<SelectMgr_Selection>& theSel, 0095 const int theMode) override; 0096 0097 private: 0098 occ::handle<Geom_Plane> myPlane; 0099 occ::handle<AIS_InteractiveObject> myShapes[3]; 0100 TCollection_AsciiString myXLabel; 0101 TCollection_AsciiString myYLabel; 0102 }; 0103 0104 #endif // _AIS_PlaneTrihedron_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|