#ifndef _MeshVS_Mesh_HeaderFile
#define _MeshVS_Mesh_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
#include <MeshVS_SequenceOfPrsBuilder.hxx>
#include <MeshVS_DataMapOfIntegerOwner.hxx>
#include <MeshVS_MeshSelectionMethod.hxx>
#include <AIS_InteractiveObject.hxx>
-#include <Standard_Boolean.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <Standard_Integer.hxx>
-#include <SelectMgr_Selection.hxx>
#include <SelectMgr_SequenceOfOwner.hxx>
#include <Quantity_NameOfColor.hxx>
#include <Standard_CString.hxx>
+
class MeshVS_PrsBuilder;
class TColStd_HPackedMapOfInteger;
class MeshVS_DataSource;
class MeshVS_Drawer;
class SelectMgr_EntityOwner;
-class Prs3d_Presentation;
-
-class MeshVS_Mesh;
DEFINE_STANDARD_HANDLE(MeshVS_Mesh, AIS_InteractiveObject)
//! the main class provides interface to create mesh presentation as a whole
public:
-
//! Constructor.
//! theIsAllowOverlapped is Standard_True, if it is allowed to draw edges overlapped with beams
//! Its value is stored in drawer
Standard_EXPORT MeshVS_Mesh(const Standard_Boolean theIsAllowOverlapped = Standard_False);
-
- Standard_EXPORT virtual void Destroy();
-~MeshVS_Mesh()
-{
- Destroy();
-}
-
+
+ //! Returns true for supported display modes basing on a list of defined builders.
+ Standard_EXPORT virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const Standard_OVERRIDE;
+
//! Computes presentation using builders added to sequence. Each builder computes
//! own part of mesh presentation according to its type.
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& PM, const Handle(Prs3d_Presentation)& Prs, const Standard_Integer DisplayMode) Standard_OVERRIDE;
Standard_EXPORT virtual void HilightSelected (const Handle(PrsMgr_PresentationManager3d)& PM, const SelectMgr_SequenceOfOwner& Owners) Standard_OVERRIDE;
//! Draw hilighted owner presentation
- Standard_EXPORT virtual void HilightOwnerWithColor (const Handle(PrsMgr_PresentationManager3d)& PM, const Quantity_NameOfColor Color, const Handle(SelectMgr_EntityOwner)& Owner) Standard_OVERRIDE;
+ Standard_EXPORT virtual void HilightOwnerWithColor (const Handle(PrsMgr_PresentationManager3d)& thePM,
+ const Handle(Prs3d_Drawer)& theColor,
+ const Handle(SelectMgr_EntityOwner)& theOwner) Standard_OVERRIDE;
//! Clears internal selection presentation
Standard_EXPORT virtual void ClearSelected() Standard_OVERRIDE;
DEFINE_STANDARD_RTTIEXT(MeshVS_Mesh,AIS_InteractiveObject)
+protected:
+
+ //! Stores all vertices that belong to one of the faces to the given map
+ //! @param theAllElements [in] the map of all mesh elements
+ //! @param theNbMaxFaceNodes [in] the maximum amount of nodes per face, retrieved from drawer
+ //! @param theSharedNodes [out] the result map of all vertices that belong to one face at least
+ Standard_EXPORT void scanFacesForSharedNodes (const TColStd_PackedMapOfInteger& theAllElements,
+ const Standard_Integer theNbMaxFaceNodes,
+ TColStd_PackedMapOfInteger& theSharedNodes) const;
+
protected: