//purpose :
//=======================================================================
void AIS_InteractiveContext::SetZLayer (const Handle(AIS_InteractiveObject)& theIObj,
- const Standard_Integer theLayerId)
+ const Graphic3d_ZLayerId theLayerId)
{
if (theIObj.IsNull())
return;
//function : GetZLayer
//purpose :
//=======================================================================
-Standard_Integer AIS_InteractiveContext::GetZLayer (const Handle(AIS_InteractiveObject)& theIObj) const
+Graphic3d_ZLayerId AIS_InteractiveContext::GetZLayer (const Handle(AIS_InteractiveObject)& theIObj) const
{
return !theIObj.IsNull()
? theIObj->ZLayer()
Standard_EXPORT void SetDisplayPriority (const Handle(AIS_InteractiveObject)& theIObj, const Standard_Integer thePriority);
//! Get Z layer id set for displayed interactive object.
- Standard_EXPORT Standard_Integer GetZLayer (const Handle(AIS_InteractiveObject)& theIObj) const;
+ Standard_EXPORT Graphic3d_ZLayerId GetZLayer (const Handle(AIS_InteractiveObject)& theIObj) const;
//! Set Z layer id for interactive object.
//! The Z layers can be used to display temporarily presentations of some object in front of the other objects in the scene.
//! The ids for Z layers are generated by V3d_Viewer.
- Standard_EXPORT void SetZLayer (const Handle(AIS_InteractiveObject)& theIObj, const Standard_Integer theLayerId);
+ Standard_EXPORT void SetZLayer (const Handle(AIS_InteractiveObject)& theIObj, const Graphic3d_ZLayerId theLayerId);
//! Setup object visibility in specified view.
//! Has no effect if object is not displayed in this context.
const Graphic3d_SortType theSortType = Graphic3d_ST_BSP_Tree) = 0;
//! Marks BVH tree and the set of BVH primitives of correspondent priority list with id theLayerId as outdated.
- virtual void InvalidateBVHData (const Standard_Integer theLayerId) = 0;
+ virtual void InvalidateBVHData (const Graphic3d_ZLayerId theLayerId) = 0;
//! Add a new top-level z layer with ID <theLayerId> for
//! the view. Z layers allow drawing structures in higher layers
const Graphic3d_SortType theSortType = Graphic3d_ST_BSP_Tree) Standard_OVERRIDE;
//! Marks BVH tree and the set of BVH primitives of correspondent priority list with id theLayerId as outdated.
- Standard_EXPORT virtual void InvalidateBVHData (const Standard_Integer theLayerId) Standard_OVERRIDE;
+ Standard_EXPORT virtual void InvalidateBVHData (const Graphic3d_ZLayerId theLayerId) Standard_OVERRIDE;
//! Insert a new top-level z layer with the given ID.
Standard_EXPORT virtual void AddZLayer (const Graphic3d_ZLayerId theLayerId) Standard_OVERRIDE;
//function : SetZLayer
//purpose :
//=======================================================================
-void PrsMgr_Presentation::SetZLayer (Standard_Integer theLayerId)
+void PrsMgr_Presentation::SetZLayer (Graphic3d_ZLayerId theLayerId)
{
myStructure->SetZLayer (theLayerId);
}
//function : GetZLayer
//purpose :
//=======================================================================
-Standard_Integer PrsMgr_Presentation::GetZLayer() const
+Graphic3d_ZLayerId PrsMgr_Presentation::GetZLayer() const
{
return myStructure->GetZLayer();
}
#ifndef _PrsMgr_Presentation_HeaderFile
#define _PrsMgr_Presentation_HeaderFile
+#include <Graphic3d_ZLayerId.hxx>
#include <PrsMgr_PresentableObjectPointer.hxx>
#include <Standard.hxx>
#include <Standard_Boolean.hxx>
Standard_EXPORT void SetDisplayPriority (const Standard_Integer aNewPrior);
//! Set Z layer ID for the presentation
- Standard_EXPORT void SetZLayer (const Standard_Integer theLayerId);
+ Standard_EXPORT void SetZLayer (const Graphic3d_ZLayerId theLayerId);
//! Get Z layer ID for the presentation
- Standard_EXPORT Standard_Integer GetZLayer() const;
+ Standard_EXPORT Graphic3d_ZLayerId GetZLayer() const;
//! removes the whole content of the presentation.
//! Does not remove the other connected presentations.
// purpose :
// =======================================================================
void PrsMgr_PresentationManager::SetZLayer (const Handle(PrsMgr_PresentableObject)& thePrsObj,
- const Standard_Integer theLayerId)
+ const Graphic3d_ZLayerId theLayerId)
{
for (PrsMgr_ListOfPresentableObjectsIter anIter (thePrsObj->Children()); anIter.More(); anIter.Next())
{
// function : GetZLayer
// purpose :
// =======================================================================
-Standard_Integer PrsMgr_PresentationManager::GetZLayer (const Handle(PrsMgr_PresentableObject)& thePrsObj) const
+Graphic3d_ZLayerId PrsMgr_PresentationManager::GetZLayer (const Handle(PrsMgr_PresentableObject)& thePrsObj) const
{
return thePrsObj->ZLayer();
}
Standard_EXPORT Standard_Integer DisplayPriority (const Handle(PrsMgr_PresentableObject)& thePrsObject, const Standard_Integer theMode) const;
//! Set Z layer ID for all presentations of the object.
- Standard_EXPORT void SetZLayer (const Handle(PrsMgr_PresentableObject)& thePrsObject, const Standard_Integer theLayerId);
+ Standard_EXPORT void SetZLayer (const Handle(PrsMgr_PresentableObject)& thePrsObject, const Graphic3d_ZLayerId theLayerId);
//! Get Z layer ID assigned to all presentations of the object.
//! Method returns -1 value if object has no presentations and is
//! impossible to get layer index.
- Standard_EXPORT Standard_Integer GetZLayer (const Handle(PrsMgr_PresentableObject)& thePrsObject) const;
+ Standard_EXPORT Graphic3d_ZLayerId GetZLayer (const Handle(PrsMgr_PresentableObject)& thePrsObject) const;
Standard_EXPORT Standard_Boolean IsDisplayed (const Handle(PrsMgr_PresentableObject)& thePrsObject, const Standard_Integer theMode = 0) const;
//function : AddZLayer
//purpose :
//=======================================================================
-Standard_Boolean V3d_Viewer::AddZLayer (Standard_Integer& theLayerId)
+Standard_Boolean V3d_Viewer::AddZLayer (Graphic3d_ZLayerId& theLayerId)
{
try
{
//function : RemoveZLayer
//purpose :
//=======================================================================
-Standard_Boolean V3d_Viewer::RemoveZLayer (const Standard_Integer theLayerId)
+Standard_Boolean V3d_Viewer::RemoveZLayer (const Graphic3d_ZLayerId theLayerId)
{
if (!myLayerIds.Contains (theLayerId)
|| theLayerId < myZLayerGenId.Lower()
//function : SetZLayerSettings
//purpose :
//=======================================================================
-void V3d_Viewer::SetZLayerSettings (const Standard_Integer theLayerId, const Graphic3d_ZLayerSettings& theSettings)
+void V3d_Viewer::SetZLayerSettings (const Graphic3d_ZLayerId theLayerId, const Graphic3d_ZLayerSettings& theSettings)
{
myDriver->SetZLayerSettings (theLayerId, theSettings);
}
//function : ZLayerSettings
//purpose :
//=======================================================================
-Graphic3d_ZLayerSettings V3d_Viewer::ZLayerSettings (const Standard_Integer theLayerId)
+Graphic3d_ZLayerSettings V3d_Viewer::ZLayerSettings (const Graphic3d_ZLayerId theLayerId)
{
return myDriver->ZLayerSettings (theLayerId);
}
//! The Z layers are controlled entirely by viewer, it is not possible to add a layer to a particular view.
//! The method returns Standard_False if the layer can not be created.
//! The layer mechanism allows to display structures in higher layers in overlay of structures in lower layers.
- Standard_EXPORT Standard_Boolean AddZLayer (Standard_Integer& theLayerId);
+ Standard_EXPORT Standard_Boolean AddZLayer (Graphic3d_ZLayerId& theLayerId);
//! Remove Z layer with ID <theLayerId>.
//! Method returns Standard_False if the layer can not be removed or doesn't exists.
//! By default, there are always default bottom-level layer that can't be removed.
- Standard_EXPORT Standard_Boolean RemoveZLayer (const Standard_Integer theLayerId);
+ Standard_EXPORT Standard_Boolean RemoveZLayer (const Graphic3d_ZLayerId theLayerId);
//! Returns the settings of a single Z layer.
- Standard_EXPORT Graphic3d_ZLayerSettings ZLayerSettings (const Standard_Integer theLayerId);
+ Standard_EXPORT Graphic3d_ZLayerSettings ZLayerSettings (const Graphic3d_ZLayerId theLayerId);
//! Sets the settings for a single Z layer.
- Standard_EXPORT void SetZLayerSettings (const Standard_Integer theLayerId, const Graphic3d_ZLayerSettings& theSettings);
+ Standard_EXPORT void SetZLayerSettings (const Graphic3d_ZLayerId theLayerId, const Graphic3d_ZLayerSettings& theSettings);
public: