|
|
|||
File indexing completed on 2026-07-13 08:27:30
0001 // Created by: GG 0002 // Copyright (c) 1991-1999 Matra Datavision 0003 // Copyright (c) 1999-2013 OPEN CASCADE SAS 0004 // 0005 // This file is part of Open CASCADE Technology software library. 0006 // 0007 // This library is free software; you can redistribute it and/or modify it under 0008 // the terms of the GNU Lesser General Public License version 2.1 as published 0009 // by the Free Software Foundation, with special exception defined in the file 0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0011 // distribution for complete text of the license and disclaimer of any warranty. 0012 // 0013 // Alternatively, this file may be used under the terms of Open CASCADE 0014 // commercial license or contractual agreement. 0015 0016 #ifndef V3d_Plane_HeaderFile 0017 #define V3d_Plane_HeaderFile 0018 0019 #include <V3d_View.hxx> 0020 0021 class V3d_Plane; 0022 DEFINE_STANDARD_HANDLE(V3d_Plane, Standard_Transient) 0023 0024 //! Obsolete clip plane presentation class. 0025 //! Ported on new core of Graphic3d_ClipPlane approach. 0026 //! Please access Graphic3d_ClipPlane via ClipPlane() method 0027 //! to use it for standard clipping workflow. 0028 //! Example of use: 0029 //! @code 0030 //! 0031 //! Handle(V3d_Plane) aPlane (0, 1, 0, -20); 0032 //! Handle(V3d_View) aView; 0033 //! aView->AddClipPlane (aPlane->ClipPlane()); 0034 //! 0035 //! aPlane->Display (aView); 0036 //! aPlane->SetPlane (0, 1, 0, -30); 0037 //! aView->RemoveClipPlane (aPlane->ClipPlane()); 0038 //! 0039 //! @endcode 0040 //! Use interface of this class to modify plane equation synchronously 0041 //! with clipping equation. 0042 class V3d_Plane : public Standard_Transient 0043 { 0044 public: 0045 //! Creates a clipping plane from plane coefficients. 0046 Standard_EXPORT V3d_Plane(const Standard_Real theA = 0.0, 0047 const Standard_Real theB = 0.0, 0048 const Standard_Real theC = 1.0, 0049 const Standard_Real theD = 0.0); 0050 0051 //! Change plane equation. 0052 Standard_EXPORT void SetPlane(const Standard_Real theA, 0053 const Standard_Real theB, 0054 const Standard_Real theC, 0055 const Standard_Real theD); 0056 0057 //! Display the plane representation in the chosen view. 0058 Standard_EXPORT virtual void Display(const Handle(V3d_View)& theView, 0059 const Quantity_Color& theColor = Quantity_NOC_GRAY); 0060 0061 //! Erase the plane representation. 0062 Standard_EXPORT void Erase(); 0063 0064 //! Returns the parameters of the plane. 0065 Standard_EXPORT void Plane(Standard_Real& theA, 0066 Standard_Real& theB, 0067 Standard_Real& theC, 0068 Standard_Real& theD) const; 0069 0070 //! Returns TRUE when the plane representation is displayed. 0071 Standard_EXPORT Standard_Boolean IsDisplayed() const; 0072 0073 //! Use this method to pass clipping plane implementation for 0074 //! standard clipping workflow. 0075 //! @return clipping plane implementation handle. 0076 const Handle(Graphic3d_ClipPlane)& ClipPlane() const { return myPlane; } 0077 0078 private: 0079 //! Updates the plane representation. 0080 Standard_EXPORT void Update(); 0081 0082 protected: 0083 Handle(Graphic3d_Structure) myGraphicStructure; 0084 0085 private: 0086 Handle(Graphic3d_ClipPlane) myPlane; //!< clip plane implementation. 0087 0088 public: 0089 DEFINE_STANDARD_RTTIEXT(V3d_Plane, Standard_Transient) 0090 }; 0091 0092 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|