1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0024321: Use List collection instead of NCollection_Set for collection of Handle(Graphic3d_ClipPlane)

- The NCollection_Sequence (Graphic3d_SequenceOfHClipPlane) is used for handling ordered lists of clipping planes instead of NCollection_Set (Graphic3d_SetOfHClipPlane).
This commit is contained in:
apl
2013-11-18 21:48:50 +04:00
committed by bugmaster
parent 28cec2ba3e
commit 51b10cd466
27 changed files with 164 additions and 150 deletions

View File

@@ -38,15 +38,14 @@ class ContextView from Visual3d
uses
SequenceOfAddress from TColStd,
Light from Visual3d,
HSetOfLight from Visual3d,
TypeOfModel from Visual3d,
TypeOfVisualization from Visual3d,
TypeOfSurfaceDetail from Visual3d,
TextureEnv from Graphic3d,
SetOfHClipPlane from Graphic3d
SequenceOfAddress from TColStd,
Light from Visual3d,
HSetOfLight from Visual3d,
TypeOfModel from Visual3d,
TypeOfVisualization from Visual3d,
TypeOfSurfaceDetail from Visual3d,
TextureEnv from Graphic3d,
SequenceOfHClipPlane from Graphic3d
raises
@@ -147,13 +146,14 @@ is
-- Clip Plane
---------------------------------------------------
SetClipPlanes (me : in out; thePlanes : SetOfHClipPlane from Graphic3d);
---Purpose: Set list of clip planes to the view context.
-- @param thePlanes [in] the clip planes to set.
GetClipPlanes (me) returns SetOfHClipPlane from Graphic3d;
ClipPlanes (me) returns SequenceOfHClipPlane from Graphic3d;
---C++: return const&
---Purpose: Get clip planes.
---Purpose: Returns sequence of clip planes.
-- @return sequence of clip planes.
ChangeClipPlanes (me : in out) returns SequenceOfHClipPlane from Graphic3d;
---C++: return&
---Purpose: Change clip planes.
-- @return sequence of clip planes.
---------------------------------------------------
@@ -440,6 +440,6 @@ fields
MyTextureEnv : TextureEnv from Graphic3d;
MySurfaceDetail : TypeOfSurfaceDetail from Visual3d;
myClipPlanes : SetOfHClipPlane from Graphic3d;
myClipPlanes : SequenceOfHClipPlane from Graphic3d;
end ContextView;

View File

@@ -334,12 +334,20 @@ Visual3d_TypeOfSurfaceDetail Visual3d_ContextView::SurfaceDetail() const
return MySurfaceDetail;
}
void Visual3d_ContextView::SetClipPlanes (const Graphic3d_SetOfHClipPlane& thePlanes)
{
myClipPlanes = thePlanes;
}
const Graphic3d_SetOfHClipPlane& Visual3d_ContextView::GetClipPlanes() const
//=======================================================================
//function : ClipPlanes
//purpose :
//=======================================================================
const Graphic3d_SequenceOfHClipPlane& Visual3d_ContextView::ClipPlanes() const
{
return myClipPlanes;
}
//=======================================================================
//function : ChangeClipPlanes
//purpose :
//=======================================================================
Graphic3d_SequenceOfHClipPlane& Visual3d_ContextView::ChangeClipPlanes()
{
return myClipPlanes;
}

View File

@@ -745,12 +745,13 @@ void Visual3d_View::UpdateLights()
MyCView.Context.ActiveLight = NULL;
}
void Visual3d_View::UpdatePlanes()
void Visual3d_View::UpdatePlanes()
{
MyCView.Context.ClipPlanes = MyContext.GetClipPlanes();
MyCView.Context.ClipPlanes = MyContext.ClipPlanes();
if (IsDeleted() || !IsDefined())
{
return;
}
MyGraphicDriver->SetClipPlanes (MyCView);
}