Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 2007-01-29
0002 // Created by: Sergey KOCHETKOV
0003 // Copyright (c) 2007-2014 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 _MeshVS_SensitiveMesh_HeaderFile
0017 #define _MeshVS_SensitiveMesh_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 
0021 #include <Select3D_SensitiveEntity.hxx>
0022 #include <Select3D_BndBox3d.hxx>
0023 
0024 
0025 //! This class provides custom mesh sensitive entity used in advanced mesh selection.
0026 class MeshVS_SensitiveMesh : public Select3D_SensitiveEntity
0027 {
0028 public:
0029   
0030   Standard_EXPORT MeshVS_SensitiveMesh (const Handle(SelectMgr_EntityOwner)& theOwner,
0031                                         const Standard_Integer theMode = 0);
0032   
0033   Standard_EXPORT Standard_Integer GetMode() const;
0034   
0035   Standard_EXPORT virtual Handle(Select3D_SensitiveEntity) GetConnected() Standard_OVERRIDE;
0036 
0037   //! Checks whether sensitive overlaps current selecting volume.
0038   virtual Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr,
0039                                     SelectBasics_PickResult& thePickResult) Standard_OVERRIDE
0040   {
0041     (void )theMgr;
0042     (void )thePickResult;
0043     return Standard_False;
0044   }
0045 
0046   //! Returns the amount of mesh nodes
0047   Standard_EXPORT virtual Standard_Integer NbSubElements() const Standard_OVERRIDE;
0048 
0049   //! Returns bounding box of mesh
0050   Standard_EXPORT virtual Select3D_BndBox3d BoundingBox() Standard_OVERRIDE;
0051 
0052   //! Returns center of mesh
0053   Standard_EXPORT virtual gp_Pnt CenterOfGeometry() const Standard_OVERRIDE;
0054 
0055   DEFINE_STANDARD_RTTIEXT(MeshVS_SensitiveMesh,Select3D_SensitiveEntity)
0056 
0057 private:
0058 
0059   Standard_Integer myMode;
0060   Select3D_BndBox3d myBndBox;
0061 };
0062 
0063 DEFINE_STANDARD_HANDLE(MeshVS_SensitiveMesh, Select3D_SensitiveEntity)
0064 
0065 #endif // _MeshVS_SensitiveMesh_HeaderFile