mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0027816: Visualization - provide an API for overriding clipping planes list
Graphic3d_SequenceOfHClipPlane now inherits Standard_Transient. PrsMgr_PresentableObject, Graphic3d_Structure, Graphic3d_CStructure, V3d_View, OpenGl_View now manages the plane list by Handle. The getters ::GetClipPlanes() has been removed, setters taking non-handle ::SetClipPlanes() has been marked deprecated. OpenGl_Structure::Render() and SelectMgr_ViewerSelector::checkOverlap() now disable global (view) clipping planes for objects with flags Graphic3d_TMF_TriedronPers and Graphic3d_TMF_2d or with new flag Graphic3d_SequenceOfHClipPlane::ToOverrideGlobal(). OpenGl_Clipping now implements interface for managing clipping planes without copying the sequences. The filtering of duplicates is no more performed by OpenGl_Clipping - application is responsible to not do this. OpenGl_Clipping tries avoiding unnecessary allocations for managing list of active planes. MFC sample has been updated to use V3d_View::ClipPlanes() method.
This commit is contained in:
@@ -880,11 +880,18 @@ public:
|
||||
//! Graphic3d_GraphicDriver. Please be aware that the planes that
|
||||
//! exceed the limit are ignored during rendering.
|
||||
//! @param thePlanes [in] the clip planes to set.
|
||||
Standard_EXPORT void SetClipPlanes (const Graphic3d_SequenceOfHClipPlane& thePlanes);
|
||||
Standard_EXPORT void SetClipPlanes (const Handle(Graphic3d_SequenceOfHClipPlane)& thePlanes);
|
||||
|
||||
Standard_DEPRECATED("This method is deprecated - overload taking Handle should be used instead")
|
||||
void SetClipPlanes (const Graphic3d_SequenceOfHClipPlane& thePlanes)
|
||||
{
|
||||
Handle(Graphic3d_SequenceOfHClipPlane) aPlanes = new Graphic3d_SequenceOfHClipPlane (thePlanes);
|
||||
SetClipPlanes (aPlanes);
|
||||
}
|
||||
|
||||
//! Get clip planes.
|
||||
//! @return sequence clip planes that have been set for the view
|
||||
Standard_EXPORT const Graphic3d_SequenceOfHClipPlane& GetClipPlanes() const;
|
||||
Standard_EXPORT const Handle(Graphic3d_SequenceOfHClipPlane)& ClipPlanes() const;
|
||||
|
||||
//! Returns the MAX number of clipping planes associated to the view.
|
||||
Standard_EXPORT Standard_Integer PlaneLimit() const;
|
||||
|
Reference in New Issue
Block a user